# PIX

### payment process

<figure><img src="/files/r0sZGghN1AApAd0hRE0o" alt=""><figcaption></figcaption></figure>

1\. The user places an order on the merchant's website and selects PIX payment;

2\. The merchant initiates a PIX payment request to Supefina;

3\. Supefina returns the PIX payment URL information;

4\. The merchant displays the payment URL to the user;

5\. The user opens the URL to display the QR code and pays according to the page prompts;

6\. The payment is successful;

7\. Supefina notifies the merchant that the order is successful.

### Pay for videos

{% file src="/files/7oPykiXxtr8yfzTjE8uc" %}

### Cashier link request address

<table data-full-width="true"><thead><tr><th width="219.6126708984375">The name of the environment</th><th width="800">URL</th></tr></thead><tbody><tr><td>SandBox </td><td><mark style="color:blue;"><code>POST</code></mark><br>https://api.supefina.tech/api/supefina/transactions/payin</td></tr><tr><td><mark style="color:red;">Formal environment</mark> </td><td><mark style="color:red;"><code>POST</code></mark><br><mark style="color:red;">https://api.supefina.net/api/supefina/transactions/payin</mark></td></tr></tbody></table>

### Request parameters

#### Request header

<table data-full-width="true"><thead><tr><th width="479">Key</th><th>Value</th></tr></thead><tbody><tr><td><code>Content-Type</code></td><td><code>application/json</code></td></tr></tbody></table>

#### Request body

<table data-full-width="true"><thead><tr><th width="217">Variable name</th><th width="96">type</th><th width="115">Required</th><th width="641">description</th></tr></thead><tbody><tr><td>callbackUrl</td><td>String</td><td>No</td><td><p>Callback address</p><p>For details, see <a href="https://docs.supefina.net/huan-ying-shi-yong-supefina-de-api-wen-dang/tong-zhi-hui-tiao-shuo-ming">Notification Callbacks</a></p></td></tr><tr><td>countryId</td><td>String</td><td>Yes</td><td><p>Country number </p><p>Reference: <a href="https://docs.supefina.net/huan-ying-shi-yong-supefina-de-api-wen-dang/zi-dian-he-zi-yuan/zi-dian-biao#afwzp">Dictionary table - country number</a> </p><p>Brazil: <code>BRA</code></p></td></tr><tr><td>currency</td><td>String</td><td>Yes</td><td><p>Currency </p><p>Reference: <a href="https://docs.supefina.net/huan-ying-shi-yong-supefina-de-api-wen-dang/zi-dian-he-zi-yuan/zi-dian-biao#huo-bi-currency">Dictionary Table - Currency</a><br>Real：<code>BRL</code></p></td></tr><tr><td>customerPhone</td><td>String</td><td>No</td><td>Mobile phone number</td></tr><tr><td>customerEmail</td><td>String</td><td>Yes</td><td>The user's email address</td></tr><tr><td>customerIdentification</td><td>String</td><td>No</td><td>User Document Number（CPF）</td></tr><tr><td>customerName</td><td>String</td><td>Yes</td><td>User's name</td></tr><tr><td>description</td><td>String</td><td>Yes</td><td>Description of the order<br>No special symbols</td></tr><tr><td>expireTimeL</td><td>Long</td><td>No</td><td><p>Expiration time </p><p>Unit: seconds</p><p>This expiration time does not take effect, and defaults to 12 hours<br></p></td></tr><tr><td>merId</td><td>String</td><td>Yes</td><td>Merchant ID<br>Merchant ID acquisition path: Supefina Merchant Background - Merchant Management - Basic Information - Merchant ID</td></tr><tr><td>merOrderNo</td><td>String</td><td>Yes</td><td>Merchant order number</td></tr><tr><td>nonceStr</td><td>String</td><td>Yes</td><td>Random strings<br>The length cannot exceed 32 bits</td></tr><tr><td>orderAmount</td><td>String</td><td>Yes</td><td>The amount of the order<br>Two decimal places are supported;<br>20>= <code>orderAmount</code> &#x3C;= 50000</td></tr><tr><td>payProduct</td><td>String</td><td>Yes</td><td><a href="https://docs.supefina.net/huan-ying-shi-yong-supefina-de-api-wen-dang/zi-dian-he-zi-yuan/zi-dian-biao#mfocd">Payment type</a><br>PIX：<code>24</code></td></tr><tr><td>sign</td><td>String</td><td>Yes</td><td><p>signature</p><p><a href="https://docs.supefina.net/huan-ying-shi-yong-supefina-de-api-wen-dang/qian-ming-suan-fa">For details, please refer to: Signature algorithm</a></p></td></tr></tbody></table>

### Sample request

{% code fullWidth="true" %}

```json
{
    "callbackUrl": "https://test.com",
    "countryId": "BRA",
    "currency": "BRL",
    "customerEmail": "9064@outlook.com",
    "customerIdentification": "123456789-09",
    "customerName": "test name",
    "description": "test description",
    "merId": "8202759583060992",
    "merOrderNo": "1234777f35edb1965949059290",
    "nonceStr": "mFI99d699u",
    "orderAmount": "10.00",
    "payProduct": "24",
    "sign": "226736F20763B930BEBFDABE342F7538"
}
```

{% endcode %}

### Response parameters

