> 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/scan-to-pay/retrieve-qrcode-data/vietnam.md).

# Vietnam

Use the following predefined QR code data to test the **Retrieve QR Code Data** API and the subsequent Scan to Pay payout flow in the Sandbox environment for Vietnam.

### Retrieve Recipient Data from QR Code

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

This endpoint retrieves the recipient and payment data encoded in a Vietnamese QR code.

#### Headers

| Name          | Type   | Required | Description                                                                     |
| ------------- | ------ | -------- | ------------------------------------------------------------------------------- |
| Content-Type  | string | Yes      | Fixed value: `application/json; charset=UTF-8`.                                 |
| AppId         | string | Yes      | Your App ID in the Pagsmile payout platform.                                    |
| Authorization | string | Yes      | Lowercase SHA-256 signature generated from the request body and your `app_key`. |

#### Request Body

| Name          | Type    | Required | Constraints                                                                                                | Description                                                                        |
| ------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| country       | string  | Yes      | Fixed value: `VNM`                                                                                         | Recipient country code.                                                            |
| method        | string  | Yes      | Fixed value: `QRCODE`                                                                                      | Payout method.                                                                     |
| account\_type | string  | Yes      | Fixed value: `QRCODE`                                                                                      | Recipient account type.                                                            |
| account       | string  | Yes      | Complete, unmodified QR code data; maximum length: 255 characters.                                         | QR code data captured by the scanner or selected from the Sandbox test data below. |
| timestamp     | integer | Yes      | Current Unix timestamp in seconds. Requests more than 15 seconds before or after server time are rejected. | Request timestamp.                                                                 |
| buyer\_id     | string  | No       | Maximum length: 200 characters.                                                                            | Optional unique customer ID in the merchant system.                                |
| email         | string  | No       | Valid email address; maximum length: 200 characters.                                                       | Optional customer email address.                                                   |

#### Response

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

```json
{
  "code": 200,
  "msg": "success",
  "time": 1793098850,
  "data": [
    {
      "name": "********",
      "document_id": "",
      "document_type": "",
      "bank_code": "********",
      "bank_name": "********",
      "bank_number": "********",
      "account": "********",
      "account_type": "",
      "amount": "",
      "scan_id": "QH2026********",
      "qrcode_type": "********"
    }
  ]
}
```

{% endtab %}

{% tab title="System Error" %}

```json
{
  "code": 5001000,
  "msg": "system error",
  "time": 1793098850,
  "data": {}
}
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
The QR code data on this page is created specifically for Sandbox testing. Do not use it in the Production environment or for a real payout.
{% endhint %}

{% hint style="info" %}
The `SUCCESS`, `REFUSED` and `REFUND` suffixes identify the intended outcome of the subsequent payout test scenario. They do not necessarily represent the response returned by the Retrieve QR Code Data API. Use the payout notification sent to `notify_url` to determine the final transaction result.
{% endhint %}

Replace `timestamp` with the current Unix timestamp in seconds before submitting a request. For request parameters, authentication requirements and response fields, see [Scan to Pay](https://docs.pagsmile.com/reference/payout/scan-to-pay#retrieve-qr-code-data).

### Example

```json
{
  "country": "VNM",
  "method": "QRCODE",
  "account_type": "QRCODE",
  "account": "QR-TEST***VNM_STATIC_SUCCESS",
  "timestamp": 1793098849
}
```

### QR Code Test Data

#### Static QR Code — Success

Use this QR code data to test a static QR code with a successful subsequent payout scenario.

```
QR-TEST***VNM_STATIC_SUCCESS
```

#### Static QR Code — Failure

Use this QR code data to test a static QR code with a refused subsequent payout scenario.

```
QR-TEST***VNM_STATIC_REFUSED
```

#### Static QR Code — Refund

Use this QR code data to test a static QR code with a subsequent refund scenario.

```
QR-TEST***VNM_STATIC_REFUND
```

#### Dynamic QR Code — Success

Use this QR code data to test a dynamic QR code with a successful subsequent payout scenario.

```
QR-TEST***VNM_DYNAMIC_SUCCESS
```

#### Dynamic QR Code — Failure

Use this QR code data to test a dynamic QR code with a refused subsequent payout scenario.

```
QR-TEST***VNM_DYNAMIC_REFUSED
```

#### Dynamic QR Code — Refund

Use this QR code data to test a dynamic QR code with a subsequent refund scenario.

```
QR-TEST***VNM_DYNAMIC_REFUND
```

#### Invalid QR Code

Use this QR code data to test the error handling for an invalid QR code.

```
QR-TEST***VNM_INVALID
```
