sk_test_ key.
How the sandbox differs from live
Test helpers
Test helpers are endpoints under/test that stand in for things a real bank, payee or scheduler would do. They exist only in the sandbox; on the live host they return 404 path_not_found. Each helper runs the same internal path the real event would, so it fires the same webhooks.
Fund a wallet
The
Idempotency-Key header is required, as on every request that moves money. The response is a deposit with rail: null, which marks a manual credit, and Infinity emits deposit.created.
A deposit doesn’t release payouts that are waiting for funds, in the sandbox or in live. They’re released by the daily release, which you trigger here with release payouts on hold.
Activate a payee
Skips hosted onboarding: Infinity adds a test bank account to the payee through the normal address path, and the payee becomesactive.
The test account uses the payee’s name as the account holder and
Sandbox Bank as the bank. Only payees in invited or details_pending can be activated; an active payee returns 409 payee_already_active, and a verifying or inactive payee returns 409 test_transition_not_allowed. The response is the payee with status: active, and Infinity emits payee.active.
Force a payout outcome
failure_codeis accepted only withto: failed. Allowed values areundeliverable(the default),refunded,refund_failed,canceledandprocessing_error.- A
202response returns the payout as it is at that moment. The new status lands asynchronously, usually within 2 seconds, through the same webhook path a real network status takes. Read it from the event or fromGET /payouts/{id}, exactly as you would in production. - Any other transition returns
409 test_transition_not_allowed. To cancel, use the regular cancel endpoint.
Release payouts on hold
In live, payouts on hold are released once a day at 09:00 IST. This helper runs that release immediately, for your account only:Response
Each payout that changes status emits its own events, as the daily release does.
Simulating a rejected bank account
Any account number ending in0000 passes format validation and is then rejected by the simulated network with 400 bank_details_invalid and param: null, which is how a real bank-side rejection appears.
Common test scenarios
A payout created before the payee is ready
A payout created before the payee is ready
- Create a payee without a bank account.
- Create a payout to them. It’s created as
awaiting_payeeand the amount is reserved in the wallet. - Activate the payee with the helper.
- Release payouts on hold. The payout moves to
pending, then topaid.
A bank return after payment
A bank return after payment
- Create a payout and wait for
payout.paid. - Advance it with
{ "to": "returned" }. - Handle
payout.returned, and the batch event that follows when the batch’s status changes.
A rejected bank account
A rejected bank account
- Create a payee.
- Add an address with an account number ending in
0000. - Handle
400 bank_details_invalidwithparam: null; the payee’s status doesn’t change.
Limitations
The helpers cover outcomes that occur after a payout is sent. Failures that occur while sending (below_minimum, bank_details_invalid, rate_changed, bank_account_missing) can’t be simulated yet. insufficient_funds occurs naturally when a wallet’s available balance is too low.