<table data-full-width="true"><thead><tr><th width="217">Variable name</th><th width="136">type</th><th width="736"> description</th></tr></thead><tbody><tr><td>code</td><td>String</td><td><p>Response coding </p><p>For details, see <a href="https://docs.supefina.net/huan-ying-shi-yong-supefina-de-api-wen-dang/zi-dian-he-zi-yuan/xiang-ying-zhuang-tai-ma">Response Status Code</a></p></td></tr><tr><td>data</td><td>Object</td><td>Response data</td></tr><tr><td>amount</td><td>BigDecimal</td><td>The amount of the order</td></tr><tr><td>channelName</td><td>String</td><td>The name of the channel</td></tr><tr><td>fee</td><td>BigDecimal</td><td>Advance handling fee will be charged</td></tr><tr><td>merCode</td><td>String</td><td>Merchant ID</td></tr><tr><td>merOrderNo</td><td>String</td><td>Merchant order number</td></tr><tr><td>referenceCode</td><td>String</td><td>QR code for receiving money (expires in 12 hours)</td></tr><tr><td>supefinaOrderNo</td><td>String</td><td>The amount of the order</td></tr><tr><td>transactionStatus</td><td>String</td><td><p>Order status<br>Whether the initiation status of the order is successful or not has nothing to do with the real transaction status of the order.<br><code>00</code>: The order is successful </p><p><code>04</code>: Failed to place an order</p></td></tr><tr><td>url</td><td>String</td><td>Transaction link (10-minute countdown expires at the cashier)</td></tr><tr><td>msg</td><td>String</td><td>message</td></tr></tbody></table>

#### Sample response

{% code fullWidth="true" %}

```json
{
    "code": "200",
    "data": {
        "amount": 10.00,
        "channelName": "brpix",
        "fee": 0.04,
        "merCode": "8202759583060992",
        "merOrderNo": "1234777f35edb1965949059290",
        "referenceCode": "00020126920014br.gov.bcb.pix2570qrcodes.sulcredi.coop.br/v2/v3/at/97036e99-cb37-4432-a63a-aee049738d115204000053039865802BR5908ARK PAGO6009SAO PAULO62070503***63046E32",
        "supefinaOrderNo": "20240513050101498940f64291983",
        "transactionStatus": "00",
        "url": "https://h5.supefina.net/supefina?token="
    },
    "msg": "success "
}
```

{% endcode %}

### Callback notifications

Submission method:`POST`

<table data-full-width="true"><thead><tr><th width="217">Variable name</th><th width="96">type</th><th width="746"> description</th></tr></thead><tbody><tr><td>amount</td><td>String</td><td>The amount of the order</td></tr><tr><td>countryId</td><td>String</td><td>Country number</td></tr><tr><td>customerName</td><td>String</td><td>Payer's name</td></tr><tr><td>fee</td><td>String</td><td>Advance handling fee will be charged</td></tr><tr><td>identifier</td><td>String</td><td>Payment Reference<br>Clabe</td></tr><tr><td>merId</td><td>String</td><td>Merchant code</td></tr><tr><td>merOrderId</td><td>String</td><td>Merchant order number</td></tr><tr><td>msg</td><td>String</td><td>Information</td></tr><tr><td>nonceStr</td><td>String</td><td>Random strings</td></tr><tr><td>payerIdNumber</td><td>String</td><td>Payer CPF</td></tr><tr><td>payerName</td><td>String</td><td>Payer's name</td></tr><tr><td>realityAmount</td><td>String</td><td>Paid-in amount</td></tr><tr><td>realityFee</td><td>String</td><td>Actual handling fee</td></tr><tr><td>reference</td><td>String</td><td>identifier</td></tr><tr><td>sign</td><td>String</td><td>signature</td></tr><tr><td>status</td><td>String</td><td><p>Transaction status </p><p>For details, please refer to: <a href="https://docs.supefina.net/huan-ying-shi-yong-supefina-de-api-wen-dang/zi-dian-he-zi-yuan/zi-dian-biao#kxzkj">Dictionary Table - Trading Order Status</a></p></td></tr><tr><td>successTime</td><td>Date</td><td>The time at which the transaction was successful</td></tr><tr><td>supefinaOrderId</td><td>String</td><td>Supefina order number</td></tr><tr><td>transactionType</td><td>String</td><td>The type of transaction<br><code>01</code>：Payin<br><code>02</code>：Payout</td></tr></tbody></table>

#### An example of a callback notification

{% code fullWidth="true" %}

```json
{
    "amount": "10.00",
    "countryId": "BRA",
    "customerName": "test name",
    "fee": "0.04",
    "identifier": "706180968985601627",
    "merId": "8202759583060992",
    "merOrderId": "1234777f35edb1965949059290",
    "nonceStr": "7f00fe52-15c7-40e0-a881-6d98a5",
    "payerIdNumber": "15169686463",
    "payerName": "pay person name",
    "realityAmount": "10.00",
    "realityFee": "0.04",
    "reference": "E228964319624061706672exq6TZQQ99",
    "sign": "37AB65F3A0C4743651005CBB1C4639F4",
    "status": "01",
    "successTime": 1718604452000,
    "supefinaOrderId": "20240513050101498940f64291983",
    "transactionType": "01"
}
```

{% endcode %}

**Callback notification response**

After the merchant successfully receives the callback, it needs to return the specified string synchronously: SUCCESS does not return or returns other content by default, and the notification fails.\
As:

{% code fullWidth="true" %}

```java
public String test(){
	return "SUCCESS";
}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.supefina.net/english/welcome-to-supefinas-api-documentation/payin/brazil/pix.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
