Skip to main content
Every Modem Pay account has two separate worlds: test and live. You build and try everything in test mode. When it works, you switch your keys and go live. Your code doesn’t change.

What’s different in test mode

The mode comes from the key. A test key only ever sees test data. A live key only ever sees live data. If you get a 404 for something you know exists, check you’re using a key from the same mode. Use the Test mode switch in the dashboard to see your test data.

Try your integration

1

Take a test payment

Follow the Quickstart, or from your terminal:
2

Receive webhooks on your machine

Every test event is forwarded to your local server, signed exactly as in production. See Modem Pay CLI.
3

Test the unhappy paths

Cancel a payment, close the checkout, send a webhook your server rejects. Your system should handle each one.

Go-live checklist

Submit your business documents in the dashboard. You can’t take live payments until they’re approved. The dashboard shows exactly which documents are still missing.
Create a restricted live key for each system, with only the permissions it needs. Add IP allowlists for your servers, and payout limits on any key that can send money. See API keys.
Put live keys in environment variables or a secrets manager. Never in your code, your website or your mobile app.
Add your live webhook URL in the dashboard and store its signing secret. Live and test webhooks have different secrets. Check that your endpoint verifies signatures.
Don’t rely on the customer reaching your return_url. People close tabs. Fulfil orders when you receive charge.succeeded, or after verifying the payment on your server.
Send a unique Idempotency-Key with every payout so a retry can never pay twice.
Pay yourself 10 GMD on your live site and check the order, the webhook and your balance.
Data never moves between modes. Payment links, customers, coupons, sub-accounts and webhooks you made in test mode need to be created again in live mode.