Skip to content

Adding funds ​

Your wallet is prepaid. These endpoints start a deposit from a mobile-money wallet, a card or a crypto address. When the payment is confirmed, the amount is added to your USD wallet.

They also work for collecting a payment from one of your customers: the money lands in your wallet, and you can then spend it on a purchase for them.

Methods ​

MethodHow the payer paysStart endpoint
EcoCashApproves a prompt on their Econet phone with their PIN.POST /api/v1/ecocash/pay
InnBucksPays a code in the InnBucks app or at a counter.POST /api/v1/innbucks/pay
OMariReceives a one-time code by SMS, which you submit.POST /api/v1/omari/pay
CardVisa or Mastercard, with 3-D Secure where the bank asks for it.POST /api/v1/card/pay
CryptoSends USDT on BEP20 to an address.POST /api/v1/crypto/pay

Any method can be switched off by Xash at any time. A start request for a method that is off answers 400 with a message saying so.

Bank transfers and cash are not available through the API. They are credited to your wallet by Xash staff. Write to [email protected] to arrange one.

How a deposit works ​

  1. Start it. You get a deposit id and a status of PENDING.
  2. The payer pays on their phone, in their app, or on a card page.
  3. Learn the result. Poll the deposit, or receive a callback, until status is final.

expires_at is normally 15 minutes after the start. It is Xash's own deadline, not a promise from the payment provider. The payer may still be able to pay after it (an InnBucks code, for example), and a deposit can stay open past it while Xash keeps checking with the provider.

Statuses ​

statusFinal?Meaning
PENDINGNoStarted. Waiting for the payer.
AWAITING_PAYMENTNoThe provider is waiting for the payer.
SUCCESSYesPaid. The amount is in your wallet.
FAILEDYes, unless a late payment is verifiedNo payment was seen: declined, cancelled or refused.
EXPIREDYes, unless a late payment is verifiedNo payment was seen in time.

FAILED and EXPIRED are not proof that the payer did not pay. If the payer pays late and Xash verifies that payment, the deposit moves to SUCCESS and your wallet is credited. A poll of a FAILED or EXPIRED deposit returns what Xash has stored; it does not ask the provider again.

So before you ask the payer to pay again:

  • Poll the original deposit once more, in case a late payment has been credited since.
  • Ask the payer whether money left their wallet. If it did, report the debit (EcoCash and InnBucks) instead of starting a new deposit.
  • If you still cannot tell whether the payer was debited, or the old prompt or code could still be paid, do not take a second payment. Keep the order on hold and write to [email protected] with the deposit id, so the original deposit is reconciled first.

Crypto deposits can also show MANUAL_REVIEW or another provider status in capitals while they are being confirmed. Treat anything that is not SUCCESS, FAILED or EXPIRED as "not final yet".

Common fields ​

Every start endpoint accepts these, in addition to its own:

FieldTypeRequiredDescription
amountnumberYesThe amount to add to your wallet, in USD. At least 0.1.
charge_currencystringNoUSD (default) or ZWG. The currency the payer is charged in. See Charging in ZWG.
callback_urlstringNoYour URL to be told when the deposit reaches a result. See Callbacks. poll_url is accepted as an old name for the same field.
request_idstringNoA UUID that makes the start safe to repeat. See Safe retries.

The deposit object ​

Start and poll responses return the deposit in data:

json
{
  "id": 9001,
  "amount": "5.00",
  "currency": "USD",
  "payment_method": "ecocash",
  "status": "PENDING",
  "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",
  "order_reference": "DEP_EXAMPLE001",
  "request_id": "00000000-0000-4000-8000-000000000001",
  "debit_reported": false,
  "debit_report_status": null,
  "status_message": "Check mobile to complete payment."
}
FieldDescription
idThe deposit id. Use it to poll.
amount, currencyWhat is added to your wallet. Always USD.
payment_methodecocash, innbucks, omari, card or crypto.
statusSee Statuses.
status_messageA sentence about the current state that you may show to the payer.
poll_urlThe full URL of the poll endpoint for this deposit.
expires_atWhen an unpaid deposit expires.
start_unconfirmedtrue when the provider never confirmed that the payment was started. The payer may still get a prompt and pay. Keep polling.
archived, reconciliation_requiredarchived is true for an old deposit that has been moved out of the active list. If reconciliation_required is also true, it never reached a final status and Xash must review it.
charge_amount, charge_currency, exchange_ratePresent when the deposit recorded what the payer is charged. See Charging in ZWG.
request_idYour idempotency key, when you sent one.
order_referenceEcoCash only. The reference of this deposit at the payment provider.
debit_reported, debit_report_statusEcoCash and InnBucks only. See Report a debit.
codeInnBucks only. The code the payer pays.
transactionReferenceOMari and others, when the provider returned one. OMari needs it for the confirm call.
redirect_htmlCard only, in the start response only. See Card.
gateway_reference, vendor_reference, instructions, paymentCrypto only. See Crypto.

