Skip to main content
Development uses real phones and real prompts (up to KES 100 each), so you test the same paths your customers will take. Run these with an sk_test_ key and a phone you hold.

Scenarios

Need a sign-in code for a test account? Request it as usual; in Development the SMS isn’t sent, and 123456 is accepted for any code you have requested.

Go-live checklist

1

Business approved

Your business is approved for Production and the dashboard’s environment switcher offers Production. See Going live.
2

A live key, stored as a secret

Create an sk_live_ key with only the scopes you use (usually read and collect, plus disburse for payouts). Put it in your secret manager, never in code or a client app.
3

Your code checks the environment

Every response carries X-CloudPay-Environment. Fail loudly if production code ever sees test, or a test system sees live.
4

Idempotency keys come from your records

Order, invoice or payroll-line IDs, never a fresh random value per attempt. Scenarios 5, 6 and 12 pass.
5

Polling runs in the background

A job checks initiated/pending payments until completed or failed, with backoff, and review is treated as “not final yet”.
6

Errors are handled by code

You branch on errors.code, retry only 429, 5xx and network errors with the same key, and log the X-Request-Id response header so Cloudpay support can find the request. See Errors.
7

Rail matches your customers

GET /v1/merchants/{id}/rails on the live key shows the provider and networks you expect (scenario 8).
8

One small live payment

Send KES 10 to your own phone with the live key and see it completed and on your statement. Then you’re live.