Sandbox Guide

A guide to using the Avvio Sandbox environment, including deterministic scenario triggers, test funding, and webhook configuration.

The Avvio Sandbox environment provides deterministic simulation for every payment rail, failure condition, and webhook event.

Connecting to Sandbox

Use your test key (akid_test_...) and your server-side private P-256 key against the standard base URL:

  • Base URL: https://api.avvio.xyz/business/api/v1
  • Key Prefix: akid_test_*

Only the credential changes between Sandbox and Production. Endpoint paths, request bodies, and signature headers are identical.

Funding Your Test Balance

Fund your virtual USD balance using the Sandbox funding endpoint:

POST /payments/organizations/{orgId}/sandbox/fund
Idempotency-Key: <uuid>
Content-Type: application/json

{
  "amount": "10000.00"
}

Check your balance and ledger entries at any time:

GET /payments/organizations/{orgId}/balance
GET /payments/organizations/{orgId}/balance/history

Deterministic Account Suffixes

Select your desired payout test outcome by configuring the last four digits of the beneficiary account number:

Account SuffixSimulated OutcomeStatus ProgressionfailureCode
any other digitsNormal successful executionpendingprocessingcompleted
0001Invalid destination accountpendingprocessingfailedaccount_invalid
0002Delayed settlementpendingprocessingcompleted
0003Post-settlement bank returncompletedfailedreturned_by_bank
0004Sanctions / compliance blockpendingprocessingfailedcompliance_rejected
0005Quote expired before executionRequest rejected; no payout is created
0006Requires external wallet fundingStays pending until funding is confirmed, then processingcompleted
👍

Tip

Always run scenario 0003 in your test suite to ensure your accounting and ledger workers handle post-settlement reversals.

Sandbox Webhook Endpoints & Deliveries

When using the hosted Avvio API, register a publicly reachable HTTPS receiver
(a development tunnel is fine):

POST /payments/organizations/{orgId}/sandbox/webhook-endpoints
Idempotency-Key: <uuid>
Content-Type: application/json

{
  "url": "https://example.ngrok-free.app/api/webhooks",
  "events": ["payout.completed", "payout.failed", "payout.returned"]
}

http://localhost is accepted by the sandbox route only for a locally running
Avvio backend. A hosted backend resolves localhost to itself, not to your
laptop, so use a tunnel when testing against api.avvio.xyz.

Inspect recent deliveries and payload status codes:

GET /payments/organizations/{orgId}/sandbox/webhook-endpoints/ep_991823/deliveries

Did this page help you?