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:

  1. Submit a review only when the file is complete. A 422 review_not_ready lists every gap at once; fix them all before resubmitting.
  2. Wait for person.review.completed, or read the person, before treating a business as cleared. A business review finishes asynchronously.
  3. Open an account only after the owner's status is active; earlier, POST /api/v1/accounts is refused with 422 person_review_not_cleared. Treat only an active account as able to send or receive money. A cleared review does not make an account active.
  4. Pay only an active counterparty. A blocked counterparty cannot be named in a transfer.
  5. Treat a 201 from POST /api/v1/transfers as accepted, not settled. Wait for a terminal status.
  6. Stop automated activity for a person whose status is inactive.

3. Retries and errors

  • Send an Idempotency-Key on every create. Reuse it only to retry the same request with the same body; a different body under the same key is a 409 idempotency_key_conflict. See Idempotency.
  • A terminal transfer is never retried. Create a new transfer with a new key.
  • Branch on error code and failure.code, never on detail or failure.message. See Errors.
  • Log the X-Request-ID response header with every call, and quote it to Roots support.
  • Retry 502 and 503 with backoff, keeping the same Idempotency-Key. Do not retry 501.

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-Signature header on every delivery before trusting the body.
  • Delivery is at least once. Store the event id and skip any you have already processed.
  • Return a 2xx only 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, and rail.
  • amount_minor and currency, parsed as integers in minor units.
  • Every status and status_detail you observe, with failure.code on a failure, and the submitted_at, settled_at, failed_at, and returned_at timestamps.

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, account status, counterparty status, and transfer status.
  • Every create sends an Idempotency-Key, and retries reuse it.
  • Errors are handled by code, and X-Request-ID is logged.
  • Billing balance is funded and billing.balance.low is 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.

Did this page help you?