# Payout List

## This endpoint allows you to get payout list.

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

#### Headers

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

#### Request Body

| Name                                          | Type    | Description                                                                            |
| --------------------------------------------- | ------- | -------------------------------------------------------------------------------------- |
| start\_time<mark style="color:red;">\*</mark> | string  | start\_time(UTC), e.g. 2021-07-01 00:00:00                                             |
| end\_time<mark style="color:red;">\*</mark>   | string  | end\_time(UTC), e.g. 2021-08-01 00:00:00                                               |
| page\_num<mark style="color:red;">\*</mark>   | integer | paging param, page number, should start from  ***1***, while ***0*** is **incorrect**. |
| page\_size<mark style="color:red;">\*</mark>  | integer | paging param, rows will be returned, default 0, max 1000                               |
| timestamp<mark style="color:red;">\*</mark>   | integer | unix timestamp, e.g. 1628512575                                                        |

{% tabs %}
{% tab title="200 Payout list successfully retrieved." %}

```
{
    "code": 200,
    "msg": "success",
    "time": 1628500091,
    "data": [
        {
            "reference_id": "custom_codexxxx",
            "transaction_id": "TS202108090705014iNqtxektRS",
            "user_name": "GUILHERME ALVES DE SOUZA",
            "bank_id": "EXXXXD", // only supported by pix payout.
            "amount": "0.6",
            "source_amount": "0.6",
            "settlement_amount": "0.6",
            "source_currency": "BRL",
            "arrival_amount": "0.57",
            "arrival_currency": "BRL",
            "exchange_rate": "1",
            "tax": "0.02",
            "fee": "0.01",
            "fee_user": "beneficiary",
            "transaction_status": "PROCESSING",
            "create_time": 1625142259,
            "update_time": 1625142261
        },
        ... ... //json array
    ]
}
```

{% endtab %}

{% tab title="400 Request has expired" %}

```
{
    "code": 4001009,
    "msg": "request has expired",
    "time": 1628512773,
    "data": {}
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**How to query all transactions**

Request payout/list with (page\_num = 1, page\_size = 100). If the returned data = page\_size, request payout/list again with (page\_num = page\_num+1). Repeating the requests until the returned data < page\_size. The page\_size can be adjusted based on the demand.
{% endhint %}

## Example

```
curl --location --request POST 'https://sandbox.transfersmile.com/api/payout/list' \
--header 'AppId: 94FAC**********************68548' \
--header 'Authorization: d6181db0d6548b94b162e75d095b59147172d914699f83b2bd17951a671b6302' \
--header 'Content-Type: application/json' \
--data-raw '{
   * "start_time": "2021-07-01 00:00:00",
   * "end_time": "2021-08-01 00:00:00",
   * "page_size": 100, // should be greater than 0
   * "page_num": 1, // should start from the number 1, while 0 is incorrect.
   * "timestamp": 1628512575
}'
```

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

{% hint style="danger" %}
Note: The ***page\_num*** should start from the number 1, while 0 is incorrect. The ***page\_size*** should be greater than 0.
{% 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/payout-list.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.
