# Webhooks

Receiver webhooks provide notifications for events related to receivers, after a receiver is created notifications relating to the receiver and their KYC progress will be sent to your nominated URL. These webhooks ensure that your system stays updated with any changes to receiver information.

**Receiver 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 receiver.                                                                                                                    |
| `receiver_id`   | String   | Unique ID of the updated receiver.                                                                                                                                             |
| `subaccount_id` | String   | Unique ID of the updated receiver's subaccount.                                                                                                                                |
| `status`        | String   | The receiver status (e.g., `active`)                                                                                                                                           |
| `kyc_status`    | String   | <p>The KYC verification status (e.g., <code>pending</code>, <code>completed</code>)</p><p>The KYC verification status (e.g., <code>pending</code>, <code>completed</code>)</p> |
| `timestamp`     | Integer  | Unix timestamp of the event.                                                                                                                                                   |

**Receiver Notification Event**

<table><thead><tr><th width="190">Event</th><th>Description</th></tr></thead><tbody><tr><td>receiverCreated</td><td>Sent when a new receiver is successfully created and stored in the system.</td></tr><tr><td>receiverKycUpdate</td><td>Indicates that the recipient's KYC (Know Your Customer) status has been updated.</td></tr></tbody></table>

**Receiver Notification Status**

| Status   | Description                                  |
| -------- | -------------------------------------------- |
| creating | Receiver is being created.                   |
| pending  | Receiver creation is pending.                |
| active   | Receiver is active and ready for operations. |
| inactive | Receiver is inactive and cannot be used.     |
| failed   | Receiver creation failed.                    |

**Receiver KYC Notification Status**

| Status    | Description                                                                                                                    |
| --------- | ------------------------------------------------------------------------------------------------------------------------------ |
| pending   | Customer has been sent the request to complete their KYC.                                                                      |
| completed | Customer has successfully completed their KYC verification and can now receive payouts.                                        |
| failed    | Customer has failed their KYC verification. If you believe this to be an error please contact your Payswiftly Account Manager. |

**Example**

```json
{
    "event": "receiverCreated",
    "receiver_id": "e4908c83-6656-408a-8ba2-61dae8f039a5",
    "subccount_id": "ccb93d70-00d0-4ec4-a454-32bfc8e8428f",
    "status": "active",
    "kyc_status": "pending",    
    "timestamp": 1710091407112
}
```

```json
{
    "event": "receiverKycUpdate",
    "receiver_id": "e4908c83-6656-408a-8ba2-61dae8f039a5",
    "subccount_id": "ccb93d70-00d0-4ec4-a454-32bfc8e8428f",
    "kyc_status": "completed",    
    "timestamp": 1710091428000
}
```
