Production readiness
Validate access, lifecycle handling, retries, webhooks, and reconciliation before you move real money with Roots.
Check these before you move real money. Each item can be exercised end to end on sandbox first.
1. Access and keys
- Create one API key per service, each with only the scopes that service calls. See Authentication.
- Store every key in a secret manager. A key is shown once, at creation.
- Practise rotation: create a replacement, deploy it, watch the old key's last-used time stop, then revoke it.
2. Lifecycle gates
Build an explicit check before each dependent action:
- Submit a review only when the file is complete. A
422review_not_readylists every gap at once; fix them all before resubmitting. - Wait for
person.review.completed, or read the person, before treating a business as cleared. A business review finishes asynchronously. - Open an account only after the owner's
statusisactive; earlier,POST /api/v1/accountsis refused with422person_review_not_cleared. Treat only anactiveaccount as able to send or receive money. A cleared review does not make an accountactive. - Pay only an
activecounterparty. Ablockedcounterparty cannot be named in a transfer. - Treat a
201fromPOST /api/v1/transfersas accepted, not settled. Wait for a terminalstatus. - Stop automated activity for a person whose
statusisinactive.
3. Retries and errors
- Send an
Idempotency-Keyon every create. Reuse it only to retry the same request with the same body; a different body under the same key is a409idempotency_key_conflict. See Idempotency. - A terminal transfer is never retried. Create a new transfer with a new key.
- Branch on error
codeandfailure.code, never ondetailorfailure.message. See Errors. - Log the
X-Request-IDresponse header with every call, and quote it to Roots support. - Retry
502and503with backoff, keeping the sameIdempotency-Key. Do not retry501.
4. Billing balance
Requests that can incur a fee, such as uploading a document, submitting a review, opening or changing an account, creating or changing a counterparty, or creating a transfer, are refused with 400 insufficient_billing_balance while your billing balance is below its minimum. Watch for the billing.balance.low webhook and keep the balance funded.
5. Webhooks
- Register endpoints in the Client Portal and subscribe to the events you act on. See Webhooks and events.
- Verify the
Roots-Signatureheader on every delivery before trusting the body. - Delivery is at least once. Store the event
idand skip any you have already processed. - Return a
2xxonly after you have recorded the event. A failure or timeout is retried on a bounded schedule. - Re-read the object before acting on an event that changes money or status.
6. Reconciliation
Link every Roots object to your own records. Set external_id on persons, and store each transfer's id with:
- Source and destination ids,
direction, andrail. amount_minorandcurrency, parsed as integers in minor units.- Every
statusandstatus_detailyou observe, withfailure.codeon a failure, and thesubmitted_at,settled_at,failed_at, andreturned_attimestamps.
Use available_minor, not current_minor, to decide whether funds can be spent. current_minor includes held value. CSV exports of persons, accounts, counterparties, transfers, and fees, and per-account statements, are available for reconciliation.
Go-live checklist
- Each service has its own scoped API key, stored in a secret manager, with a tested rotation.
- Your integration gates on person
status, accountstatus, counterpartystatus, and transferstatus. - Every create sends an
Idempotency-Key, and retries reuse it. - Errors are handled by
code, andX-Request-IDis logged. - Billing balance is funded and
billing.balance.lowis monitored. - Webhook signatures are verified and events are deduplicated by
id. - Balances and transfers reconcile against Roots ids and your
external_id. - Roots has confirmed production access for your client.
Updated 18 days ago