Skip to main content
This walkthrough takes you from credentials to a completed charge and payout in the sandbox. Every request goes to https://api.zerocash.tech.
Use your sandbox keys throughout. Sandbox and production share the same base URL — the credentials decide which environment you are in. See Environments.

Step 1 — Generate a bearer token

Exchange your public key and API key for a token.
Response
Send this token as Authorization: Bearer <token> on every request that follows. It expires at expiresAt (Unix seconds) — refresh against that value rather than assuming a fixed lifetime.

Step 2 — Collect a payment

Charge a customer’s mobile money wallet. For KES you only need the phone number; every other currency also needs a momoOperatorId from the mobile money operators list.
Response
This response means the request was accepted, not that money moved. The customer still has to approve the prompt. Do not fulfil the order yet.
externalReference is your own unique ID. Keep it unique per attempt — it is how you reconcile, and how you avoid double-charging on a retry.

Step 3 — Confirm the outcome

Money movement is asynchronous, so you confirm the result one of two ways.
Some charges come back with a stepRequired field before they reach a final status: Only release goods or credit an account once the status is successful.

Step 4 — Send a payout

Payouts use a single endpoint for every destination. The destination field and the shape of payoutMethod determine where the money goes.
Response
As with charges, this is an acknowledgement. Wait for the transaction_updated webhook — or poll the transaction — before you treat the payout as delivered.
In sandbox, account number 254712345678 always succeeds and 254787654321 always fails, so you can exercise both branches. Full list in Testing payouts.

Where to next

Choose a charge method

Compare mobile money, bank transfer, card, and OPay.

Payouts in depth

Every destination type, cross-currency debits, and saved beneficiaries.

Set up webhooks

Receive status changes instead of polling.

API reference

Full schemas and an interactive playground for all 32 endpoints.