API reference
Cable TV
Check a DStv, GOtv, StarTimes or Showmax smartcard number, then pay for a bouquet by sku.
Errors every endpoint on this page can return
| HTTP | error_code | When |
|---|---|---|
| 401 | UNAUTHORIZED | The key is missing, invalid or revoked. |
| 403 | IP_NOT_WHITELISTED | The request came from outside your IP allowlist. |
| 403 | ACCOUNT_SUSPENDED | The account is suspended. ACCOUNT_FROZEN and ACCOUNT_CLOSED work the same way. |
| 503 | SERVICE_MAINTENANCE | Pay Sef is under maintenance. retry_after_seconds and the Retry-After header say when to try again. |
Validate a smartcard
POST/vtu/cable/validate
Checks a smartcard or IUC number with the cable provider and returns the customer's name, so your customer can confirm it before paying. Send the sku of the bouquet you are about to buy (the same value you send to Pay for a cable TV bouquet); Pay Sef finds the TV provider from it. A well-formed request always returns 200; check is_valid. No Idempotency-Key is needed.
A verified smartcard also carries, when the network reports them, current_bouquet, due_date (usually YYYY-MM-DD) and renewal_amount_kobo (what renewing the current bouquet costs); each is null when unknown. can_renew is true only when the smartcard verified and renewal_amount_kobo is known. Offer "renew" on this flag: a renew purchase without a known renewal price answers 400.
The old biller field is refused with 400: "Use sku instead of biller (the sku of the bouquet you will buy)."
Request body
skustringrequiredThe
skuof the bouquet you will buy, from the CABLE_TV catalogue. The TV provider is taken from it.smartcard_numberstringrequiredSmartcard or IUC number.
Returns: data
is_validbooleanoptionalcustomer_namestring | nulloptionalcurrent_bouquetstring | nulloptionalThe bouquet on the decoder now
due_datestring | nulloptionalWhen the current bouquet ends, as the network sends it (usually
YYYY-MM-DD).renewal_amount_kobointeger | nulloptionalWhat renewing the current bouquet costs, in kobo, when the network reports it.
can_renewbooleanoptionalTrue only when the smartcard verified and
renewal_amount_kobois known. Offer renew on this flag.error_messagestringoptionalOnly when
is_validis false.
Errors
Plus the errors every endpoint on this page can return.
| HTTP | error_code | When |
|---|---|---|
| 400 | VALIDATION_ERROR | sku or smartcard_number is missing, biller was sent, or the sku is not a cable TV plan ("… is not one of our cable TV plans. Use a sku from the cable TV catalogue."). |
| 500 | CONFIGURATION_ERROR | Pay Sef cannot check these details right now (no provider is set up for it). Try again later or contact support. |
| 502 | EXTERNAL_PROVIDER_ERROR | The provider could not be reached. |
curl -X POST "https://sandbox.paysef.com/api/v1/vtu/cable/validate" \
-H "Authorization: Bearer $PAYSEF_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sku": "CABLE_DSTV_COMPACT",
"smartcard_number": "7032345670"
}'{
"success": true,
"status_code": 200,
"message": "Smartcard number verified.",
"data": {
"is_valid": true,
"customer_name": "ADEBAYO OLUWASEUN",
"current_bouquet": "DStv Compact",
"due_date": "2026-12-01",
"renewal_amount_kobo": 1570000,
"can_renew": true
},
"meta": {
"request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
"timestamp": "2026-10-17T12:00:00.123456Z"
}
}{
"success": true,
"status_code": 200,
"message": "Smartcard number could not be verified.",
"data": {
"is_valid": false,
"customer_name": null,
"current_bouquet": null,
"due_date": null,
"renewal_amount_kobo": null,
"can_renew": false,
"error_message": "We couldn't verify smartcard •••• 5670. Check the number and the TV provider, then try again."
},
"meta": {
"request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
"timestamp": "2026-10-17T12:00:00.123456Z"
}
}Base URL https://sandbox.paysef.com/api/v1 with a test key, https://api.paysef.com/api/v1 with a live key
Pay for a cable TV bouquet
POST/vtu/cable/purchase
Pays for a bouquet on a smartcard. Find the bouquet sku with List products for service CABLE_TV. Validate the smartcard first so your customer can confirm the name.
subscription_type is optional. change buys the bouquet in sku; renew renews the decoder's current bouquet at that plan's price, so send it only when Validate a smartcard returned can_renew: true. When the network's renewal price differs from the plan's, renew answers 400 VALIDATION_ERROR naming both amounts and nothing is held. Left out, the bouquet in sku is bought.
Headers
Idempotency-KeystringrequiredA unique value you generate for this order (for example a UUID or your order ID), up to 100 characters, reused unchanged if you retry. See Idempotency.
Request body
skustringrequiredBouquet
skufrom the CABLE_TV catalogue.smartcard_numberstringrequiredsubscription_typestringoptionalOptional.
renew: the current bouquet at the plan's price.change: the bouquet insku. Left out: the bouquet insku. One ofrenew,change.referencestringoptionalYour own ID for this order, as a string of up to 100 characters. Must be unique on your account across test and live, even if an earlier order with it failed. Use it to look the order up later. Up to 100 characters.
callback_urlstring (uri)optionalA public HTTPS URL, up to 500 characters, to receive this order's webhooks instead of your account webhook URL. Signed with the same secret. Up to 500 characters.
Returns: data
order_idstring (uuid)optionalorder_refstringoptionalPay Sef reference, e.g.
VTU-20261017-9A8B7C6D5E4F.referencestringoptionalYour
referenceif you sent one, otherwise theorder_ref.client_referencestringoptionalYour
reference. Only present if you sent one.recipientstringoptionalPhone number (as
0XXXXXXXXXX), smartcard number or meter number.descriptionstringoptionalA short label for the order, today
Purchase for 08031234560. Show it as is; do not parse it.face_value_kobointegeroptionalValue delivered, in kobo.
amount_debited_kobointegeroptionalWhat your wallet paid, in kobo.
statusstringoptionalOne of
INITIATED,FUNDS_RESERVED,DISPATCHING_PROVIDER,PENDING_PROVIDER_QUERY,ADMIN_MANUAL_REVIEW,SUCCESS_SETTLED,FAILED_UNRESERVED,FAILED_REFUNDED.customer_statusstringoptionalThe three-state view of
status:processinguntil a final status,deliveredforSUCCESS_SETTLED,failedforFAILED_UNRESERVEDandFAILED_REFUNDED. One ofprocessing,delivered,failed.money_locationstringoptionalWhere the money is:
not_chargedforINITIATED,heldwhile reserved (FUNDS_RESERVED,DISPATCHING_PROVIDER,PENDING_PROVIDER_QUERY,ADMIN_MANUAL_REVIEW),spentforSUCCESS_SETTLED,refundedfor either failed status.FAILED_UNRESERVEDmeans the order failed and the hold was released;FAILED_REFUNDEDmeans Pay Sef refunded it after a review. One ofnot_charged,held,spent,refunded.is_testbooleanoptionaltokenstringoptionalElectricity token (the token itself, with no label, e.g.
12345678901234567890), or the exam PIN and serial number. Only when delivered.unitsstringoptionalUnits purchased, when the provider returns them.
meter_numberstringoptionalElectricity orders, when the provider returns it.
pinstringoptionalExam PIN, when returned separately (test mode).
serial_numberstringoptionalExam serial number, when returned separately (test mode).
failure_reasonstringoptionalPlain language you can show your customer. On a failed order:
This order did not go through. Your money is back in your wallet.OnADMIN_MANUAL_REVIEW:We are checking this order with the network. Your money is on hold, not spent.Absent otherwise.metadataobjectoptionalDelivery details only: any of
token,delivery_token,units,meter_number,pin,serial_number. Can be{}. Provider and operational details are never included.batch_idstring (uuid)optionalBulk orders only.
poll_urlstringoptionalOnly on
202responses: the path to check this order.created_atstring (date-time)optionalupdated_atstring (date-time)optional
Errors
Plus the errors every endpoint on this page can return.
| HTTP | error_code | When |
|---|---|---|
| 400 | VALIDATION_ERROR | A field is missing, invalid or of the wrong JSON type (phone_number must be a string.), a naira field such as amount was sent instead of amount_kobo, or the Idempotency-Key is over 100 characters. Airtime only: the network and type are not on sale. Purchases by sku only: the sku belongs to another service ("DATA_MTN_SME_1GB" is not a TV package. Choose one from the TV packages list.), or an amount was sent for a fixed-price plan. The message says which. |
| 400 | IDEMPOTENCY_KEY_REQUIRED | No Idempotency-Key header. |
| 403 | WALLET_LOCKED | Your live wallet is on hold ("Your wallet is on hold, so it cannot be used right now. Your money is safe. Contact support to sort it out."). |
| 404 | PRODUCT_NOT_FOUND | Purchases by sku only: the sku is unknown or switched off. |
| 404 | PRICING_RULE_NOT_FOUND | The product has no price for your account type yet. |
| 404 | WALLET_NOT_FOUND | Your live wallet does not exist. |
| 409 | CONFLICT | An order with this reference already exists on your account. |
| 409 | DUPLICATE_PURCHASE | Same product to the same recipient within your duplicate-guard window (the amount is not compared). retry_after_seconds says how long to wait. |
| 409 | ORDER_ALREADY_PLACED | This Idempotency-Key already placed an order (for example the first attempt wrote the order but failed to answer). The body carries that order's order_id and order_ref; check it instead of buying again. |
| 409 | IDEMPOTENCY_IN_FLIGHT | The first request with this key is still running after 8 seconds. |
| 409 | IDEMPOTENCY_PAYLOAD_MISMATCH | This key was used with a different body. |
| 422 | INSUFFICIENT_BALANCE | Not enough available balance. In test mode the message gives the test wallet balance and how to reset it. |
| 422 | DAILY_LIMIT_EXCEEDED | Customer accounts only: the purchase exceeds your daily limit. |
| 422 | VTU_ORDER_FAILED | The provider refused the order. Nothing was charged. |
| 502 | EXTERNAL_PROVIDER_ERROR | The provider could not be reached before the order was sent. |
| 503 | PRODUCT_UNAVAILABLE | The product is temporarily unavailable. details says why: {field: sku, message: SERVICE_DISABLED} or GROUP_DISABLED. |
| 503 | NO_PROVIDERS_AVAILABLE | No provider can fulfil the order right now. Nothing was charged. |
curl -X POST "https://sandbox.paysef.com/api/v1/vtu/cable/purchase" \
-H "Authorization: Bearer $PAYSEF_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: ord_7Hk2pQ9xR4" \
-d '{
"sku": "CABLE_DSTV_COMPACT",
"smartcard_number": "7032345670",
"reference": "your-order-1044"
}'{
"success": true,
"status_code": 200,
"message": "Done. Order delivered.",
"data": {
"order_id": "0199f2a4-6c1e-7b3a-9d42-5e8f1a2b3c4d",
"order_ref": "VTU-20261017-9A8B7C6D5E4F",
"reference": "your-order-1042",
"client_reference": "your-order-1042",
"recipient": "08031234560",
"description": "Purchase for 08031234560",
"face_value_kobo": 50000,
"amount_debited_kobo": 49000,
"status": "SUCCESS_SETTLED",
"customer_status": "delivered",
"money_location": "spent",
"is_test": false,
"created_at": "2026-10-17T12:00:00.000Z",
"updated_at": "2026-10-17T12:00:00.412Z"
},
"meta": {
"request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
"timestamp": "2026-10-17T12:00:00.430211Z"
}
}{
"success": true,
"status_code": 202,
"message": "Order received and processing. We will notify you when it is done.",
"data": {
"order_id": "0199f2a4-6c1e-7b3a-9d42-5e8f1a2b3c4d",
"order_ref": "VTU-20261017-9A8B7C6D5E4F",
"reference": "your-order-1042",
"client_reference": "your-order-1042",
"recipient": "08031234562",
"description": "Purchase for 08031234562",
"face_value_kobo": 50000,
"amount_debited_kobo": 49000,
"status": "PENDING_PROVIDER_QUERY",
"customer_status": "processing",
"money_location": "held",
"is_test": false,
"created_at": "2026-10-17T12:00:00.000Z",
"updated_at": "2026-10-17T12:00:00.640Z",
"poll_url": "/api/v1/vtu/orders/0199f2a4-6c1e-7b3a-9d42-5e8f1a2b3c4d"
},
"meta": {
"request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
"timestamp": "2026-10-17T12:00:00.655Z"
}
}{
"success": false,
"status_code": 422,
"error_code": "VTU_ORDER_FAILED",
"message": "This order did not go through. Your money is back in your wallet.",
"details": [
{
"field": "order_ref",
"message": "VTU-20261017-1B2C3D4E5F60"
}
],
"meta": {
"request_id": "01JAAXH6Z9R3M2K8Q4T7V5W1YB",
"timestamp": "2026-10-17T12:00:00.300Z"
}
}Base URL https://sandbox.paysef.com/api/v1 with a test key, https://api.paysef.com/api/v1 with a live key