Test scenarios

What sandbox simulates, the test values that drive compliance outcomes, and the scenarios to cover before production.

Sandbox, at https://api.sandbox.roots.finance, runs the same API as production against simulated banking and compliance providers. It moves no real money. Use test data only.

What sandbox simulates

AreaSandbox behaviour
Banking providerSimulated. Accounts are opened and given a bank account number without a real bank.
Withdrawals (ach)Simulated. The bank accepts a submitted withdrawal and settles it about three seconds later; follow the transfer to its terminal state through webhooks. To see it fail instead, call POST /api/v1/sandbox/transfers/{transfer_id}/fail as soon as it is submitted.
Internal transfersThe create response returns the transfer pending. It moves to submitted and stays there until you settle it with POST /api/v1/sandbox/transfers/{transfer_id}/settle; follow it through reads or webhooks.
Bank outcomesPOST /api/v1/sandbox/transfers/{transfer_id}/settle or .../fail (scope transfers:create) has the bank answer a submitted withdrawal or internal transfer, and returns 202 with the transfer_id and outcome. An internal transfer can only settle, and a deposit cannot be answered; both return 409. Poll GET /api/v1/transfers/{transfer_id} for the new status.
Sandbox routesPOST /api/v1/sandbox/transfers/{transfer_id}/settle, .../fail and .../return have the bank answer a transfer you created; POST /api/v1/sandbox/deposits funds an account; POST /api/v1/sandbox/persons/{person_id}/review decides a referred review. They exist in sandbox only. Deposit, settle, fail and return need the transfers:create scope; the review decision needs persons:review.
Compliance screeningSimulated. Individuals and counterparties are screened instantly; the result is cleared unless a test value below says otherwise. Transfers are not screened in sandbox, and no payment policy applies. See Holds and restrictions.
DepositsPOST /api/v1/sandbox/deposits (scope transfers:create) with {"account_id": "acct_...", "amount_minor": "125000"} and an optional sender_name simulates an inbound ach deposit to one of your accounts and returns 202 with the id of the transfer it will be recorded under. Poll GET /api/v1/transfers/{transfer_id} until it appears; it settles and the account's available_minor grows. Every call is a new deposit.
Billing top-upPOST /api/v1/sandbox/billing/deposits with {"amount_minor": "150000"} (scope transfers:create) books a simulated deposit into your billing balance. Every new client starts below the billing minimum, so top up before uploading documents or submitting reviews.
WebhooksDelivered to your registered endpoints, signed as in production, on a short retry schedule. See Webhooks and events.

Test values

Put a marker in a name to drive a non-clear compliance outcome. Matching is case-insensitive and the marker can appear anywhere in the name.

MarkerWhereResult
SANCTIONED-TESTAn individual person's details.first_name or details.last_name, or a business's details.business_name, then POST /persons/{person_id}/review/submitThe review is denied: status is inactive, status_detail is review_denied, and the person cannot own an account. A denied review cannot be decided with POST /api/v1/sandbox/persons/{person_id}/review (409).
SANCTIONED-TESTA counterparty's counterparty_information.business_name, first_name, or last_name on POST /counterpartiesScreening rejects it: the counterparty status is blocked and status_detail is screening_rejected. A transfer to it is refused.
SANCTIONED-TESTsender_name on POST /api/v1/sandbox/depositsScreening holds the deposit: it stays pending with status_detail awaiting_release and the money does not reach available_minor.
REFERRED-TESTA person's name or a business's legal nameThe review is referred to Roots: status stays pending until you decide it with POST /api/v1/sandbox/persons/{person_id}/review and outcome cleared or denied. A person that is not awaiting that decision returns 409.
REFERRED-TESTA counterparty's nameThe counterparty is blocked with status_detail screening_pending. It cannot be decided in sandbox.
000111111116A counterparty's account numberA withdrawal to it is failed at submission with failure.code rail_rejected.
000222222227A counterparty's account numberA withdrawal to it is submitted, then failed with failure.code rail_rejected.
000333333335A counterparty's account numberA withdrawal to it is settled, then returned with ACH return code R03 and failure.code invalid_bank_details.
13An internal transfer's amount_minor ($0.13)The transfer is declined: status failed, failure.code payment_failed.

Any name without a marker clears.

ℹ️

A business review is asynchronous. POST /persons/{person_id}/review/submit on a business returns status pending with status_detail in_review, and the outcome arrives shortly after as a person.review.completed event. A business can be submitted only once every associated person's review has cleared, so in sandbox a business review ends cleared, with status active, unless its name carries REFERRED-TEST: it then stays pending until you decide it with POST /api/v1/sandbox/persons/{person_id}/review. Read the person to see where it stands.

Scenarios to cover

ScenarioWhat to verify
Individual onboardingCreate a person, upload documents, submit review; the response carries the outcome.
Business onboardingClear every associated person, then submit the business; you get pending with in_review and act on person.review.completed with status active.
FundingSimulate a deposit to an active account; you see the transfer settle and available_minor grow before you send a transfer.
Missing review dataSubmit a person with gaps; you get one 422 review_not_ready listing every missing requirement in violations.
Denied reviewUse SANCTIONED-TEST; your system stops onboarding and does not try to open an account, which would return 422 person_review_not_cleared.
Account activationOpen an account only for a person whose status is active. It starts pending and becomes active once its bank account is opened; you act on account.status.changed and never transact on a pending account.
Blocked counterpartyUse SANCTIONED-TEST; your system prevents transfers to a blocked counterparty.
Internal transferaccount → account with rail internal; settle it with POST /api/v1/sandbox/transfers/{transfer_id}/settle, and status reaches settled.
Withdrawalaccount → counterparty over ach; you follow pending → submitted → settled through webhooks.
Failed withdrawalAnswer a submitted withdrawal with POST /api/v1/sandbox/transfers/{transfer_id}/fail; you branch on failure.code, show failure.message, and create a new transfer with a new key if the transfer is still wanted.
Insufficient fundsSend more than the available balance; you handle 422 insufficient_funds and create a new transfer with a new key once funded.
Idempotent retryResend a create with the same Idempotency-Key and body; you get the original response. Change the body; you get 409 idempotency_key_conflict.
Concurrent transfersTwo transfers from one account at once; you handle 429 rate_limited, wait for Retry-After, and resend with the same Idempotency-Key.
Returned transferCall POST /api/v1/sandbox/transfers/{transfer_id}/return on a settled withdrawal or deposit, with an optional return_code (default R01); status becomes returned and you branch on failure.code. A returned withdrawal is credited back to its account, but its fee is not refunded; a returned deposit is taken back out of the account. Any other transfer returns 409, and a return_code that is not R plus two digits returns 422. See Track transfer status for the failure.code each return code maps to.
Account closeClosing an account with a balance returns 409 account_has_balance.
Webhook verificationVerify Roots-Signature, dedupe on the event id, and ignore events with "test": true where they would trigger real work.

Next steps


Did this page help you?