Overview
The OneKhusa disbursement webhooks provide an easy way for merchant back-office systems to receive real-time notifications whenever batch funds transfer to the beneficiaries succeeded or failed. Instead of manually checking for disbursement status, webhooks automatically notify your system as soon as a batch disbursement event occurs.Webhook Configuration
Step 1: Access OneKhusa Portal
- Login at https://app.onekhusa.com
- Go to Developers → Webhooks
- Open Webhook Configuration interface
Step 2: Configure Your Webhook
Configure your webhook endpoint with the required information below.Required Information
| Field | Description | Example |
|---|---|---|
| Callback URL | Your HTTPS endpoint to receive notifications | https://yourdomain.com/webhooks/khusa |
| Event Type | Which events you want to receive | batch.received, batch.failed, payout.success, payout.failed, payout.reversed |
URL Requirements
Ensure your webhook endpoint meets the following requirements:
- HTTPS Protocol: The URL must use HTTPS protocol for secure communication
- Public Accessibility: The URL must be publicly accessible (reachable from the internet)
- POST Request Support: The endpoint should be able to receive and process HTTP POST requests containing JSON payloads
- Response Confirmation: It is recommended to respond with HTTP 200 OK to confirm successful receipt of the webhook
Webhook Events
1. Batch Received Event
Event Code:
batch.received- Description: Triggered when a batch is successfully received and queued for processing. You still receive this notification even when some transactions fail - you only receive batch.failed when all transactions fail
- When Sent: Immediately after batch validation and creation
2. Batch Failed Event
Event Code:
batch.failed- Description: Triggered when a batch fails validation or processing. The response may include metadata depending on the specific failure type and available information.
- When Sent: Immediately when batch processing fails
3. Payout Success Event
Event Code:
payout.success- Description: Triggered when batch disbursement transactions are successfully completed
- When Sent: After 10 transactions in a batch are processed
4. Failed Payout Event
Event Code:
payout.failed- Description: Triggered when batch disbursement transactions fail
- When Sent: After 10 transactions in a batch are processed
5. Reversed Payout Event
Event Code:
payout.reversed- Description: Triggered when batch disbursement transactions are reversed
- When Sent: After 10 transactions in a batch are processed
Event Types
| Event Code | Description | When Triggered |
|---|---|---|
batch.received | Batch successfully received and queued for processing | Immediately after batch validation and creation |
batch.failed | Batch failed validation or processing | Immediately when batch processing fails |
payout.success | Batch disbursement transactions completed successfully | After 10 transactions in a batch are processed |
payout.failed | Batch disbursement transactions failed | After 10 transactions in a batch are processed |
payout.reversed | Batch disbursement transactions reversed | After 10 transactions in a batch are processed |
Webhook Payload Structure
Example JSON payloads for different disbursement transaction statuses:- Success Payout
- Failed Payout
- Reversed Payout
- Batch Received
- Batch Failed
Field Descriptions
| Field | Type | Description | Example |
|---|---|---|---|
SourceAccountNumber | string | The account number from which the disbursement originates | 85231947 |
SourceReferenceNumber | string | This is a unique identifier from the source system | QKAHXD200923 |
BeneficiaryAccountNumber | string | The account number of the recipient | 1111203344 |
TransactionReferenceNumber | string | A unique transaction reference generated by the system | 251005TYHKOPL |
TransactionAmount | decimal | The monetary value of the disbursement transaction | 15000.00 |
TransactionFee | decimal | The fee charged for processing the transaction | 1000.00 |
TransactionDate | datetime | The date and time when the transaction was initiated | 2025-10-10T09:00:00Z |
ProcessedDate | datetime | The date and time when the transaction was completed | 2025-10-10T09:11:10Z |
TransactionStatusCode | string | The status of the transaction (S = Success, F = Failed, R = Reversed) | S |