# Account Balance

## Get your Payin account balance in Pagsmile.

<mark style="color:green;">`POST`</mark> `https://gateway-test.pagsmile.com/merchant/assets`

#### Headers

<table><thead><tr><th width="227">Name</th><th width="116">Type</th><th>Description</th></tr></thead><tbody><tr><td>Content-Type<mark style="color:red;">*</mark></td><td>String</td><td>application/json; chartset=UTF-8</td></tr><tr><td>Authorization<mark style="color:red;">*</mark></td><td>String</td><td>Basic Base($app_<em>id:$security_</em>key)</td></tr></tbody></table>

#### Request Body

| Name                                        | Type   | Description                                                  |
| ------------------------------------------- | ------ | ------------------------------------------------------------ |
| app\_id\*                                   | string | <p>created app's id at dashboard</p><p>- Max. 32 chars -</p> |
| timestamp<mark style="color:red;">\*</mark> | string | <p>yyyy-MM-dd HH:mm:ss</p><p>- Max. 19 chars -</p>           |
| version<mark style="color:red;">\*</mark>   | string | fixed value: 2.0                                             |
| currency                                    | string | Specify one currency or leave empty to check all currencies  |

{% tabs %}
{% tab title="200: submit successfully " %}

```javascript
{
    "code": "10000",
    "msg": "Success",
    "assets": [
        {
            "currency": "BRL",
            "total_revenue": 6000000.000000,
            "net_income":  6000000.000000  ,
            "balance": 0.000000,
            "payout":  6000000.000000
        }
    ],
    "history": [
        {
            "date": "2023-10-19 01:00:17",
            "currency": "BRL",
            "total_revenue":  6000000.000000  ,
            "net_income":  6000000.000000  ,
            "balance": 0.000000,
            "settled": 0.000000,
            "payout":  6000000.000000  ,
            "desc": "Withdraw by auto transfer to payout account"
        },
        {
            "date": "2023-10-19 01:00:17",
            "currency": "BRL",
            "total_revenue":  6000000.000000  ,
            "net_income":  6000000.000000  ,
            "balance":  1000000.000000	,
            "settled": 0.000000,
            "payout":  5000000.000000  ,
            "desc": "Schedule Task"
        },
        {
            "date": "2023-10-18 13:00:08",
            "currency": "BRL",
            "total_revenue":  5000000.000000  ,
            "net_income":  5000000.000000  ,
            "balance": 0.000000,
            "settled": 0.000000,
            "payout":  5000000.000000  ,
            "desc": "Withdraw by auto transfer to payout account"
        },
        {
            "date": "2023-10-18 13:00:08",
            "currency": "BRL",
            "total_revenue":  5000000.000000  ,
            "net_income":  5000000.000000  ,
            "balance":  4000000.000000	,
            "settled": 0.000000,
            "payout":  1000000.000000  ,
            "desc": "Schedule Task"
        },
    ]
}

```

{% endtab %}

{% tab title="400: invalid-signature " %}

```javascript
{
    "code": "40002",
    "msg": "Business Failed",
    "sub_code": "invalid-signature",
    "sub_msg": "invalid signature"
}
```

{% endtab %}
{% endtabs %}

## Example

```
curl --location --request POST 'https://gateway-test.pagsmile.com/merchant/assets' \
--header 'Basic MTYyNTgyOTIxNDUzMTY2Mzg6UGFnc21pbGVfc2tfZDUwMWQ1ZGNkNTI5OGQ5N2MwNmUzYjI4YjA2OWZjZmY3NDU5ZjY2NzNiMjFjMTFlYTY3NDM5MDgzOTZkOTYxNQ==' \
--header 'Content-Type: application/json' \
--data-raw '{
   * "app_id": "167**********8028",
   * "timestamp": "2023-08-03 07:48:01",
   * "version": "2.0",
     "currency": ""
}'
```

{% hint style="info" %}
Note: **162\*\*\*\*\*\*\*\*\*\*\*\*38** is pagsmile's test app id for sandbox, and **MTYyNTgyOTIxNDUzMTY2Mzg6UGFnc21pbGVfc2tfZDUwMWQ1ZGNkNTI5OGQ5N2MwNmUzYjI4YjA2OWZjZmY3NDU5ZjY2NzNiMjFjMTFlYTY3NDM5MDgzOTZkOTYxNQ==** 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/payin/account-balance.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.
