You need to implement a callback endpoint on your server to receive payment and order notification statuses.
We recommend using services like Webhook Tester, Request Catcher, or ngrok to test your webhook callbacks. These services allow you to define temporary dummy endpoints that display the incoming requests and data received from Hubtel.
Provide the dummy URL as the value for the PrimaryCallbackUrl or SecondaryCallbackUrl parameter.
Sample Web Checkout Webhook
POST https://webhook.site/a8b36a02-5272-4a56-8e2b-15eab5e6bb71 HTTP/1.1
Host: webhook.site
Content-Type: application/json
Cache-Control: no-cache
{
"ResponseCode": "0000",
"Status": "Success",
"Data": {
"CheckoutId": "59e2fbbff4e443b98e09346881ac7e9a",
"SalesInvoiceId": "e96ccfb4746045bba13f425bd573a31c",
"ClientReference": "Kaks545253",
"Status": "Success",
"Amount": 0.5,
"CustomerPhoneNumber": "233242825109",
"PaymentDetails": {
"MobileMoneyNumber": "233242825109",
"PaymentType": "mobilemoney",
"Channel": "mtn-gh"
},
"Description": "The MTN Mobile Money payment has been approved and processed successfully."
}
}