Before you begin
You need a sandbox secret key, which starts withsk_test_.
Sandbox keys are issued by our team. Contact us with your company name and we’ll set up your sandbox account and send you an sk_test_ key.
Export the key and the sandbox base URL so the examples can use them:
1
Find your wallet
Payouts are paid from a wallet, and every sandbox account starts with a USD wallet. List your wallets and note the A
id; you’ll pass it when you fund the wallet and when you pay.Response
401 with the code wrong_environment means the key is a live key; the sandbox only accepts sk_test_ keys.2
Fund the wallet
In live, you fund a wallet with a bank transfer to your funding address. The sandbox replaces that with a test deposit:The deposit is credited immediately, the wallet’s
available amount becomes 10000.00, and Infinity emits a deposit.created event.Two conventions show up here that apply across the API. Amounts are decimal strings, so values are never rounded through floating point. And any request that moves money requires an Idempotency-Key: if the request is retried with the same key, Infinity returns the original result instead of crediting twice. See Idempotency.3
Register a payee
A payee is anyone you pay. Create one with a name and an email address:
Response (abridged)
send_invite: false stops Infinity from emailing Maria, because you’ll submit her bank details yourself in the next step. reference holds your own identifier for her and is returned on every read and event. currency stays null until her bank account determines it.4
Add the payee's bank account
Maria banks in the Netherlands, so she is paid in EUR over SEPA. Submit her account as a payee address:Infinity validates the details against the SEPA rules and registers the account with the payout network. Maria’s status is now
Response (abridged)
active, which means payouts to her are sent immediately. Each currency and rail requires different fields; GET /bank-requirements returns them so your forms can stay in sync with the validation.5
Price the payout
A quote prices payouts exactly as a create would, without saving or reserving anything:With
Response
fee_bearer: account, you pay the fee on top: the wallet is debited USD 568.35, which is USD 558.35 converted at 0.8955 plus a USD 10.00 fee, and Maria receives exactly EUR 500.00. Rates aren’t locked, so the payout is priced again at the moment you create it.6
Create the payout
POST /payouts creates a batch of payouts in one call; here the batch holds a single payout. The Idempotency-Key is required:Response (abridged)
Idempotency-Key: you receive this same batch, and no second payout is created.7
Confirm it was paid
Sandbox payouts move to In production, don’t poll for status. Register a webhook endpoint and handle
processing after about 5 seconds and to paid after about 30. Retrieve the payout:Response (abridged)
payout.paid, payout.failed and payout.returned as they arrive.Simulate a failure
A paid payout can still be returned by the payee’s bank days later, and your integration needs to handle that. The sandbox can trigger it on demand:202 Accepted. Within a couple of seconds the payout moves to returned with failure_code: returned_by_bank, and Infinity emits payout.returned. Sandbox lists every outcome you can simulate.
Go live
Switch the key and the base URL; no other code changes:Next steps
Payouts
Statuses, payouts on hold, editing and failures.
Webhooks
Receive and verify events.