# Webhooks

Payout webhooks notify your system of important payout events, such as when a payout is successfully processed or if it fails. This allows for real-time updates, ensuring your system remains synchronized with transaction statuses.

**Payout Webhook Structure**\
Data Type: JSON

The webhook payload is delivered in **JSON** format, a structured data format commonly used for APIs. Each payload includes:

| **Variable**          | **Type** | **Description**                                           |
| --------------------- | -------- | --------------------------------------------------------- |
| `event`               | String   | The event will following current progress of this payout. |
| `amount`              | Integer  | Payout amount in cent.                                    |
| `currency`            | String   | Currency of this payout.                                  |
| `payout_id`           | String   | Unique ID of the updated payout.                          |
| `batch_id`            | String   | (Optional) Unique ID of the updated payout's batch.       |
| `batch_run_time`      | Integer  | (Optional) Unix timestamp of the batch running time.      |
| `receiver_account_id` | String   | Unique ID of the updated payout's receiver account.       |
| `receiver_id`         | String   | Unique ID of the updated payout's receiver.               |
| `reference`           | String   | Reference of this payout.                                 |
| `status`              | String   | Status of the current payout progress.                    |
| `subccount_id`        | String   | Unique ID of the updated payout's subaccount.             |
| `timestamp`           | Integer  | Unix timestamp of the event.                              |

**Payout Notification Event**

| Event         | Description                                         |
| ------------- | --------------------------------------------------- |
| payoutCreated | Indicates that a new payout has been created.       |
| payoutUpdated | Indicates that an existing payout has been updated. |
| payoutFailure | Indicates that a payout attempt has failed.         |

**Payout Notification Status**

| Status       | Description                                                       |
| ------------ | ----------------------------------------------------------------- |
| awaiting     | Payout is waiting for the receiver to confirm their bank details. |
| pending      | Payout in pending for processing time.                            |
| in\_progress | Payout is currently in progress.                                  |
| successful   | Payout has been successfully completed.                           |
| cancelled    | Payout has been cancelled.                                        |
| failed       | Payout process has been failed.                                   |

**Example**

```json
{
    "event": "payoutUpdate",
    "amount": 2000,
    "currency": "AUD",
    "payout_id": "3971f24a-b901-4bdb-b3a5-7690ca350cd3",
    "batch_id": "b4ac0283-354c-4008-9b25-0338198b6fa0",
    "batch_run_time": 1710282140000,
    "receiver_account_id": "6afec8ad-c026-463b-9f09-f60adfae10a0",
    "receiver_id":"e4908c83-6656-408a-8ba2-61dae8f039a5",
    "reference": "ref-a00020",
    "status": "successful",
    "subccount_id": "ccb93d70-00d0-4ec4-a454-32bfc8e8428f",
    "timestamp": 1710091428000
}
```
