Skip to content

Look up a smartcard ​

Verifies a smartcard for a package and returns the account details. Call it before a payment so your customer can confirm the name. Nothing is charged.

POST /api/v1/dstv/lookup

Body ​

FieldTypeRequiredDescription
smart_card_numberstringYesThe smartcard number: 5 to 20 digits.
package_slugstringYesA slug from the package list.
currencystringNoUSD if sent. No other value is accepted.

Example ​

bash
curl -X POST https://app.xash.co.zw/api/v1/dstv/lookup \
  -H "Authorization: Bearer YOUR_SERVER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"smart_card_number":"1000000001","package_slug":"compact"}'

Response 200 ​

json
{
  "message": "DStv account verified successfully.",
  "success": true,
  "data": {
    "name": "T EXAMPLE",
    "smartcard": "1000000001",
    "customer_number": "100000001",
    "due_date": "2026-12-01",
    "services": ["Compact"],
    "package": {
      "name": "Compact",
      "slug": "compact",
      "amount": 35
    }
  }
}
FieldDescription
nameThe account holder. Show it to your customer.
smartcard, customer_numberThe account's identifiers.
due_dateWhen the subscription is due, when DStv returns it.
servicesThe services on the account now, as text. May be empty.
packageThe package you asked about, with the amount you will be charged.

Fields that DStv did not return are left out.

Errors ​

In these answers the code is inside data, not at the top level.

Statusdata.error_codeMeaning
422DSTV_LOOKUP_FAILEDThe smartcard could not be verified. Check the number.
422DSTV_AMOUNT_CONFIRMATION_FAILEDThe account was found but DStv would not accept this amount for it. data.details has the account.
422DSTV_ACCOUNT_OWES_MOREThe account owes exactly one package that costs more than the one chosen. message gives both amounts and data.details has the account. Choose the account's package. If that is the package you chose, DStv still bills its earlier price: contact support.
400DSTV_RATE_UNVERIFIEDDStv payments are temporarily unavailable. Try again later.
400noneDStv is switched off: Service is not active. Please try again later.
422noneA field is invalid or package_slug is not on sale. Validation error.

Example:

json
{
  "message": "Unable to verify DStv account.",
  "success": false,
  "data": {
    "error_code": "DSTV_LOOKUP_FAILED"
  }
}