VTUAgent Logo

Developer API · Cable TV API

Cable TV API for DStv, GOtv and StarTimes

Fetch the current packages, check the smartcard or IUC number, then renew or change a subscription with one request.

  • REST and JSON
  • Bearer API key
  • Refund on every failed purchase
POST/v1/cabletv/purchase
{
  "product_type": "dstv",
  "smartcard_number": "1212121212",
  "package_code": "dstv-compact",
  "amount": 19000,
  "phone": "08012345678",
  "subscription_type": "renew",
  "request_ref": "b7e2f4a1-3d5c-4e6f-8a9b-0c1d2e3f4a5b"
}
Response200 · successful

Example request

POST /v1/cabletv/purchase, in the language your site is built with.

curl -X POST https://api.vtuagent.com/v1/cabletv/purchase \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "product_type": "dstv",
  "smartcard_number": "1212121212",
  "package_code": "dstv-compact",
  "amount": 19000,
  "phone": "08012345678",
  "subscription_type": "renew",
  "request_ref": "b7e2f4a1-3d5c-4e6f-8a9b-0c1d2e3f4a5b"
}'

Response

{
  "status": "successful",
  "status_code": 200,
  "message": "Cable TV purchase was successful",
  "reference": "b7e2f4a1-3d5c-4e6f-8a9b-0c1d2e3f4a5b",
  "data": {
    "amount": "19000",
    "package_code": "dstv-compact",
    "smartcard_number": "1212121212"
  }
}

How it behaves

  • Packages from the provider

    POST /v1/cabletv/variations returns each package_code with its current price, so you never hard-code a bouquet price.

  • Renew or change

    Set subscription_type to renew to extend the current bouquet, or change to move the customer to another one.

  • Charged once, refunded on failure

    Your wallet is debited when the request is accepted. If the provider rejects the purchase you get HTTP 424 and the money is already back in your wallet.

  • Safe to retry

    Every purchase carries your own request_ref (a UUID works). Sending the same reference twice is rejected with 400, so a retry after a timeout can’t charge you twice.

Cable TV commission by account type

The share of each payment paid back to you. API accounts get the API column.

ProviderRegularAgentAPI
DStv0.5%0.8%1%
GOtv0.8%0.8%1%
StarTimes0.8%0.8%1%

Commission is paid into your commission balance on every successful purchase. Agent and API accounts earn more.

Get your API key

  1. Step 1

    Create an account

    Sign up for free with your email.

  2. Step 2

    Apply for API access

    On Upgrade Account, choose API User and add the website or app you’ll connect.

  3. Step 3

    Get your key

    Once you’re approved, generate your key in Settings → API Keys. Send it as Authorization: Bearer <key> on every request.

  4. Step 4

    Fund your wallet

    Purchases are paid from your wallet balance at API prices, so top it up by bank transfer or card.

Questions people ask

Which cable TV providers are supported?

DStv, GOtv and StarTimes. Use dstv, gotv or startimes as the product_type.

How do I get package prices?

Call POST /v1/cabletv/variations with the product_type. Each package comes with the package_code and amount to send when you buy.

Can I check a smartcard before paying?

Yes. POST /v1/cabletv/verify returns the customer details on the smartcard or IUC number.

Do I earn commission on cable TV renewals?

Yes. The API rate for each provider is in the table on this page.

Start selling with the Cable TV API

Apply for API access, then follow the docs at docs.vtuagent.com.