Skip to Content

Betting

Operator names (no plan IDs): Catalog.

Fund a customer’s betting wallet. Use product BETTING, put the betting customer / account ID in msisdn, and send a catalog plan_code.

POST /v1/transactions

External create is sync — the response includes the final outcome. Response shapes: Field conventions.

Betting is opt-in per merchant. Contact support if your profile is not enabled.

1. List betting plans

GET /v1/plans/bills/betting

Optional filter: ?network=BET9JA.

curl "https://api.subthingy.io/v1/plans/bills/betting?network=BET9JA" \ -H "X-Merchant-Key: mk_your_key_id" \ -H "X-Merchant-Secret: your_issued_secret"

Use the returned plan id as plan_code on verify and purchase. plan_code and network must match — e.g. 9002 is Bet9ja (BET9JA), 9001 is SportyBet (SPORTYBET).

Betting network values

networkOperator
BET9JABet9ja
SPORTYBETSportyBet
1XBET1xBet
BETKINGBetKing
BETWAYBetWay
NAIRABETNairaBet
MERRYBETMerryBet
BANGBETBangBet

2. Verify betting account (optional)

Validate a betting customer ID without creating a transaction. You may skip this and go straight to purchase. No request_ref on verify.

POST /v1/transactions/verify
curl -X POST "https://api.subthingy.io/v1/transactions/verify" \ -H "Content-Type: application/json" \ -H "X-Merchant-Key: mk_your_key_id" \ -H "X-Merchant-Secret: your_issued_secret" \ -d '{ "merchant": "YOUR_MERCHANT", "msisdn": "TESTBET001", "network": "BET9JA", "product": "BETTING", "plan_code": "9002" }'
FieldRequiredDescription
merchant or merchant_codeYesYour merchant profile
msisdn or customer_msisdnYesBetting platform customer / account ID
networkYesPlatform code (e.g. BET9JA)
productYesBETTING
plan_codeYesCatalog id from plans list

HTTP 200 (Subthingy envelope):

{ "state": "ok", "code": "00", "message": "customer verified", "result": { "product": "BETTING", "network": "BET9JA", "msisdn": "TESTBET001", "customer_name": "Test Customer", "customer_username": "test_user" } }

On test credentials this is the body for TESTBET001. On live credentials the call checks a real betting customer ID and returns that account’s customer_name. customer_username is included when the account has one. Empty values are omitted.

HTTP 400 — the betting ID was rejected, or the request was invalid. This is not an outage. Do not retry as if the API is down. Verify errors use status, code, and message (not the success state / result envelope).

HTTP 502 — verify could not be completed. Retry with backoff. message is generic.

3. Fund betting wallet

curl -X POST "https://api.subthingy.io/v1/transactions" \ -H "Content-Type: application/json" \ -H "X-Merchant-Key: mk_your_key_id" \ -H "X-Merchant-Secret: your_issued_secret" \ -d '{ "merchant": "YOUR_MERCHANT", "msisdn": "TESTBET001", "network": "BET9JA", "product": "BETTING", "plan_code": "9002", "amount": "1000", "phone": "08012345678", "request_ref": "subthingy-bill-bet9ja-001" }'
FieldRequiredDescription
merchant or merchant_codeYesYour merchant profile
msisdn or customer_msisdnYesBetting platform customer / account ID
networkYesPlatform code (e.g. BET9JA)
productYesBETTING
plan_codeYesCatalog id from plans list
amountYesTop-up amount in Naira (string)
phoneYesCustomer mobile number (080… or 234…). Not the betting account ID
request_ref or client_request_idYesUnique idempotency key

4. Check status (optional)

GET /v1/transactions/status?request_ref={request_ref}

See Bill payments overview — Check status.

Test betting accounts

On test credentials, only TESTBET001 is accepted as msisdn. Purchase returns the same success envelope as live (response_code 00, response_message Successful). Verify returns customer_name Test Customer and customer_username test_user. Any other betting ID is rejected.

Live credentials always require a real betting customer ID.

Ask your account manager to enable betting on your merchant profile before go-live.

Last updated on