Betting Topup
Basic flow for Betting Topup API
Sandbox Base URL: https://sandbox.giftbills.com/api/v1
Production Base URL: https://giftbills.com/api/v1
Gift Bills allows Reseller/Agent to topup their customers' betting balance via API.
a. Call /api/v1/betting to get all the avaliable betting service providers.
b. Call /api/v1/betting/validate to validate the beneficiary account(customerId) with a specific betting provider.
c. Call /api/v1/betting/topup to initialize topup transactions.
d. Call /api/v1/betting/status to inquire the latest or final transaction status.
Note:- We advise that all tests should be done on our Sandbox environment. After tests have been done successfully and integration completed on the sandbox, kindly request to be provisioned on our Production Environment. Click Here to register sandbox account now.
Getting Betting Providers
API Endpoint: /betting
GET method
curl -X GET --header 'Authorization: Bearer API_KEY' --header 'MerchantId: username' --header 'content-type: application/json'
Sample Response
{ "success": true, "code": "00000", "message": "Fetched successfully", "data": [ { "provider": "BET9JA", "providerLogoUrl": "https://dev.giftbills.com/assets/images/bills/Bet9ja3x.png", "minAmount": "100.00", "maxAmount": "100000.00" }, { "provider": "ONE_XBET", "providerLogoUrl": "https://dev.giftbills.com/assets/images/bills/1xbet3x.png", "minAmount": "100.00", "maxAmount": "500000.00" }, { "provider": "BETWAY", "providerLogoUrl": "https://dev.giftbills.com/assets/images/bills/betway3x.png", "minAmount": "100.00", "maxAmount": "1000000.00" }, { "provider": "NAIRABET", "providerLogoUrl": "https://dev.giftbills.com/assets/images/bills/Nairabet3x.png", "minAmount": "100.00", "maxAmount": "250000.00" } ] }
RESPONSE PROPERTY | DESCRIPTION |
---|---|
provider | Betting topup service provider |
providerLogoUrl | Provider logo URL |
minAmount | The minimum limit for a single transaction, if it is not returned, it means there is no limit |
maxAmount | The maximum limit for a single transaction, if it is not returned, it means there is no limit |
To Validate customerId for a specific Betting Provider
API Endpoint: /betting/validate
POST method
curl -X POST --header 'Authorization: Bearer API_KEY' --header 'MerchantId: username' --header 'content-type: application/json'
Sample Request Body
{ "provider": "BET9JA", "customerId": "1028707" }
REQUEST PROPERTY | DESCRIPTION |
---|---|
MerchantId | Reseller/Agent account username |
API_KEY | Reseller/Agent account api_key |
provider | provider returned in betting-providers |
customerId | beneficiary's customerId for the specific provider |
Sample Response
{ "success": true, "code": "00000", "message": "Fetched successfully", "data": { "provider": "BET9JA", "customerId": "BET9JA", "firstName": "Mock-Firstname", "lastName": "MOCK-Lastname", "userName": "MOCK-Username" } }
RESPONSE PROPERTY | DESCRIPTION |
---|---|
provider | provider specify |
customerId | beneficiary's customerId for the specific provider |
firstName | returned by provider |
lastName | returned by provider |
userName | returned by provider |
To Initiate a Betting Topup Transaction
API Endpoint: /betting/topup
POST method
Note : Validity was raised with an header Authorization: Bear Signature which is essentially a HMAC SHA512 signature of the whole payload signed using your Encryption Key , and payload should be ordered by keys in alphabetical order.
curl -X POST --header 'Authorization: Bearer API_KEY' --header 'MerchantId: username' --header 'Encryption: (Signature_HMAC-SHA-512)' --header 'content-type: application/json'
Sample Request Body
{ "amount": "200", "customerId": "1028707", "provider": "BET9JA", "reference": "45696593r9659" }
REQUEST PROPERTY | DESCRIPTION |
---|---|
MerchantId | Reseller/Agent account username |
API_KEY | Reseller/Agent account api_key |
Encryption Key | Reseller/Agent account Encryption Key (Used to generate your Signature) |
provider | please use the provider returned in betting-providers |
customerId | beneficiary's customerId for the specific provider |
amount | Amount to Topup |
reference | Order number of Reseller/Agent (unique order number from Reseller/Agent platform) |
Sample Response
{ "success": true, "code": "00000", "message": "SUCCESSFUL", "data": { "orderNo": "211104130931335009", "reference": "25696593r9622", "status": "PENDING", "errorMsg": null } }
RESPONSE PROPERTY | DESCRIPTION |
---|---|
orderNo | Order number of Gift Bills payment |
reference | Reseller/Agent reference (unique order number from Reseller/Agent platform) |
status | PENDING SUCCESS FAIL |
errorMsg | Will return why error happened |
To Initiate a Betting Topup Transaction Status Inquiry
API Endpoint: /betting/status
POST method
curl -X POST --header 'Authorization: Bearer API_KEY' --header 'MerchantId: username' --header 'content-type: application/json'
Sample Request Body
{ "orderNo": "211104130931335009", "reference": "25696593r9622", "serviceType": "betting" }
REQUEST PROPERTY | DESCRIPTION |
---|---|
MerchantId | Reseller/Agent account username |
API_KEY | Reseller/Agent account api_key |
orderNo | Order number of Gift Bills payment |
reference | please use the provider returned in betting-providers |
serviceType | ServiceType for betting topup, could be betting |
reference | Reseller/Agent reference (unique referrence number from Reseller/Agent platform) |
Sample Response
{ "success": true, "code": "00000", "message": "Fetched successfully", "data": { "orderNo": "211104130931335009", "reference": "25696593r9622", "status": "SUCCESS", "errorMsg": null } }
RESPONSE PROPERTY | DESCRIPTION |
---|---|
orderNo | Order number of Gift Bills payment |
reference | Reseller/Agent reference (unique order number from Reseller/Agent platform) |
status | PENDING SUCCESS FAIL |
errorMsg | Will return why error happened |