Webhook
Gift Bills Webhook API Intengration
This section contains the recommended flow for integrating Gift Bills Callback/Webhook services when using the Gift Bills RESTful API.
The webhook service enables Gift Bills to send your system an update on certain activities. Such activities will include:
a. event.internet
b. event.betting
Note:- Gift Bills will send webhook notifiations to a URL you will provide to us via your Gift Bills api credential's page.
Sample webhook notification is provided below
{
"event": "event.internet",
"status": "delivered",
"provider": "MTN",
"recipient": "07036218209",
"trx": "202204838759023570",
"reference": "GB_202204838759023570",
"channel": "API",
"errorMsg": "Dear Customer, You have successfully shared 2000MB Data to 2347036218209. Your SME data balance is 114.95GB expires 11/09/2022. Thankyou"
}
IMPORTANT NOTES: To receive the Gift Bills callback requests, the below refers:
1. Make sure to update your webhook URL on your Gift Bills api credentials page when logged in on the website.
2. Make sure the URL is a POST method kind
3. Make sure to reply with a json data with key “response” and value “success”. e.g { “response”:”success”}
4. The request data will come as a JSON with a parent key: “event”.
5. The “event” parent key will define the type of webhook that has been sent.
EXPECTED RESPONSE
{
"response":"success"
}