# Account Balance History

## Get your Payout account balance history in Pagsmile.

<mark style="color:green;">`POST`</mark> `https://sandbox.transfersmile.com/api/balance/history`

#### Headers

| Name                                            | Type   | Description                         |
| ----------------------------------------------- | ------ | ----------------------------------- |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json; chartset=UTF-8    |
| AppId<mark style="color:red;">\*</mark>         | String | Your App ID in payout platform      |
| Authorization<mark style="color:red;">\*</mark> | String | SHA256($sorted\_params + $app\_key) |

#### Request Body

| Name                                          | Type    | Description                       |
| --------------------------------------------- | ------- | --------------------------------- |
| start\_date<mark style="color:red;">\*</mark> | string  | start\_date(UTC), e.g. 2021-07-01 |
| end\_date<mark style="color:red;">\*</mark>   | string  | end\_date(UTC), e.g. 2021-08-01   |
| timestamp<mark style="color:red;">\*</mark>   | integer | unix timestamp, e.g. 1628512575   |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "code": 200,
    "msg": "success",
    "time": 1642075813,
    "data": [
        {
            "merchant_id": "94********48",
            "current_day": "2026-04-14",
            "balance": [
                {
                    "currency": "USD",
                    "amount":"**.**"
                },
                ......
                {
                    "currency": "KZT",
                    "amount":"**.**"
                }
            ]
        },
        {
            "merchant_id": "94********48",
            "current_day": "2026-04-13",
            "balance": [
                {
                    "currency": "USD",
                    "amount":"**.**"
                },
                ......
                {
                    "currency": "KZT",
                    "amount":"**.**"
                }
            ]
        },
        ......
        ......
        ......
        {
            "merchant_id": "94********48",
            "current_day": "2026-01-05",
            "balance": [
                {
                    "currency": "USD",
                    "amount": "**.**"
                },
                ......
                {
                    "currency": "KZT",
                    "amount":"**.**"
                }
            ]
        }
    ]
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

<pre class="language-javascript"><code class="lang-javascript">{
    "code": 4004003,
    "msg": "permission denied",
    "time": 1642074682,
    "data": {}
<strong>}
</strong></code></pre>

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "code": 4001000,
    "msg": "invalid parameter",
    "time": 1642078510,
    "data": {
        "err": "request has expired"
    }
}
```

{% endtab %}
{% endtabs %}

## Example

```
curl --location --request POST 'https://sandbox.transfersmile.com/api/balance/history' \
--header 'AppId: 94FAC**********************68548' \
--header 'Authorization: d6181db0d6548b94b162e75d095b59147172d914699f83b2bd17951a671b6302' \
--header 'Content-Type: application/json' \
--data-raw '{
	 * "start_date": "2021-07-01",
	 * "end_date": "2021-08-01",
   * "timestamp": 1642075807
}'
```

{% 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 %}


---

# 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.pagsmile.com/payout/account-balance-history.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.
