# POST:: Criar nova cobrança imediata

## Endpoint de request

```
https://sandbox.agilspotpay.financehub.com.br/pix/v1/brcode/static
```

## Exemplo com as principais linguagem

Retorno em JSON com os dados do cadastro.

{% tabs %}
{% tab title="cPHP" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://sandbox.agilspotpay.financehub.com.br/pix/v1/brcode/static",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"key\":\"testepix@btgpactual.com\",\"merchant\":{\"postalCode\":\"01201005\",\"merchantCategoryCode\":0,\"name\":\"AgilSpot Pay\"},\"withdrawal\":false}",
  CURLOPT_HTTPHEADER => [
    "accept: application/json",
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

{% endtab %}

{% tab title="cURL" %}

```shell
curl --request POST \
     --url https://sandbox.agilspotpay.financehub.com.br/pix/v1/brcode/static \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
     "key": "testepix@btgpactual.com",
     "merchant": {
          "postalCode": "01201005",
          "merchantCategoryCode": 0,
          "name": "AgilSpot Pay"
     },
     "withdrawal": false
}
'
```

{% endtab %}

{% tab title="NodeJs Axios" %}

```jsx
const axios = require('axios');

const options = {
  method: 'POST',
  url: 'https://sandbox.agilspotpay.financehub.com.br/pix/v1/brcode/static',
  headers: {accept: 'application/json', 'content-type': 'application/json'},
  data: {
    key: 'testepix@btgpactual.com',
    merchant: {postalCode: '01201005', merchantCategoryCode: 0, name: 'AgilSpot Pay'},
    withdrawal: false
  }
};

axios
  .request(options)
  .then(function (response) {
    console.log(response.data);
  })
  .catch(function (error) {
    console.error(error);
  });
```

{% endtab %}
{% endtabs %}

## **Modelo de retorno&#x20;**<mark style="color:green;">**200 OK**</mark>

```json
{
  "transactionId": 9192233,
  "emvqrcps": "00020126450014br.gov.bcb.pix0123testepix@agilspotpay.com.br5204000053039865802BR5907Celcoin6007Barueri61080120100562070503***6304FD53",
  "transactionIdentification": "***"
}
```
