Skip to content

Sandbox & Test Mode

Rach CaaS provides a fully isolated sandbox environment for integration testing and CI/CD pipelines.


Overview

All B2B endpoints honour test-mode API keys (rach_sk_test_*). In sandbox mode:

  • Every operation returns an immediate success response (SANDBOX_SIMULATED)
  • No blockchain transactions are executed
  • No treasury balance is debited
  • Responses mirror the exact production schema so your integration code works without changes

Using Sandbox Keys

Generate a sandbox key from the Dashboard:

http
POST /v1/dashboard/apikeys
Authorization: Bearer <your-jwt>
Content-Type: application/json

{
  "mode": "test"
}

Then use the key in your B2B calls:

http
POST /v1/users/provision
X-API-Key: rach_sk_test_xxxxxxxxxxxxxxxx
Content-Type: application/json

{
  "phone_number": "+2250700000001"
}

Response:

json
{
  "wallet_address": "0x...",
  "blind_index": "abc123...",
  "status": "SANDBOX_SIMULATED",
  "created_at": "2026-06-25T12:00:00Z"
}

Sandbox Behaviour by Endpoint

EndpointSandbox Behaviour
POST /v1/users/provisionReturns deterministic SCW address, no on-chain deployment
POST /v1/users/fundReturns SANDBOX_SIMULATED, no USDC credited on-chain
GET /v1/users/balanceReturns "0.000000" — no on-chain call made
POST /v1/fx/quoteReturns a realistic locked-rate quote, valid for 60s
POST /v1/transfers/sendReturns SANDBOX_SIMULATED, no UserOp submitted
POST /v1/users/withdrawReturns withdrawal ID, no USDC swept, no local fiat disbursed

Test Credentials

For integration testing, use these example phone numbers (they will not conflict with production data):

Phone NumberUse
+2250700000001Sender / primary test user
+2250700000002Recipient / secondary test user

Phone numbers must always be in E.164 format (e.g. +2250700000001). URL-encode the + as %2B when used in query strings.


Switching to Production

  1. Generate a live API key: POST /v1/dashboard/apikeys with "mode": "live"
  2. Replace rach_sk_test_* with rach_sk_live_* in your configuration
  3. Ensure your treasury has a confirmed USDC balance before calling /v1/users/fund
  4. Monitor the paymaster gas tank — top up when it dips below the alert threshold

Rach Payments API