Overview

The OneKhusa Payment Gateway Webhooks for Collections provide an easy way for merchants to receive real-time updates whenever customers make payments. Instead of manually checking for new payments, webhooks automatically notify your system as soon as a payment 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

  1. Login at https://app.onekhusa.com
  2. Go to DevelopersWebhooks
  3. Open Webhook Configuration page

Step 2: Configure Your Webhook

Configure your webhook endpoint with the required information below.

Required Information

Request Headers
Webhook signatures should not be shared with unauthorised users.

Webhook Events

1. Payment Success Event

string
default:"payment.success"
Event Code: payment.success
  • Description: Triggered when a payment transaction is successfully completed
  • When Sent: After the payment has been processed and funds have been transferred

2. Payment Reversed Event

string
default:"payment.reversed"
Event Code: payment.reversed
  • Description: Triggered when a payment collection transaction is reversed or refunded
  • When Sent: After the reversal has been processed and funds have been returned to the customer

3. Request To Pay Success Event

string
default:"payrequest.success"
Event Code: payrequest.success
  • Description: Triggered when a request-to-pay transaction is successfully completed
  • When Sent: After the payment has been processed and funds have been credited to the merchant account

4. Request To Pay Reversed Event

string
default:"payrequest.reversed"
Event Code: payrequest.reversed
  • Description: Triggered when a request-to-pay transaction is reversed
  • When Sent: After the reversal has been processed and funds have been returned to the customer, the merchant account is debited

Webhook Payload Structure

All webhook payloads follow the same JSON structure with two main sections: Webhook and Transaction.

Complete Payload Example


For the complete field descriptions and architectural overview, see the Collection Webhooks Overview.