When starting a deposit fails ​

Statuserror_codeMeaningWhat to do
400The method is switched off. message says so.Offer another method.
422The provider refused the request, for example an invalid number. message gives the reason. Nothing was started.Fix and start again.
409IDEMPOTENCY_CONFLICTThis request_id was already used with different details.This request_id already belongs to a deposit, which may have started. Repeat the original request with this key to get that deposit back, and check it. Use a new request_id only for a different payment.
500PAYMENT_START_UNCONFIRMEDUnknown. The request may have reached the provider. The payer may still get a prompt and pay.Do not start a second deposit. See After an unknown start.

A missing or invalid field answers 422 as a validation error.

Safe retries ​

Send a request_id (a UUID you generate) when you start a deposit. If the request times out and you send it again with the same request_id and the same details, no second payment is started. You get the first deposit back as it stands now, whatever its status.

Endpointrequest_id
POST /api/v1/ecocash/pay, POST /api/v1/omari/pay, POST /api/v1/innbucks/payHonoured when it is a UUID. A value that is not a UUID is ignored without an error.
POST /api/v1/payments/receiveHonoured for ecocash and omari, and must be a UUID (422 otherwise). Ignored for the other methods.
POST /api/v1/card/pay, POST /api/v1/crypto/payNot supported. A repeat starts a new deposit.

"The same details" means the same method, amount, charge currency and payer phone. Anything else answers 409 IDEMPOTENCY_CONFLICT.

The response echoes request_id when it was honoured. If the echo is missing, your key was ignored.

After an unknown start ​

After a 500 PAYMENT_START_UNCONFIRMED, or a start request that got no answer:

  • Your request_id is honoured there (see the table above): repeat the same request. You get the original deposit back, with the id to poll.
  • Anywhere else (card, crypto, InnBucks through POST /api/v1/payments/receive, or a start sent without a request_id): a repeat starts a second deposit, and the payer could pay both. Waiting does not settle the first attempt either: the payer may still pay it later. Before you start another, find out what happened to the first one. Ask the payer whether they got a prompt or a code, or paid. Check your wallet balance and history for the credit. For EcoCash, find the deposit by its callback. If you cannot tell, write to [email protected] before taking a second payment.

Callbacks ​

If you send a callback_url, Xash sends it a POST with a JSON body when the deposit succeeds, fails or expires. Crypto deposits also send one for each intermediate status.

json
{
  "id": 9001,
  "reference": "DEP_EXAMPLE001",
  "method": "ecocash",
  "status": "SUCCESS",
  "amount": "5.00",
  "currency": "USD",
  "status_message": "Payment successful",
  "gateway_reference": "EXAMPLE-GATEWAY-REF",
  "updated_at": "2026-11-19T08:17:42.000000Z",
  "charge_amount": 5,
  "charge_currency": "USD",
  "exchange_rate": null,
  "wallet_amount": 5,
  "wallet_currency": "USD"
}

Crypto callbacks add a crypto object with vendor_reference, gateway_reference, status, amount, token, chain, network, deposit_tx_hash, sweep_tx_hash and confirmations.

Rules for your endpoint:

  • The callback is not signed. Anyone who learns your URL can post to it. Treat a callback as a hint only, then confirm the result with the poll endpoint using your token before you act on it.
  • Answer a SUCCESS callback with any 2xx other than 202 to acknowledge it. Until you do, it is sent again, several times over a few hours.
  • A FAILED or EXPIRED callback is retried only when your endpoint answers 5xx or cannot be reached: up to 5 attempts, with waits from 30 seconds to 8 minutes. A 4xx answer is not retried.
  • You may receive the same callback more than once. Make your handler safe to repeat.
  • The URL must be http or https, with no username or password in it, and must not point to localhost or a private IP address.

Put your own order id in the URL (for example https://shop.example.com/hooks/xash?order=1001) so you can match the callback to an order.

Charging in ZWG ​

EcoCash, OMari and InnBucks can charge the payer in ZWG while your wallet is still credited in USD. Send "charge_currency": "ZWG". amount stays the USD amount to add to your wallet. The response tells you what the payer is charged:

json
{
  "charge_amount": "160.00",
  "charge_currency": "ZWG",
  "exchange_rate": 32
}

The rate is set by Xash and can change. Card deposits are USD only.

One endpoint for every method ​

POST /api/v1/payments/receive

Takes the same fields as the method-specific endpoints plus method (ecocash, innbucks, omari, card or crypto). Without method it starts an InnBucks deposit.

bash
curl -X POST https://app.xash.co.zw/api/v1/payments/receive \
  -H "Authorization: Bearer YOUR_SERVER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "ecocash",
    "amount": 5,
    "ecocash_phone": "0770000001",
    "request_id": "00000000-0000-4000-8000-000000000001",
    "callback_url": "https://shop.example.com/hooks/xash?order=1001"
  }'

The response is the same as for the method-specific endpoint.