Skip to content

Deposit status ​

Poll a deposit ​

GET /api/v1/{method}/poll/{payment}

Path partDescription
methodecocash, innbucks, omari, crypto or card. Must match the deposit's method.
paymentThe deposit id.

The start response gives you this URL ready-made as poll_url.

Example ​

bash
curl https://app.xash.co.zw/api/v1/ecocash/poll/9001 \
  -H "Authorization: Bearer YOUR_SERVER_TOKEN"

Response 200 ​

json
{
  "success": true,
  "message": "Payment successful",
  "data": {
    "id": 9001,
    "amount": "5.00",
    "currency": "USD",
    "payment_method": "ecocash",
    "status": "SUCCESS",
    "archived": false,
    "reconciliation_required": false,
    "start_unconfirmed": false,
    "expires_at": "2026-11-19T08:30:00.000000Z",
    "created_at": "2026-11-19T08:15:00.000000Z",
    "poll_url": "https://app.xash.co.zw/api/v1/ecocash/poll/9001",
    "charge_amount": "5.00",
    "charge_currency": "USD",
    "exchange_rate": null,
    "order_reference": "DEP_EXAMPLE001",
    "request_id": "00000000-0000-4000-8000-000000000001",
    "debit_reported": false,
    "debit_report_status": null,
    "status_message": "Payment successful"
  }
}

message is Payment pending while the deposit is open. Otherwise it describes the result. Fields are explained under The deposit object.

How to poll ​

  • Poll every 3 to 5 seconds while a person is waiting, and stop when status is SUCCESS, FAILED or EXPIRED.
  • FAILED and EXPIRED are not proof that no payment was made. A late payment that Xash verifies still moves the deposit to SUCCESS. Poll the original deposit again before you ask the payer to pay a second time, and if you still cannot tell whether they were debited, hold the order instead of taking a second payment. See Statuses.
  • A poll always answers 200 for a deposit of yours, even when Xash cannot reach the payment provider at that moment. It then returns the last known state.
  • A poll of an EcoCash or OMari deposit also asks the provider for the latest status, so polling is what moves a paid deposit to SUCCESS quickly.
  • Stay inside the rate limit of 60 requests a minute.

Errors ​

Statuserror_codeWhen
404PAYMENT_NOT_FOUNDNo deposit with this id belongs to you, or method does not match it.

Find a deposit you lost the id of ​

EcoCash only. If you started a deposit with a callback_url but never stored the id (for example your request timed out), you can find the deposit by the last path segment of that callback URL.

GET /api/v1/ecocash/lookup

QueryTypeRequiredDescription
callback_referencestringYesThe last path segment of the callback_url you sent: 6 to 64 letters, digits or dashes.

For this to work, give every deposit its own callback path, for example https://shop.example.com/hooks/xash/ORDER-1001.

bash
curl "https://app.xash.co.zw/api/v1/ecocash/lookup?callback_reference=ORDER-1001" \
  -H "Authorization: Bearer YOUR_SERVER_TOKEN"

The response data is the deposit object plus callback_url, payment_number (the payer's phone) and order_reference.

Statuserror_codeWhen
404PAYMENT_NOT_FOUNDNo EcoCash deposit of yours has this callback.
409More than one deposit matches.

Report a debit ​

EcoCash and InnBucks only. Use this when the payer shows you that money left their wallet, but the deposit is FAILED, EXPIRED or still PENDING. It asks Xash to trace the payment with the bank. If the money reached Xash, your wallet is credited.

POST /api/v1/{method}/poll/{payment}/report-debit

method is ecocash or innbucks.

Body ​

FieldTypeRequiredDescription
approval_referencestringYesThe approval code from the payer's confirmation SMS. Either the EcoCash form MP000000.0000.T00000, or 12 capital letters and digits.
notesstringNoAnything that helps the trace. Up to 500 characters.

Example ​

bash
curl -X POST https://app.xash.co.zw/api/v1/ecocash/poll/9001/report-debit \
  -H "Authorization: Bearer YOUR_SERVER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"approval_reference":"MP000000.0000.T00000","notes":"Customer has the SMS"}'

Response 202 ​

json
{
  "success": true,
  "message": "Thanks. We are checking this payment with the bank and will credit your wallet if the payment reached us.",
  "data": {
    "id": 9001,
    "status": "FAILED",
    "debit_reported": true,
    "debit_report_status": "checking"
  }
}

data is the full deposit object, shortened here. Follow debit_report_status by polling:

debit_report_statusMeaning
nullNo debit has been reported.
checkingThe trace is in progress.
creditedThe payment was found and your wallet was credited. status is now SUCCESS.
confirmed_failedThe bank confirmed that the payment did not go through.
closedThe report was closed without a credit.

Errors ​

StatusWhen
409The deposit was already credited.
422The deposit is more than 90 days old, or approval_reference is not in an accepted form.
404No such deposit of yours, or the method does not match.
429More than 5 reports in an hour.