> 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-detail.md).

# Payout Detail

Use this API to retrieve the latest details of a payout using its Pagsmile transaction ID.

{% hint style="info" %}
You can only retrieve payouts created under the merchant account associated with the supplied `AppId`.
{% endhint %}

### Get Payout Detail

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

#### Headers

<table><thead><tr><th width="163.890625">Name</th><th width="115.55078125">Type</th><th width="132.50390625">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>Content-Type</code></td><td>string</td><td>Required</td><td>Request content type. Use <code>application/json; charset=UTF-8</code>.</td></tr><tr><td><code>AppId</code></td><td>string</td><td>Required</td><td>Merchant application ID obtained from the Pagsmile dashboard.</td></tr><tr><td><code>Authorization</code></td><td>string</td><td>Required</td><td>SHA-256 signature generated from the sorted request parameters and the merchant App Key. See <a href="https://docs.pagsmile.com/reference/payout/security">Security</a>.</td></tr></tbody></table>

#### Request Body

<table><thead><tr><th>Name</th><th width="93.62109375">Type</th><th width="159.8125">Required</th><th>Constraints</th><th>Description</th></tr></thead><tbody><tr><td><code>transaction_id</code></td><td>string</td><td>Required</td><td>Must not be empty.</td><td>Pagsmile payout transaction ID returned by the Submit a Payout API.</td></tr><tr><td><code>timestamp</code></td><td>integer</td><td>Required</td><td>Unix timestamp in seconds. It must be within 15 seconds before or after the current server time.</td><td>Time when the request is sent.</td></tr></tbody></table>

{% hint style="warning" %}
Generate a new `timestamp` immediately before sending each request. The API rejects a request when its timestamp differs from the current server time by more than 15 seconds.
{% endhint %}

#### Request Sample

```bash
{
  "transaction_id": "TS202108090705014iNqtxektRS",
  "timestamp": 1787623200
}
```

Replace `timestamp` with the current Unix timestamp in seconds and generate `Authorization` using the final Request Body values.

#### Success Response

```json
{
  "code": 200,
  "msg": "success",
  "time": 1628569551,
  "data": {
    "reference_id": "custom_codexxxx",
    "transaction_id": "TS202108090705014iNqtxektRS",
    "user_name": "GUILHERME ALVES DE SOUZA",
    "bank_id": "EXXXXD",
    "amount": "0.55",
    "source_amount": "3.58",
    "settlement_amount": "0.55",
    "source_currency": "BRL",
    "arrival_amount": "0.55",
    "arrival_currency": "BRL",
    "exchange_rate": "1",
    "tax": "0.02",
    "fee": "3.01",
    "fee_user": "merchant",
    "transaction_status": "PAID",
    "remark": "success",
    "create_time": 1628492701,
    "update_time": 1628495767,
    "extra": {}
  }
}
```

#### Response Body

