Webhook Requirements
You must provide a Webhook URL where we can send real-time notifications for payment events such as success, failure, or expiration.
Webhook Payload Fields
| Field | Description |
|---|---|
| chargeReference | Unique reference number from the merchant (e.g. "124pam124") |
| authCode | Authorization code from the payment gateway (e.g. "1648434883535") |
| retrievalReference | System-generated transaction ID (e.g. "fadf476d-61fd-475b-8739...") |
| result | Transaction status: SUCCESS, FAIL, or CLOSED |
| timestamp | Notification time in yyyyMMddhhmmss format (e.g. "20220328103831") |
| paymentType | Type of transaction: CHARGE or REFUND |
| signature | HMAC RSA signature for security validation |
Signature Validation
Use the following steps to validate the signature:
Concatenate the fields:
textdigest = chargeReference + authCode + retrievalReference + result + timestampUse the RSA public key to verify the signature:
textRSASHA256(FromBase64(digest), FromBase64(signature), ToBase64(MERCHANT_RESPONSE_PUBLIC_KEY))
If the signature is valid, the notification is authentic.
Sample Webhook Payloads
json
// Sample: CHARGE
{
"result": "SUCCESS",
"retrievalReference": "fadf476d-61fd-475b-8739-d65dabaff811",
"authCode": "1648434883535",
"signature": "hmac256-2578cde58b42f94d9a529d122e24421a8e7c9f45df7fa0f84e25e94e0f064f40",
"chargeReference": "124pam124",
"timestamp": "20220328103831",
"paymentType": "CHARGE"
}json
// Sample: REFUND
{
"result": "SUCCESS",
"retrievalReference": "12978418-98fc-4d12-ad19-2bd1fbacacf4",
"authCode": "1648435315599",
"signature": "hmac256fc3df3ac70f3e6bb1aaaf5f05d37a33e972027d380d0ceff3d784d5fedb34384",
"chargeReference": "124pam124",
"timestamp": "20220328104159",
"paymentType": "REFUND"
}Expected Webhook Response
| Field | Description |
|---|---|
| errorCode | 0000 for success, or custom integer error code |
| errorDescription | Brief message describing the result |
Sample Responses
json
// Success
{
"errorCode": "0000",
"errorDescription": "success"
}json
// Error
{
"errorCode": "0001",
"errorDescription": "one or more fields empty"
}