Skip to content

Sandbox and test values

Phone numbers, amounts and accounts that force every payout outcome, test money, and simulating statuses.

The sandbox behaves like live, with the same endpoints, validation, limits, idempotency, events and webhooks, but no money moves and nothing reaches a payout network. Use a apk_test_ key. Every workspace has it from the start.

Test money

Test payouts are paid from a sandbox balance of free test USDC. Add up to 10,000 at a time with POST /api/v1/sandbox/faucet or the Console's Overview. A payout bigger than the balance fails with INSUFFICIENT_BALANCE, just as live.

Values that force an outcome

SendOutcomeTiming
+254700000001Succeeds: payout.succeededAbout 5 seconds
+254700000002Fails with RECIPIENT_INVALID; test USDC returnedAbout 5 seconds
+254700000003Held: payout.in_reviewAbout 5 seconds, then stays
+254700000004Succeeds, then reverses: payout.reversed; test USDC returnedAbout 5 seconds
amount 13300 (KES 133)Times out: fails with METHOD_UNAVAILABLEAbout 60 seconds
account_number 0000000000Bank or PayBill payout fails with RECIPIENT_INVALIDAbout 5 seconds
Anything elseSucceedsAbout 5 seconds

Every test payout goes pending → processing → its outcome, with a webhook at each step. Recipient checks resolve every number to JANE WANJIKU DOE except +254700000002, and every account except 0000000000.

Force a status yourself

To test a branch without waiting, move any test payout to the status you want with POST /api/v1/sandbox/payouts/:id/simulate:

curl -X POST "https://api.autopayke.com/api/v1/sandbox/payouts/po_…/simulate" \
  -H "Authorization: Bearer $AUTOPAYKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "outcome": "reversed" }'

What's different from live

  • The rate and fees are computed the same way but nothing is charged.
  • Banks come from a fixed list when the live list isn't reachable; codes look the same.
  • Transactions list your test payouts only.
  • Sandbox limits match the Starter plan's money limits, at 5 requests a second.
  • Test webhooks need a test endpoint; live events never go to test endpoints.

Test webhooks still need a public https URL. While developing, a tunnel such as ngrok or Cloudflare Tunnel to your laptop works.