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.
Important: Do not trust any webhook notifications received, your system is required to
verify prior to processing to avoid unauthorised notifications being processed.
Webhook Configuration
Step 1: Access OneKhusa Portal
- Login at https://app.onekhusa.com
- Go to Developers → Webhooks
- Open Webhook Configuration interface
Configure your webhook endpoint with the required information below.
Request Headers
| Header Name | Description | Example |
|---|
| X-OneKhusa-Webhook-Event | The request should include this header indicating the event type | batch.received, batch.failed |
| X-OneKhusa-Webhook-Signature | A secret signature used to verify the authenticity of webhook notifications | a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6 |
Webhook signatures should not be shared with unauthorised users.
Webhook Events
1. Batch Received Event
event_code
string
default:"batch.received"
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
string
default:"batch.failed"
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
string
default:"payout.success"
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
string
default:"payout.failed"
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
string
default:"payout.reversed"
Event Code: payout.reversed
- Description: Triggered when batch disbursement transactions are reversed
- When Sent: After 10 transactions in a batch are processed
Batch Disbursement Payload Structure
Example JSON payloads for different disbursement transaction statuses:
Batch Success Payout
Batch Failed Payout
Batch Reversed Payout
Batch Received
Batch Failed
[
{
"sourceAccountNumber": "9876543210",
"sourceReferenceNumber": "ATSY27181",
"beneficiaryAccountNumber": "1234567890",
"beneficiaryAccountName": "John Doe",
"transactionReferenceNumber": "251105PCDRLL",
"transactionAmount": 1000.50,
"transactionFee": 10.00,
"transactionDate": "2024-01-15T09:00:00Z",
"processedDate": "2024-01-15T10:30:00Z",
"transactionStatusCode": "S",
"responseCode": "S100",
"transactionCode": "MBA",
"connectorId": 213346
},
{
"sourceAccountNumber": "9876543210",
"sourceReferenceNumber": "BTSY27182",
"beneficiaryAccountNumber": "0987654321",
"beneficiaryAccountName": "Jane Smith",
"transactionReferenceNumber": "TXN-REF-12345",
"transactionAmount": 2500.75,
"transactionFee": 15.00,
"transactionDate": "2024-01-15T09:05:00Z",
"processedDate": "2024-01-15T10:35:00Z",
"transactionStatusCode": "S",
"responseCode": "S100",
"transactionCode": "MMW",
"connectorId": 213346
}
]
[
{
"sourceAccountNumber": "9876543210",
"sourceReferenceNumber": "WTSY27181",
"beneficiaryAccountNumber": "1234567890",
"beneficiaryAccountName": "John Doe",
"transactionReferenceNumber": "TXN-REF-67890",
"transactionAmount": 1000.50,
"transactionFee": 10.00,
"transactionDate": "2024-01-15T09:00:00Z",
"processedDate": "2024-01-15T10:30:00Z",
"transactionStatusCode": "F",
"responseCode": "E999",
"transactionCode": "MBA",
"connectorId": 224368
},
{
"sourceAccountNumber": "9876543210",
"sourceReferenceNumber": "BTSY27ER3",
"beneficiaryAccountNumber": "0987654321",
"beneficiaryAccountName": "Jane Smith",
"transactionReferenceNumber": "TXN-REF-12345",
"transactionAmount": 2500.75,
"transactionFee": 15.00,
"transactionDate": "2024-01-15T09:05:00Z",
"processedDate": "2024-01-15T10:35:00Z",
"transactionStatusCode": "F",
"responseCode": "E888",
"transactionCode": "MMW",
"connectorId": 224368
}
]
[
{
"sourceAccountNumber": "9876543210",
"sourceReferenceNumber": "WFKY27181",
"beneficiaryAccountNumber": "1234567890",
"beneficiaryAccountName": "John Doe",
"transactionReferenceNumber": "251105PCDRLL",
"transactionAmount": 1000.50,
"transactionFee": 10.00,
"transactionDate": "2024-01-15T09:00:00Z",
"processedDate": "2024-01-15T10:30:00Z",
"transactionStatusCode": "R",
"responseCode": "S100",
"transactionCode": "MBA",
"connectorId": 213346
},
{
"sourceAccountNumber": "9876543210",
"sourceReferenceNumber": "ERSY27956",
"beneficiaryAccountNumber": "1234567890",
"beneficiaryAccountName": "John Doe",
"transactionReferenceNumber": "251105PCDRLL",
"transactionAmount": 1000.50,
"transactionFee": 10.00,
"transactionDate": "2024-01-15T09:00:00Z",
"processedDate": "2024-01-15T10:30:00Z",
"transactionStatusCode": "R",
"responseCode": "S100",
"transactionCode": "MBA",
"connectorId": 213346
}
]
{
"batchNumber": 20241013001,
"merchantAccountNumber": 35253486,
"uploadType": "CSV",
"numberOfFailedTransactions": 5,
"numberOfSuccessfulTransactions": 145,
"numberOfTransactions": 150,
"successfulTotalAmount": 150000.00,
"capturerEmailAddress": "johndoe@gmail.com",
"dateReceived": "2024-10-13T10:30:00Z",
"dateCaptured": "2024-10-13T10:30:00Z",
}
{
"merchantAccountNumber": 35253486,
"isBatchScheduled": false,
"scheduledDate": null,
"uploadType": "XLSX",
"capturerEmailAddress": "johndoe@gmail.com",
"dateCaptured": "2024-10-13T10:30:00Z",
"errorMessage": "All transactions failed validation",
"metaData": {
"batchNumber": "20241013001",
"totalAmount": "150000.00",
"numberOfTransactions": "150",
"dateOccurred": "2024-10-13T10:30:00Z"
}
}
Single Disbursement Payload Structure
Example JSON payloads for different disbursement transaction statuses:
Success Payout
Failed Payout
Reversed Payout
{
"sourceAccountNumber": "9876543210",
"sourceReferenceNumber": "ZESY27181",
"beneficiaryAccountNumber": "1234567890",
"beneficiaryAccountName": "John Doe",
"transactionReferenceNumber": "251105812UIK",
"transactionAmount": 1000.50,
"transactionFee": 10.00,
"transactionDate": "2024-01-15T09:00:00Z",
"processedDate": "2024-01-15T10:30:00Z",
"transactionStatusCode": "S",
"responseCode": "S100",
"transactionCode": "MBA",
"connectorId": 223758
}
{
"sourceAccountNumber": "9876543210",
"sourceReferenceNumber": "BPSY27356",
"beneficiaryAccountNumber": "1234567890",
"beneficiaryAccountName": "John Doe",
"transactionReferenceNumber": "251605812HKL",
"transactionAmount": 1000.50,
"transactionFee": 10.00,
"transactionDate": "2024-01-15T09:00:00Z",
"processedDate": "2024-01-15T10:30:00Z",
"transactionStatusCode": "F",
"responseCode": "E999",
"transactionCode": "MMW",
"connectorId": 221478
}
{
"sourceAccountNumber": "9876543210",
"sourceReferenceNumber": "KKSY27901",
"beneficiaryAccountNumber": "1234567890",
"beneficiaryAccountName": "John Doe",
"transactionReferenceNumber": "251105812HMM",
"transactionAmount": 1000.50,
"transactionFee": 10.00,
"transactionDate": "2024-01-15T09:00:00Z",
"processedDate": "2024-01-15T11:00:00Z",
"transactionStatusCode": "R",
"responseCode": "S100",
"transactionCode": "MBA",
"connectorId": 224545
}
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 |
BeneficiaryAccountName | string | The name registered on the beneficiary’s account | John Doe |
ResponseCode | string | The code set after the disbursement transaction is processed. Refer to Transaction Responses for more details. | S000 |
TransactionCode | string | An internal transaction code used for classification or processing. For disbursements, this will be MBA (Merchant To Account) or MMW (Merchant To Mobile Wallet). Refer to Transaction Types for more details. | MBA, MMW |
ConnectorId | integer | The unique number representing the institution (bank/MNO) used for the disbursement transaction | 213346 |