Sandbox
Every SACCO using this API automatically gets two kinds of credentials: a live one and a sandbox one. Use sandbox while you build your integration — it's the exact same API, same signing, same endpoints, but every account it touches is fake. No real member's balance is ever at risk.
How to tell which key you have
Sandbox keys are prefixed differently so you can never mix them up by accident:
| Live | Sandbox | |
|---|---|---|
| API key | pk_live_... |
pk_sandbox_... |
| API secret | sk_live_... |
sk_sandbox_... |
| Base URL | https://prodsacco.officeug.com |
https://sandboxsacco.officeug.com |
Headers, the signing formula, scopes, and error codes are identical regardless of which one you're using — but the host is not optional: a sandbox key only works on sandboxsacco.officeug.com, and a live key only on prodsacco.officeug.com. Presenting a key on the wrong host is rejected with INVALID_HOST before signature verification runs, whether or not the signature itself would have been valid. Switching from sandbox to production means changing both the key/secret pair and the base URL your requests target.
The fake test accounts
Every SACCO's sandbox comes pre-seeded with three accounts, ready to use immediately:
account_ref |
Status | Starting balance | Minimum balance | What it's for |
|---|---|---|---|---|
SANDBOX-001 |
active | 1,000,000 UGX | 0 | General testing — disburse, collect, check balance/statement freely. |
SANDBOX-002 |
active | 50,000 UGX | 20,000 UGX | Deliberately tight — collect more than 30,000 from this one to see a real COLLECTION_FAILED minimum-balance rejection. |
SANDBOX-003 |
closed | 0 | 0 | For Account Verification — balance/statement/disbursements/collections all return ACCOUNT_NOT_FOUND against this one (closed accounts don't resolve for those), but verify still finds it and reports account_status: "closed". |
Example
curl "https://sandboxsacco.officeug.com/api/partner/v1/accounts/SANDBOX-001/balance" \
-H "X-Api-Key: $SANDBOX_API_KEY" \
-H "X-Timestamp: $TIMESTAMP" \
-H "X-Signature: $SIGNATURE"Disbursements and collections against sandbox accounts behave exactly like real ones — balances actually move, a statement entry actually gets created, idempotency actually works, and a webhook you've configured will actually fire. The only thing that's fake is the account itself.
What's not simulated
Sandbox accounts don't model fixed-deposit lock periods — unlocked_balance always equals balance. If your integration specifically needs to test the locked-balance behavior, that still requires a real account on a live key.