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
| Area | Sandbox behaviour |
|---|---|
| Banking provider | Simulated. 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 transfers | The 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 outcomes | POST /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 routes | POST /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 screening | Simulated. 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. |
| Deposits | POST /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-up | POST /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. |
| Webhooks | Delivered 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.
| Marker | Where | Result |
|---|---|---|
SANCTIONED-TEST | An individual person's details.first_name or details.last_name, or a business's details.business_name, then POST /persons/{person_id}/review/submit | The 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-TEST | A counterparty's counterparty_information.business_name, first_name, or last_name on POST /counterparties | Screening rejects it: the counterparty status is blocked and status_detail is screening_rejected. A transfer to it is refused. |
SANCTIONED-TEST | sender_name on POST /api/v1/sandbox/deposits | Screening holds the deposit: it stays pending with status_detail awaiting_release and the money does not reach available_minor. |
REFERRED-TEST | A person's name or a business's legal name | The 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-TEST | A counterparty's name | The counterparty is blocked with status_detail screening_pending. It cannot be decided in sandbox. |
000111111116 | A counterparty's account number | A withdrawal to it is failed at submission with failure.code rail_rejected. |
000222222227 | A counterparty's account number | A withdrawal to it is submitted, then failed with failure.code rail_rejected. |
000333333335 | A counterparty's account number | A withdrawal to it is settled, then returned with ACH return code R03 and failure.code invalid_bank_details. |
13 | An 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/submiton a business returnsstatuspendingwithstatus_detailin_review, and the outcome arrives shortly after as aperson.review.completedevent. A business can be submitted only once every associated person's review has cleared, so in sandbox a business review ends cleared, withstatusactive, unless its name carriesREFERRED-TEST: it then stayspendinguntil you decide it withPOST /api/v1/sandbox/persons/{person_id}/review. Read the person to see where it stands.
Scenarios to cover
| Scenario | What to verify |
|---|---|
| Individual onboarding | Create a person, upload documents, submit review; the response carries the outcome. |
| Business onboarding | Clear every associated person, then submit the business; you get pending with in_review and act on person.review.completed with status active. |
| Funding | Simulate a deposit to an active account; you see the transfer settle and available_minor grow before you send a transfer. |
| Missing review data | Submit a person with gaps; you get one 422 review_not_ready listing every missing requirement in violations. |
| Denied review | Use SANCTIONED-TEST; your system stops onboarding and does not try to open an account, which would return 422 person_review_not_cleared. |
| Account activation | Open 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 counterparty | Use SANCTIONED-TEST; your system prevents transfers to a blocked counterparty. |
| Internal transfer | account → account with rail internal; settle it with POST /api/v1/sandbox/transfers/{transfer_id}/settle, and status reaches settled. |
| Withdrawal | account → counterparty over ach; you follow pending → submitted → settled through webhooks. |
| Failed withdrawal | Answer 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 funds | Send more than the available balance; you handle 422 insufficient_funds and create a new transfer with a new key once funded. |
| Idempotent retry | Resend a create with the same Idempotency-Key and body; you get the original response. Change the body; you get 409 idempotency_key_conflict. |
| Concurrent transfers | Two transfers from one account at once; you handle 429 rate_limited, wait for Retry-After, and resend with the same Idempotency-Key. |
| Returned transfer | Call 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 close | Closing an account with a balance returns 409 account_has_balance. |
| Webhook verification | Verify Roots-Signature, dedupe on the event id, and ignore events with "test": true where they would trigger real work. |
Next steps
- Run every test value at once with the Sandbox test scenarios folder of the Postman collection.
- Read Onboarding and review lifecycle for review outcomes.
- Read Track transfer status for transfer states and failure codes.
Updated 5 days ago