Developers
Developer portal
Documented REST APIs with idempotency, signed webhooks and a sandbox that never moves money.
Getting started
1. Sign in to the console as a Developer. 2. Open Developer Sandbox and pick a fictional institution. 3. Send POST https://switchx.in/api/v1/sandbox/transactions with an Idempotency-Key.
Authentication
Console sessions use httpOnly secure cookies. Server-to-server API keys are on the production readiness list. Privileged roles need TOTP MFA.
Request schema
{
"type": "P2P | P2M | COLLECT | REFUND | MANDATE",
"amount": "decimal string, max 2 dp",
"institution_id": "inst_paynest",
"payee_vpa": "name@sandbox",
"scenario": "success | declined | timeout | partner_error"
}Response schema
{
"transaction": { "id", "external_ref", "status", "response_code", "partner_id" },
"routing": { "selected", "rule", "eligible", "excluded", "trace" },
"events": [...], "sandbox": true
}Webhooks
Header SwitchX-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, t + '.' + body)>. Reject timestamps older than 5 minutes and event IDs you've already seen.
Error codes
VALIDATION_ERROR 422 · UNAUTHENTICATED 401 · FORBIDDEN 403 · NOT_FOUND 404 · IDEMPOTENCY_CONFLICT 409 · RATE_LIMITED 429. Responses: { error: { code, message }, correlation_id }.Idempotency
The same key with the same body replays the stored response (idempotent_replay: true). The same key with a different body returns 409 IDEMPOTENCY_CONFLICT.
Troubleshooting
Quote the X-Correlation-ID response header in support requests. SX91 means the outcome is unknown; call /transactions/{id}/status-check rather than retrying.API playground
Public health check. Sign in and open the Developer Sandbox to create transactions.