Skip to content

Check a purchase ​

Returns the outcome of a purchase made with a reference: direct airtime, airtime vouchers, a bundle, bundle vouchers, ZESA tokens or a DStv payment.

GET /api/v1/transactions/status

GET /api/transactions/status (without /v1) is the same endpoint under a second path.

The lookup reads Xash's own record. It never contacts a network or utility and never changes the purchase, so it is safe to call as often as the rate limit allows. You can only see your own purchases.

For WiFi vouchers use GET /api/v1/wifi/vouchers/purchases/{reference}. Purchases made without a reference cannot be looked up here; find them in transaction history.

Query ​

ParameterRequiredDescription
referenceYesThe reference you sent with the purchase.
bash
curl "https://app.xash.co.zw/api/v1/transactions/status?reference=order-2001" \
  -H "Authorization: Bearer YOUR_SERVER_TOKEN"

Airtime, vouchers, bundles and ZESA ​

Always 200 when the reference exists. Read data.status.

json
{
  "success": true,
  "message": "OK",
  "data": {
    "reference": "order-2001",
    "status": "processed",
    "provider_reference": "EXAMPLEPROVIDERREF",
    "amount": "10.00",
    "currency": "USD",
    "product": "zesa",
    "recipient": "01234567890",
    "transaction_id": "00000000-0000-4000-8000-00000000e001",
    "fulfilment": {
      "token": "00001111222233334444",
      "units": "35.20",
      "tokens": [
        { "token": "00001111222233334444", "units": "35.20" }
      ]
    },
    "error_code": null,
    "created_at": "2026-11-19T10:15:00+02:00"
  }
}

success: true does not mean the purchase succeeded

Here success only says the lookup worked. A failed purchase also answers 200 with "success": true. Always read data.status.

FieldDescription
referenceYour reference.
statusSee the table below.
productairtime, airtime_voucher, bundle, bundle_voucher, zesa or dstv.
recipientThe phone number, meter number or smartcard. null for airtime vouchers and bundle vouchers: PINs are not sent to anyone.
amount, currencyThe amount of the purchase.
transaction_idThe Xash transaction id. Quote it to support.
provider_referenceZESA only: the utility-side reference, once delivered. Otherwise null.
fulfilmentOnce processed, what was delivered. ZESA: token, units and the full tokens list. Airtime vouchers and bundle vouchers: pin, pins and recharge_instructions (below). null for airtime and bundles, and for every purchase that is not processed.
error_codeSet when status is failed. Otherwise null.
created_atWhen the reference was first received.

data.status ​

statusMeaningWhat to do
processedDelivered.Record the sale.
failedNot delivered. Not charged, or refunded. error_code says why.Show the failure. A retry needs a new reference, unless error_code points at an earlier purchase.
processingThe purchase request is still running.Look again in a few seconds.
unknownThe provider did not give a clear answer. The money is held until the purchase is reconciled.Look again later. Do not buy again.

error_code is one of the codes on Outcomes and error codes. It is VEND_FAILED when a held purchase was later reconciled as failed and refunded. For a purchase refused by a spending limit it is LIMIT_PER_TRANSACTION or LIMIT_DAILY; the figures are in the answer to the purchase itself, which a repeat of that request returns again.

Voucher PINs ​

For airtime vouchers and bundle vouchers, a processed answer carries the PINs. They are the same PINs the purchase returned, so after a timeout you can collect them here without buying again.

json
{
  "success": true,
  "message": "OK",
  "data": {
    "reference": "order-1101",
    "status": "processed",
    "provider_reference": null,
    "amount": "2.00",
    "currency": "USD",
    "product": "airtime_voucher",
    "recipient": null,
    "transaction_id": "00000000-0000-4000-8000-00000000b101",
    "fulfilment": {
      "pin": "000111222",
      "pins": ["000111222", "333444555"],
      "recharge_instructions": "*440*112#"
    },
    "error_code": null,
    "created_at": "2026-11-19T10:15:00+02:00"
  }
}
FieldDescription
fulfilment.pinsEvery PIN of the purchase, one per voucher, as digits only.
fulfilment.pinThe first PIN.
fulfilment.recharge_instructionsWhat the customer dials. Where it contains PIN, replace that with the voucher PIN.

Treat this answer like the PINs themselves: anyone who holds your token and the reference can read them.

DStv ​

A DStv lookup answers in the same shape as the DStv payment itself, so the status code changes with the outcome:

StatusMeaningBody
200Paid.The payment's success body: account fields, package, data.reference as the Xash transaction id and data.client_reference as your reference.
202Still running, or not known yet.error_code is OUTCOME_UNKNOWN. data.status is processing or unknown.
422Failed.error_code says why. data.status is failed. Always 422 here, even where the payment itself answered 400 or 429.

Errors ​

Statuserror_codeWhen
404REFERENCE_NOT_FOUNDYour account has no purchase with this reference. If you are checking after a timeout, the purchase request never arrived: it is safe to send it.
422nonereference is missing, longer than 120 characters, or has characters that are not allowed. Validation error.
json
{
  "success": false,
  "error_code": "REFERENCE_NOT_FOUND",
  "message": "No purchase was found for this reference."
}