Getting started

Sandbox wallets and the test phone numbers.

Test mode is a full copy of Morzepay that uses sandbox money. Build and try everything there first: it uses the same API, the same fees and the same webhooks as live, and nothing you do can move real money.

How test mode works#

  • Test keys (mp_test_…) only see test wallets, and live keys only see live wallets.
  • Wallets, transactions, references, invoices and checkout sessions are fully separate, so the same reference can exist in both.
  • Every object, and every webhook, has livemode: false.
  • Fees are the same as live: the ones under Profile → Your fees.
  • Test invoices are numbered TEST-…. They and their receipts are really emailed, so use your own address while you try things out.

Test phone numbers#

Use these numbers to make the sandbox behave like a real customer:

NumberWhat happens
+256700000002The customer declines a collection, or the payout fails. Money held for a payout goes back to the wallet.
+256700000003Stays processing for about 60 seconds, then succeeds. Use it to test waiting, polling and webhooks.
+256700000004Not a registered mobile money number: refused straight away, and fails a phone number lookup.
Any other valid numberSucceeds straight away.

The rule of 5 payment requests per number every 10 minutes applies in test mode too, so you can test how you handle MSISDN_RATE_LIMITED. Test traffic never counts against your live limits.

Put money in a test wallet#

Test wallets start empty. To test payouts and transfers, first collect a payment into the wallet from any ordinary test number, for example UGX 100,000 from 0771234567.

Before you go live#

  • You handle success, failed and a slow processing for collections and payouts.
  • Your webhook endpoint checks signatures and ignores events it has seen before.
  • You retry safely with an Idempotency-Key, and handle DUPLICATE_REFERENCE.
  • You show customers a clear message for MSISDN_RATE_LIMITED and INSUFFICIENT_FUNDS.
  • Your live key with payout permission has an IP allowlist.