Sandbox
Use the sandbox environment to test your integration without moving real money or triggering real M-Pesa flows.
Sandbox URL
The sandbox runs against a dedicated staging database — no data ever reaches the production database. Sandbox keys (rk_test_) are rejected by the production API (api.regini.com) as a hard safeguard.
API keys
| Key prefix | Environment | Base URL |
|---|---|---|
rk_live_<key> |
Production | https://api.regini.com/partner/v1 |
rk_test_<key> |
Sandbox | https://staging.api.regini.finance/partner/v1 |
Obtain keys from the Regini partner portal. Switching to production only requires replacing the key and base URL — no other code changes.
Behaviour
| Feature | Sandbox |
|---|---|
| Account provisioning | Fully functional — creates real records, wallet marked active immediately (no Turnkey sub-org) |
| Deposit | Creates a real transaction record and ledger credit. Status is completed immediately. No M-Pesa STK push. |
| Withdrawal | Creates a real transaction record and ledger debit. Status is completed immediately. No M-Pesa payout. Balance is checked — withdrawing more than the account holds returns INSUFFICIENT_BALANCE. |
| Balances | Accurate — GET /accounts/{id}/balance reflects all sandbox deposits minus withdrawals. |
| Transaction history | Fully queryable via GET /accounts/{id}/transactions and GET /transactions/{id}. |
| Webhooks | Not fired in sandbox mode. |
| Quote endpoints | Fully functional — rates are live market rates. |
Sandbox responses
Sandbox deposits and withdrawals return real transaction IDs (standard UUID format, not test_ prefixed), and the full transaction is visible in the transaction history: