Betting Topup

OPay allows merchants to topup their customers' betting balance via API.

Basic flow:

  • Call /api/v3/bills/betting-providers to get all the avaliable betting service providers.
  • Call /api/v3/bills/validate to validate the beneficiary account(customerId) with a specific betting provider.
  • Call /api/v3/bills/bulk-bills to initialize topup transactions. batch topup is also supported.
  • Call /api/v3/bills/status to inquire the latest or final transaction status.

/bills/betting-providers

HTTP Method

POST

Sandbox
http://sandbox-cashierapi.opayweb.com/api/v3
Production
https://cashierapi.opayweb.com/api/v3

API Endpoint

/bills/betting-providers


Sample Request

post/bills/betting-providers
curl -X POST --header 'Authorization: Bearer PUBLIC_KEY' --header 'MerchantId:
256619092316009' --header 'content-type: application/json'
https://cashierapi.opayweb.com/api/v3/bills/betting-providers

Sample Response

post/bills/betting-providers
[
  {
    "provider": "NAIRABET",
    "providerLogoUrl": "https://owallet-prod-public.oss-eu-west-1.aliyuncs.com/images/api/icon/betting/nairabet.png"
  },
  {
    "provider": "BET9JA",
    "providerLogoUrl": "https://owallet-prod-public.oss-eu-west-1.aliyuncs.com/images/api/icon/betting/Bet9ja.png"
  }
]
RESPONSE PROPERTYDESCRIPTION
providerOBetting topup service provider
providerLogoUrlProvider logo URL

/bills/validate

Validate the customerId for a specific provider.

HTTP Method

POST

Sandbox
http://sandbox-cashierapi.opayweb.com/api/v3
Production
https://cashierapi.opayweb.com/api/v3

API Endpoint

/bills/validate


Sample Request

post/bills/validate

curl -X POST --header 'Authorization: Bearer PUBLIC_KEY' --header 'MerchantId:
256619092316009' --header 'content-type: application/json'
https://cashierapi.opayweb.com/api/v3/bills/validate

Sample Request Body

post/bills/validate
{
  "serviceType": "betting",
  "provider": "NAIRABET",
  "customerId": "20019212912901281821982"
}
REQUEST PROPERTYDESCRIPTION
serviceTypebetting
providerprovider returned in betting-providers
customerIdbeneficiary's customerId for the specific provider

Sample Response

post/bills/validate
{
  "provider": "NAIRABET",
  "customerId": "20019212912901281821982",
  "firstName": "xxx",
  "lastName": "xxx",
  "userName": "xxx"
}
RESPONSE PROPERTYDESCRIPTION
providerprovider
customerIdbeneficiary's customerId for the specific provider
firstNamereturned by provider
lastNamereturned by provider
userNamereturned by provider

/bills/bulk-bills

Initialize a betting topup transaction

Valid was raised with an header Authorization: Bear Signature which is essentially a HMAC SHA512 signature of the whole payload signed using your Secret Key , and payload should be ordered by keys in alphabetical order.

HTTP Method

POST

Sandbox
http://sandbox-cashierapi.opayweb.com/api/v3
Production
https://cashierapi.opayweb.com/api/v3

API Endpoint

/bills/bulk-bills


Sample Request

post/bills/bulk-bills
curl -X POST --header 'Authorization: Bearer Signature' --header 'MerchantId:
256619092316009' --header 'content-type: application/json'
https://cashierapi.opayweb.com/api/v3/bills/bulk-bills

Sample Request Body

post/bills/bulk-bills
{
  "bulkData": [
    {
      "amount": "1000100",
      "country": "NG",
      "currency": "NGN",
      "customerId": "014562021",
      "provider": "NAIRABET",
      "reference": "123333330001"
    },
    {
      "amount": "10200",
      "country": "NG",
      "currency": "NGN",
      "customerId": "014562021",
      "provider": "NAIRABET",
      "reference": "123333330002"
    }
  ],
  "callBackUrl": "xxxxxx",
  "serviceType": "betting"
}
REQUEST PROPERTYDESCRIPTION
callBackUrlCallback Url for successful transaction notification
serviceTypeDefault is betting
countryDefault is NG
currencyDefault is NGN
amountAmount in kobo
customerIdbeneficiary's customerId for the specific provider
providerprovider returned in betting-providers
referenceOrder number of merchant (unique order number from merchant platform)

Sample Response

post/bills/bulk-bills
[
  {
    "orderNo": "20019212912901281821981",
    "reference": "test_20191123132232",
    "status": "SUCCESS",
    "errorMsg": ""
  },
  {
    "orderNo": "20019212912901281821982",
    "reference": "test_20191123132233",
    "status": "FAIL",
    "errorMsg": "fail reasons"
  }
]
RESPONSE PROPERTYDESCRIPTION
orderNoOrder number of OPay payment
referenceMerchant reference (unique order number from merchant platform)
statusINITIAL
PENDING
SUCCESS
FAIL
errorMsgWill return why error happened

/bills/bulk-status

Initialize a betting topup transaction status inquiry

Valid was raised with an header Authorization: Bear Signature which is essentially a HMAC SHA512 signature of the whole payload signed using your Secret Key , and payload should be ordered by keys in alphabetical order.

HTTP Method

POST

Sandbox
http://sandbox-cashierapi.opayweb.com/api/v3
Production
https://cashierapi.opayweb.com/api/v3

API Endpoint

/bills/bulk-status


Sample Request

post/bills/bulk-status
curl -X POST --header 'Authorization: Bearer PUBLIC_KEY' --header 'MerchantId:
256619092316009' --header 'content-type: application/json'
https://cashierapi.opayweb.com/api/v3/bills/bulk-status

Sample Request Body

post/bills/bulk-status
{
  "bulkStatusRequest": [
    {
      "orderNo": "20019212912901281821982",
      "reference": "test_20191123132233"
    },
    {
      "orderNo": "20019212912901281821983",
      "reference": "test_20191123132234"
    },
    {
      "orderNo": "20019212912901281821984",
      "reference": "test_20191123132235"
    }
  ],
  "serviceType": "betting"
}
REQUEST PROPERTYDESCRIPTION
serviceTypeDefault is betting
orderNoOrder number of OPay payment (Optional)
referenceMerchant reference (unique order number from merchant platform)

Sample Response

post/bills/bulk-status
[
  {
    "orderNo": "20019212912901281821982",
    "reference": "test_20191123132233",
    "status": "SUCCESS",
    "errorMsg": ""
  },
  {
    "orderNo": "20019212912901281821983",
    "reference": "test_20191123132234",
    "status": "FAIL",
    "errorMsg": "error"
  },
  {
    "orderNo": "20019212912901281821983",
    "reference": "test_20191123132234",
    "status": null,
    "errorMsg": "order does not exist!"
  }
]
RESPONSE PROPERTYDESCRIPTION
orderNoOrder number of OPay payment
referenceMerchant reference (unique order number from merchant platform)
statusINITIAL
PENDING
SUCCESS
FAIL
errorMsgerror message
  • Community

  • Official Website
  • Facebook
  • Linkedln
  • Twitter
Was this page helpful?
Yes
No

Help us make this page better

Please leave a comment on how we can improve your experience.