> For the complete documentation index, see [llms.txt](https://docs.pagsmile.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pagsmile.com/reference/payout/retrieve-qrcode-data/brazil.md).

# Brazil

## Retrieve recipient data from QRCODE

<mark style="color:green;">`POST`</mark> `https://sandbox.transfersmile.com/api/payout/bank-account-list`

This endpoint allows you to retrieve the recipient's data from QRCODE.

#### Headers

| Name                                            | Type   | Description                                                 |
| ----------------------------------------------- | ------ | ----------------------------------------------------------- |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json; charset=UTF-8                             |
| AppId<mark style="color:red;">\*</mark>         | string | Get AppId from dashboard                                    |
| Authorization<mark style="color:red;">\*</mark> | string | signature, generated by SHA256($sorted\_params + $app\_key) |

#### Request Body

| Name                                            | Type    | Description                                  |
| ----------------------------------------------- | ------- | -------------------------------------------- |
| country<mark style="color:red;">\*</mark>       | string  | <p>Country Code.</p><p>- BRA</p>             |
| method<mark style="color:red;">\*</mark>        | string  | <p>Method<br>- Fixed value: QRCODE -</p>     |
| account\_type<mark style="color:red;">\*</mark> | string  | <p>Account type<br>- Fixed value: QRCode</p> |
| account<mark style="color:red;">\*</mark>       | string  | Beneficiary's QRCode                         |
| timestamp<mark style="color:red;">\*</mark>     | Integer | unix timestamp, e.g. 1628512575              |
| buyer\_id                                       | string  | merchant user's id                           |
| email                                           | string  | <p>User's email<br>- Max. 200 chars -</p>    |

{% tabs %}
{% tab title="200 success " %}

```
{
	"code": 200,
	"msg": "success",
	"time": 1780569833,
	"data": [
		{
			"name": "Pagsmile test",
			"document_id": "59*****85",
			"document_type": "CNPJ",//CPF or CNPJ for Brazil
			"bank_code": "1*****5",//8-digits Bank ISPB Code for Brazil
			"bank_name": "MAGEN IP",
			"bank_number": "1*****5",
			"account": "*****",
			"account_type": "PAYMENT",
			"amount": "0.03",
			"scan_id": "QH2026**************",
			"qrcode_type": "DYNAMIC_INSTANT_PAYMENT"// or "STATIC"
		}
	]
}
```

{% endtab %}

{% tab title="500 system error" %}

```
{
    "code": 500,
    "msg": "system error",
    "time": 1628497751,
    "data": {
        "error": "system error"
    }
}
```

{% endtab %}
{% endtabs %}

## Example

```
curl --location --request POST 'https://sandbox.transfersmile.com/api/payout/bank-account-list' \
--header 'AppId: 94FAC**********************68548' \
--header 'Authorization: d6181db0d6548b94b162e75d095b59147172d914699f83b2bd17951a671b6302' \
--header 'Content-Type: application/json' \
--data-raw '{
    "country": "BRA", //BRA
    "method": "QRCODE",
    "account": "00020101021226880014br.gov.bcb.pixqrcode.com.br/pix/2e731667****",
    "account_type": "qrcode",
    "timeStamp": "1733992186",
    "buyer_id": "********",
    "email": "test@test.com"
}'
```

{% hint style="info" %}
Note: ***94FAC\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*68548*** is pagsmile's test merchant id for sandbox, and ***d6181db0d6548b94b162e75d095b59147172d914699f83b2bd17951a671b6302*** is authorization token associated with the test App ID.
{% endhint %}

## Sandbox QR Code Test Data

Use the following QR codes to test different QRCode retrieval scenarios in the sandbox environment.

### Static QR Code without Fixed Amount

Use this QR code to test a static QR code without a fixed amount.

```
00020101021226990014br.gov.bcb.pix2577qrcode.pagsmile.com.br/qrs1/v2/01HRBqBVWXZ55OeHdj7fMfKunhXTFOi29ccSiRDLmmePXm52040000530398654045.695802BR5911LUXTUK LTDA6009Sao Paulo62070503***STATIC
```

Response sample:

```json
{
  "code": 200,
  "msg": "success",
  "time": 1783582034,
  "data": [
    {
      "name": "Test User NameAA",
      "document_id": "11********82",
      "document_type": "CPF",
      "bank_code": "******",
      "bank_name": "BANCO GENIAL",
      "bank_number": "45246410",
      "account": "52********20",
      "account_type": "CURRENT",
      "amount": "0.00",
      "scan_id": "*************************",
      "qrcode_type": "STATIC"
    }
  ]
}
```

### Blocked QR Code

Use this QR code to test the scenario where the receiver bank account is blocked.

```
00020101021226990014br.gov.bcb.pix2577qrcode.pagsmile.com.br/qrs1/v2/01HRBqBVWXZ55OeHdj7fMfKunhXTFOi29ccSiRDLmmePXm52040000530398654045.695802BR5911LUXTUK LTTT6009Sao Paula62070503***
```

Response sample:

```json
{
  "code": 4001015,
  "msg": "account is blocked",
  "time": 1783580173,
  "data": {
    "err": "receiver bank account blocked"
  }
}
```

### Invalid or Expired QR Code

Use this QR code to test the scenario where the QR code is invalid or expired.

```
00020101021226990014br.gov.bcb.pix2577qrcode.pagsmile.com.br/qrs1/v2/01HRBqBVWXZ55OeHdj7fMfKunhXTFOi29ccSiRDLmmePXm52040000530398654045.695802BR5911LUXTUK LTDA6009Sao Paulo62070503***Invalid/Expired
```

Response sample:

```json
{
  "code": 400,
  "msg": "Invalid QR Code",
  "time": 1783582212,
  "data": {}
}
```
