Appearance
Deposit status
Poll a deposit
GET /api/v1/{method}/poll/{payment}
| Path part | Description |
|---|---|
method | ecocash, innbucks, omari, crypto or card. Must match the deposit's method. |
payment | The 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
statusisSUCCESS,FAILEDorEXPIRED. FAILEDandEXPIREDare not proof that no payment was made. A late payment that Xash verifies still moves the deposit toSUCCESS. 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
200for 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
SUCCESSquickly. - Stay inside the rate limit of 60 requests a minute.
Errors
| Status | error_code | When |
|---|---|---|
404 | PAYMENT_NOT_FOUND | No 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
| Query | Type | Required | Description |
|---|---|---|---|
callback_reference | string | Yes | The 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.
| Status | error_code | When |
|---|---|---|
404 | PAYMENT_NOT_FOUND | No EcoCash deposit of yours has this callback. |
409 | More 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
| Field | Type | Required | Description |
|---|---|---|---|
approval_reference | string | Yes | The approval code from the payer's confirmation SMS. Either the EcoCash form MP000000.0000.T00000, or 12 capital letters and digits. |
notes | string | No | Anything 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_status | Meaning |
|---|---|
null | No debit has been reported. |
checking | The trace is in progress. |
credited | The payment was found and your wallet was credited. status is now SUCCESS. |
confirmed_failed | The bank confirmed that the payment did not go through. |
closed | The report was closed without a credit. |
Errors
| Status | When |
|---|---|
409 | The deposit was already credited. |
422 | The deposit is more than 90 days old, or approval_reference is not in an accepted form. |
404 | No such deposit of yours, or the method does not match. |
429 | More than 5 reports in an hour. |