Your First Payout
This is the one payout test to run before any other. It sends a single mobile money payout all the way to COMPLETED and proves four things at once: your credentials work, you can reach the API, your request shape is accepted, and you can read a final status back.
The example uses Kenya as the country and M-Pesa as the mobile network operator, which appear in the request as currency KES and operator mpesa. Substitute your own market from Supported Destinations if you prefer; the steps do not change.
This page is a test procedure. For field-by-field reference, see Single Payouts and Mobile Wallet.
Before you start
Your sandbox payout balance starts at zero, and a payout fails with insufficient funds if the balance can’t cover it. Ask your solutions engineer to fund it in each currency you want to test. Every successful payout draws the balance down, as it would in production.
Step 1 — Get an access token
POST /v1/auth/oauth2/token — API reference
Pass: a 200 with an access_token. Tokens last 24 hours and there is no refresh token — request a new one when it expires.
If this fails: a 401 means the client_id or client_secret is wrong. A 400 usually means the body was form-encoded; it must be JSON. See Authentication.
Step 2 — Initiate the payout
POST /v1/payout/initiate — API reference
Pass: a 201 with a transactionId and a status of PENDING. Keep the transactionId — the next call needs it.
A few things worth getting right the first time:
minorAmountis in minor units.500000KES is KSh 5,000.00, butUGX,XAFandXOFhave no minor unit, so the same500000is 500,000 whole units.- The phone number isn’t a trigger.
254712345678ends in78, so this payout will succeed. Payout outcomes are picked by the last two digits of the destination — see Payout Trigger Endings. - Kenya needs the full
senderobject. Other markets need less. See Kenya.
If this fails: a 422 means a field is missing or invalid, most often on sender. Check the error message for the field. A 409 Conflict means you’ve used that merchantReference before. References can never be reused, so change it on every run.
Step 3 — Poll to a final status
GET /v1/payout/{transactionId} — API reference
You may see PENDING or PROCESSING first while CrissCross screens the payout and sends it. Poll every few seconds until it completes:
Pass: status reaches COMPLETED and a processorReference is present.
Stop polling at COMPLETED, FAILED or CANCELLED. If it’s FAILED with an insufficient funds message, your sandbox balance is too low — see Before you start.
What you have just proved
You’ve now proved the happy path. The rest of this section covers failures and account validation.
Next
- Set up a webhook endpoint, subscribe to the
payout.*events, and re-run this test. Webhooks are the source of truth for a payout’s final status. See Testing Webhooks for how to inspect and resend deliveries. - Change the last two digits of the phone number to produce failures, using Payout Trigger Endings.
- If you validate accounts before paying out, work through Verification Sandbox Testing.