> 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/payout-status.md).

# Payout Status

## Get Payout Status

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

This endpoint allows you to get payout status.

#### Headers

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

#### Request Body

| Name         | Type   | Description                                                   |
| ------------ | ------ | ------------------------------------------------------------- |
| payout\_id   | string | pagsmile transaction id, payout\_id or custom\_code required. |
| custom\_code | string | merchant custom\_code, payout\_id or custom\_code required.   |

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

```
{
    "code": 200,
    "msg": "success",
    "time": 1628497163,
    "data": {
        "payout_id": "TPO2108090705014iNqtxektRS",
        "custom_code": "custom_code17902976588800",
        "status": "PAID",
        "description": "success"
    }
}
```

{% endtab %}

{% tab title="400 custom\_code or payout\_id required" %}

```
{
    "code": 400,
    "msg": "invalid parameters",
    "time": 1628497751,
    "data": {
        "error": "custom_code or payout_id required"
    }
}
```

{% endtab %}

{% tab title="400 payout order not found" %}
{% code lineNumbers="true" %}

```
{
    "code": 400,
    "msg": "can not find this payout order",
    "time": 1628497751,
    "data": {

    }
}
```

{% endcode %}
{% endtab %}

{% tab title="500 system error" %}

```
{
    "code": 500,
    "msg": "system error",
    "time": 1628497751,
    "data": {
        "error": "system error"
    }
}
```

{% endtab %}
{% endtabs %}

## Payout Status

| Status            | Description                              |
| ----------------- | ---------------------------------------- |
| IN\_PROCESSING    | initial status after submitting.         |
| PROCESSING        | bank processing                          |
| PAID              | payout finished successfully             |
| REJECTED          | payout rejected by bank                  |
| REFUNDED          | payout refunded by user or bank          |
| PARTIAL\_REFUNDED | payout partial refunded by user or bank. |

{% hint style="info" %}

* ***The Refund of Payout can be issued by the recipient or by the recipient's bank. Pagsmile cannot issue a refund of the PAID transactions.***
* ***PIX (Brazil), BankTransfer (Brazil), BankTransfer (Chile), CASHOUT (Colombia), SPEI (Mexico),*** and ***Pagsmile Wallet*** could have ***REFUNDED** status.*
* ***PIX (Brazil),** and **BankTransfer (Brazil)** could have **PARTIAL\_REFUNDED*** status. When multiple partial refunds fully refund a payout transaction, the payout transaction will be updated to ***REFUNDED*** status.
  {% endhint %}

## Payout status change flow

<figure><img src="/files/Mp3sg4ub7WDOMB4jwAca" alt=""><figcaption></figcaption></figure>

## Example

```
curl --location --request POST 'https://sandbox.transfersmile.com/api/payout/status' \
--header 'AppId: 94FAC**********************68548' \
--header 'Authorization: d6181db0d6548b94b162e75d095b59147172d914699f83b2bd17951a671b6302' \
--header 'Content-Type: application/json' \
--data-raw '{
    "payout_id": "TPO2108090705014iNqtxektRS",
    "custom_code": "custom_code17902976588800"
}'
```

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