# Payout

#### 📡 **Payout Callbacks (Webhooks)**

These are **server-side callbacks** sent to the merchant's server whenever the status of **payout** changes.

**Payout Callback**

* Triggered when:
  * A payout is created, processed, completed, or failed
* The callback sends the **current payout status** and related info to the provided `callbackUrl`.

#### **Callback body example**

{% tabs %}
{% tab title="Successful" %}

```json
{
  "id": "9f9cf80f-be0c-4052-9c60-648c482d798c",
  "status": 1,
  "statusName": "Successful",
  "fiatAmount": "0.00",
  "fiatCurrency": "USD",
  "payCurrency": "ETH_ETHEREUM",
  "fromAddress": "0x1000000000000000000000000000000000000000",
  "address": "0x0000000000000000000000000000000000000000",
  "createDate": "2026-01-13 17:04:23.024",
  "modifiedDate": "2026-01-13 17:13:10.776",
  "transactionId": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "withdrawalAmount": "0.00600000",
  "transferAmount": "0.00400000",
  "blockchainFee": "0.00200000",
  "payoutCommissionPercentage": "0",
  "isApiCalled": true,
  "creationWay": "API",
  "uniqueUserId": "SQCGMWJZ",
  "description": "",
  "merchantId": "CJGUEQV0",
  "callbackUrl": "https://webhook.site/"
}
```

{% endtab %}

{% tab title="Unpaid" %}

```json
{
  "id": "9f9cf80f-be0c-4052-9c60-648c482d798c",
  "status": 6,
  "statusName": "Unpaid",
  "fiatAmount": "0.00",
  "fiatCurrency": "USD",
  "payCurrency": "ETH_ETHEREUM",
  "address": "0x0000000000000000000000000000000000000000",
  "createDate": "2026-01-13 17:04:23.024",
  "modifiedDate": "2026-01-13 17:13:10.776",
  "withdrawalAmount": "0.00350000",
  "transferAmount": "0.00300000",
  "blockchainFee": "0.00050000",
  "payoutCommissionPercentage": "0",
  "isApiCalled": true,
  "creationWay": "API",
  "uniqueUserId": "SQCGMWJZ",
  "merchantId": "CJGUEQV0",
  "callbackUrl": "https://webhook.site/"
}
```

{% endtab %}

{% tab title="Rejected" %}

```json
{
  "id": "9f9cf80f-be0c-4052-9c60-648c482d798c",
  "status": 2,
  "statusName": "Rejected",
  "fiatAmount": "0.00",
  "fiatCurrency": "USD",
  "payCurrency": "ETH_ETHEREUM",
  "fromAddress": "0x1000000000000000000000000000000000000000",
  "address": "0x0000000000000000000000000000000000000000",
  "createDate": "2026-01-13 17:04:23.024",
  "modifiedDate": "2026-01-13 17:13:10.776",
  "transactionId": "0x62d35b226c632d448a9e195043f5184f17a9dcc94fdeccabfdafd1f2b83a602c",
  "withdrawalAmount": "0.00600000",
  "transferAmount": "0.00400000",
  "blockchainFee": "0.00200000",
  "payoutCommissionPercentage": "0",
  "isApiCalled": true,
  "creationWay": "API",
  "uniqueUserId": "SQCGMWJZ",
  "description": "",
  "merchantId": "CJGUEQV0",
  "callbackUrl": "https://webhook.site/"
}
```

{% endtab %}
{% endtabs %}

**Notes:**

* These callbacks enable your server to automatically update the order/payment status based on real-time data from TheDex.
* Callbacks can be **manually re-sent** from the **admin panel** in case of delivery failure or testing purposes.
* For testing callback URLs, services like <https://webhook.site/> can be used.


---

# 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.thedex.cloud/introduction/callback/payout.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.