<table><thead><tr><th width="226.375">Parameter</th><th width="115.66796875">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>code</code></td><td>integer</td><td>Response code. <code>200</code> indicates that the payout details were retrieved successfully.</td></tr><tr><td><code>msg</code></td><td>string</td><td>Response message.</td></tr><tr><td><code>time</code></td><td>integer</td><td>Unix timestamp in seconds indicating when the response was generated.</td></tr><tr><td><code>data.reference_id</code></td><td>string</td><td>Merchant-defined payout reference ID, submitted as <code>custom_code</code> when creating the payout.</td></tr><tr><td><code>data.transaction_id</code></td><td>string</td><td>Pagsmile payout transaction ID.</td></tr><tr><td><code>data.user_name</code></td><td>string</td><td>Name of the payout beneficiary.</td></tr><tr><td><code>data.bank_id</code></td><td>string</td><td>Central-bank or downstream-channel transaction identifier. Returned when available; commonly available for Brazil PIX and BankTransfer payouts.</td></tr><tr><td><code>data.bank_number</code></td><td>string</td><td>Bank identifier, such as the ISPB code in Brazil. Returned only when available for the merchant and payment method.</td></tr><tr><td><code>data.bank_name</code></td><td>string</td><td>Bank name. Returned only when available for the merchant and payment method.</td></tr><tr><td><code>data.payer_bank_code</code></td><td>string</td><td>Payer bank code. Returned only for supported SPEI channels.</td></tr><tr><td><code>data.amount</code></td><td>string</td><td>Payout order amount.</td></tr><tr><td><code>data.source_amount</code></td><td>string</td><td>Amount deducted from the merchant's source balance.</td></tr><tr><td><code>data.settlement_amount</code></td><td>string</td><td>Amount used for settlement before the applicable fee and tax allocation.</td></tr><tr><td><code>data.source_currency</code></td><td>string</td><td>Currency of the source balance deduction.</td></tr><tr><td><code>data.arrival_amount</code></td><td>string</td><td>Amount delivered to the beneficiary.</td></tr><tr><td><code>data.arrival_currency</code></td><td>string</td><td>Currency delivered to the beneficiary.</td></tr><tr><td><code>data.exchange_rate</code></td><td>string</td><td>Effective exchange rate applied to the payout after the configured markup adjustment.</td></tr><tr><td><code>data.tax</code></td><td>string</td><td>Tax charged for the payout.</td></tr><tr><td><code>data.fee</code></td><td>string</td><td>Payout processing fee.</td></tr><tr><td><code>data.fee_user</code></td><td>string</td><td>Party that bears the fee. One of <code>merchant</code> or <code>beneficiary</code>.</td></tr><tr><td><code>data.transaction_status</code></td><td>string</td><td>Payout status. One of <code>PROCESSING</code>, <code>PAID</code>, <code>REJECTED</code>, <code>REFUNDED</code>, or <code>PARTIAL_REFUNDED</code>.</td></tr><tr><td><code>data.remark</code></td><td>string</td><td>Status information. When the payout is <code>REJECTED</code> or <code>REFUNDED</code>, this field contains the rejection or refund reason when available.</td></tr><tr><td><code>data.create_time</code></td><td>integer</td><td>Unix timestamp in seconds indicating when the payout was created.</td></tr><tr><td><code>data.update_time</code></td><td>integer</td><td>Unix timestamp in seconds indicating when the payout was last updated.</td></tr><tr><td><code>data.extra</code></td><td>object</td><td>Method-specific payout information. Its child fields are returned only when applicable.</td></tr></tbody></table>

#### Method-specific `extra` Fields

<table><thead><tr><th width="222.984375">Parameter</th><th width="125.3125">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>data.extra.pin</code></td><td>string</td><td>Cash pickup PIN. Returned for <code>CASHOUT</code> payouts when available.</td></tr><tr><td><code>data.extra.valid_days</code></td><td>integer</td><td>Number of days for which the cash pickup PIN is valid. For <code>CASHOUT</code>, the current value is <code>30</code>.</td></tr><tr><td><code>data.extra.upt_ref</code></td><td>string</td><td>UPT reference number. Returned for applicable <code>CASH</code> payouts.</td></tr><tr><td><code>data.extra.voucher</code></td><td>string</td><td>Cash pickup voucher. Returned for applicable <code>CASHPICKUP</code> payouts.</td></tr></tbody></table>

{% hint style="info" %}
Optional response fields are omitted when no value is available. The contents of `data.extra` depend on the payout method and can be empty.
{% endhint %}

#### Payout Statuses

<table><thead><tr><th width="235.8828125">Status</th><th>Description</th></tr></thead><tbody><tr><td><code>PROCESSING</code></td><td>The payout is being processed.</td></tr><tr><td><code>PAID</code></td><td>The payout was completed successfully.</td></tr><tr><td><code>REJECTED</code></td><td>The payout was rejected. Check <code>remark</code> for the reason when available.</td></tr><tr><td><code>REFUNDED</code></td><td>The payout amount was refunded. Check <code>remark</code> for additional information when available.</td></tr><tr><td><code>PARTIAL_REFUNDED</code></td><td>Part of the payout amount was refunded.</td></tr></tbody></table>

#### Request Expired Response

The following response is returned when `timestamp` is outside the allowed 15-second time window:

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