Skip to content

Sandbox

Use the sandbox environment to test your integration without moving real money or triggering real M-Pesa flows.


Sandbox URL

https://staging.api.regini.finance/partner/v1

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:

{
  "status": "success",
  "message": "Deposit completed (sandbox)",
  "transaction_id": "3f8a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c"
}