Webhook notifications are how the OneKhusa platform informs your system about transaction events in real-time. Each webhook contains an event code that identifies the specific type of occurrence, allowing you to automate your backend processes accordingly.

Callback URL Requirements

Before setting up webhooks, ensure your receiving endpoint (callback URL) meets the following technical requirements:
Ensure your webhook endpoint meets the following requirements:
  • HTTPS Protocol: The URL must use HTTPS for secure communication
  • Public Accessibility: The URL must be publicly accessible and reachable from the internet
  • POST Request Support: The endpoint must accept HTTP POST requests with JSON payloads
  • Response Confirmation: Your server must respond with a HTTP 200 OK status code to confirm successful receipt of the webhook. Failure to do so may result in retries.

Collection Events

These events relate to the collection of funds from your customers.
Event CodeEvent NameEvent Description
payment.successSuccessful CollectionTriggered when a payment collection transaction has been completed successfully. This indicates that funds have been successfully collected from the payer and credited to your merchant account.
payment.reversedReversed CollectionTriggered when a previously successful payment collection has been reversed due to a dispute or other reversal request. The collected funds are returned to the payer’s account.
payrequest.successSuccessful request-to-pay transactionTriggered when a request-to-pay transaction has been processed successfully. This indicates that funds have been successfully collected from the payer and credited to your merchant account.
payrequest.reversedReversed request-to-pay transactionTriggered when a previously successful request-to-pay transaction has been reversed due to various reasons. The collected funds are returned to the payer’s account.

Batch Disbursement Events

These events relate to the processing of batch files containing multiple disbursements.
Event CodeEvent NameEvent Description
payout.successSuccessful DisbursementTriggered when a disbursement (payout) transaction has been completed successfully. This indicates that funds have been successfully transferred from your merchant account to the beneficiary’s account.
payout.failedFailed DisbursementTriggered when a disbursement transaction has failed. This can occur due to invalid beneficiary details, insufficient merchant balance, or gateway errors. The transaction amount is automatically refunded to your merchant account.
payout.reversedReversed DisbursementTriggered when a previously successful disbursement has been reversed due to beneficiary disputes or compliance issues. The funds are returned to your merchant account.
batch.receivedBatch Disbursements ReceivedTriggered when a batch disbursement file has been successfully received and accepted by the system. This confirms the file passed initial validation and has been queued for processing.
batch.failedBatch Disbursements FailedTriggered when the entire batch cannot be processed due to system errors, insufficient funds, or other critical issues. Individual transactions within the batch are marked as failed, and funds are refunded to your merchant account.

Single Disbursement Events

Due to the nature of single disbursement transactions, there is no webhook event associated to this. Every finalised transaction, the merchant system needs to wait for the response whether the funds have been transferred or not to the intended beneficiary. OneKhusa timeout set for single disbursement transaction is 45 seconds.