# Deposit QR

<mark style="color:green;">`POST`</mark> `https://example.com/payment/deposit/qrcode`

#### Headers

| Name                                           | Type             | Description |
| ---------------------------------------------- | ---------------- | ----------- |
| x-api-key<mark style="color:red;">\*</mark>    | String           | api key     |
| x-signature<mark style="color:red;">\*</mark>  | String           | signature   |
| Content-Type<mark style="color:red;">\*</mark> | application/json | -           |

#### Request Body

| Name                                          | Type   | Description                                                                        |
| --------------------------------------------- | ------ | ---------------------------------------------------------------------------------- |
| refId<mark style="color:red;">\*</mark>       | String | reference/transaction id                                                           |
| amount<mark style="color:red;">\*</mark>      | Number | amount                                                                             |
| userId<mark style="color:red;">\*</mark>      | String | Used for searching in the BO when you want to view transactions separated by user. |
| extendParams                                  | Object | Used for adding data to be sent back in the callback.                              |
| accountName<mark style="color:red;">\*</mark> | String | Bank Account Name                                                                  |
| accountNo<mark style="color:red;">\*</mark>   | String | Bank Account Number                                                                |
| bankCode<mark style="color:red;">\*</mark>    | String | Back Code                                                                          |
| timestamp<mark style="color:red;">\*</mark>   | Date   | ISO Date (UTC+0)                                                                   |

### Example Request

```json
{
    "refId": "REF_ID",
    "amount": 100,
    "userId": "USER_ID",
    "accountName": "",
    "accountNo": "",
    "bankCode": "KBANK",
    "extendParams": {
        "username": "whalepay",
    },
    "timestamp": "2023-02-05T16:34:57.956Z"
}
```

{% tabs %}
{% tab title="200: OK Success" %}
{% code overflow="wrap" %}

```javascript
{
    "data": {
        "status": "CREATE",
        "refId": "REF_ID",
        "transactionId": "QR1675615865D89V73KN",
        "amount": 100,
        "method": "QR",
        "qrcode": "00020...", // EMVCo or Base64
        "extendParams": {
            "username": "whalepay",
        },
        "fee": 0,
        "transferAmount": 100,
        "successTime": null,
        "timestamp": "2023-02-05T16:51:06.575Z"
    },
    "code": 0,
    "msg": "Success",
    "cause": ""
}
```

{% endcode %}
{% endtab %}

{% tab title="400: Unable to process" %}

```javascript
{
    "data": {},
    "code": 9995,
    "msg": "Unable to process your request at the moment. Please try again later.",
    "cause": ""
}
```

{% endtab %}
{% endtabs %}

<mark style="color:red;">**Remark.**</mark>

We prefer use `code` for verify transaction success or not.

`code == 0` is mean Compay transaction success.

`code != 0` is mean transaction failed.


---

# 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://docs.whalepay.one/api-document/common-api/deposit-qr.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.
