Appearance
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
| Field | Type | Required | Description |
|---|---|---|---|
smart_card_number | string | Yes | The smartcard number: 5 to 20 digits. |
package_slug | string | Yes | A slug from the package list. |
currency | string | No | USD 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
}
}
}| Field | Description |
|---|---|
name | The account holder. Show it to your customer. |
smartcard, customer_number | The account's identifiers. |
due_date | When the subscription is due, when DStv returns it. |
services | The services on the account now, as text. May be empty. |
package | The 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.
| Status | data.error_code | Meaning |
|---|---|---|
422 | DSTV_LOOKUP_FAILED | The smartcard could not be verified. Check the number. |
422 | DSTV_AMOUNT_CONFIRMATION_FAILED | The account was found but DStv would not accept this amount for it. data.details has the account. |
422 | DSTV_ACCOUNT_OWES_MORE | The 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. |
400 | DSTV_RATE_UNVERIFIED | DStv payments are temporarily unavailable. Try again later. |
400 | none | DStv is switched off: Service is not active. Please try again later. |
422 | none | A 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"
}
}