Errors

Every Roots API error is an RFC 9457 problem+json document with a stable machine-readable code.

Every error response is an RFC 9457 problem document, sent with Content-Type: application/problem+json. Branch on code, which is stable. detail is written for a person and its wording can change.

Error shape

{
  "type": "https://docs.roots.finance/docs/errors#account_has_balance",
  "title": "Conflict",
  "status": 409,
  "detail": "the account still holds a balance; move the funds out before closing it",
  "code": "account_has_balance",
  "instance": "/api/v1/accounts/acct_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d",
  "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736"
}
FieldMeaning
typeA link to the documentation of code. Branch on code, not on this URI's text.
titleShort summary of the status.
statusThe HTTP status code.
detailA sentence for a person to read.
codeStable error code. See the table below.
instanceThe path of the request that failed.
trace_idThe request's trace id. Quote it, with the X-Request-ID response header, when you contact support. Empty when no trace is active.
violationsPresent on 422 with code validation or review_not_ready: every failed field or requirement at once.

Each violation has a path (for example details.phone or documents.formation), a stable code, and, on field errors, a message:

{
  "type": "https://docs.roots.finance/docs/errors#validation",
  "title": "Validation Error",
  "status": 422,
  "detail": "body.amount_minor: Field required",
  "code": "validation",
  "instance": "/api/v1/transfers",
  "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
  "violations": [
    {"path": "amount_minor", "code": "missing", "message": "Field required"}
  ]
}

On 502 and 503, detail carries a reference instead of upstream details. Quote it, together with the X-Request-ID response header, when you contact support.

Error codes

codeHTTP statusMeaningWhat to do
internal_error500An unexpected error occurred on Roots' side.Retry later; quote the X-Request-ID if it persists.
validation400, 422A field is missing, malformed, or not acceptable. On 422, violations lists each one; on 400, detail names the problem.Fix the field and resend.
review_not_ready422The person is well-formed but has unmet review requirements, all listed in violations.Supply every listed requirement, then submit again.
person_review_not_cleared422An account can only be opened for a person whose review cleared (status active); this person's review is still in progress or was denied. No account was created.Wait for person.review.completed with a cleared review, then open the account.
unauthorized401The token is missing, expired, or invalid.Send a valid token.
permission_denied403Authenticated, but not permitted to perform this action.Use a token with the required permission.
operation_disabled403Roots has turned this operation off for every client, for example during an incident.Do not retry automatically. Try again later or contact support.
maker_checker_violation403The creator of a transfer cannot approve or reject it.Have a different user approve or reject.
not_found404No such resource or path. Ids of other clients read as this too.Check the id and the path.
method_not_allowed405The path exists but not for this HTTP method.Use the documented method.
conflict409The request conflicts with the resource's current state.Re-read the resource and decide again.
illegal_transition409The resource cannot move from its current status to the requested one.Check the allowed transitions.
idempotency_key_conflict409This Idempotency-Key was already used with a different request body, or by another user or API token of your client.Use a new key for a new request; resend the identical body for a retry.
idempotency_key_in_progress409The first request with this Idempotency-Key has not finished yet.Wait briefly, then resend the same key and body to receive its response.
idempotency_key_response_lost409The first request with this Idempotency-Key was processed, but its response could not be stored.Read the resource to see the result. Do not resend with a new key, or it may act twice.
account_not_active409The account is not active, so it cannot take part in this operation.Wait for or restore active, or use another account.
account_not_provisioned409The account has no bank account number yet.Retry once the account is active.
account_has_balance409The account still holds a balance, holds included, so it cannot be closed.Move the funds out, then close.
provisioning_in_progress409A bank account may still be opening behind this account, so it cannot be closed.Follow the remedy in detail, or wait for provisioning to finish.
multi_bank_move_unsupported409Your money is held at more than one bank, so a move between your revenue, billing balance and fraud reserve cannot run.Contact Roots to make the move.
backend_conflict409The payments backend reports a conflict with an earlier request.Re-read the transfer, then decide whether to create a new one.
transfer_not_cancelable409The transfer can never be cancelled: a deposit, an internal transfer, a wire already sent to the bank, or one the bank has refused to cancel or that has finished.Do not retry. Read cancelable on the transfer before offering a cancel.
transfer_cancel_unavailable409The transfer cannot be cancelled yet: it is still being created or being sent to the bank.Retry in a few seconds, or wait until cancelable is true.
insufficient_funds422The source account's available balance is below the amount.Fund the account, then create a new transfer with a new Idempotency-Key.
insufficient_billing_balance400Your billing balance is below its minimum, so a request that can incur a fee is refused.Top up your billing balance, or move revenue to billing, then retry.
customer_fee_not_chargeable422The fee markup would charge your customer on an event where their account is empty or absent.Keep the markup at zero for that event, or charge the customer on a deposit instead.
insufficient_revenue400The amount to move from revenue to billing exceeds your revenue balance.Move at most your revenue balance.
insufficient_fraud_reserve400Your fraud reserve is below the amount Roots requires, so a request that moves money is refused.Top up your fraud reserve by at least the shortfall in detail, or move revenue into it, then retry.
reserve_below_minimum400The move would take your billing balance or fraud reserve below its minimum.Move at most the amount above the minimum; detail says how much.
payload_too_large413The request body or uploaded file is over the size limit.Send a smaller one.
unsupported_media_type415The uploaded file type is not accepted.Upload a PDF, PNG, or JPEG.
rate_limited429Too many requests from your IP address, or the account or counterparty already has an operation in progress.Wait Retry-After seconds, then resend with the same Idempotency-Key and body. See Rate limits.
not_implemented501This feature is not implemented.Do not retry.
rail_not_supported501The requested payment rail is not supported.Use a supported rail.
rail_not_enabled409Roots supports the requested rail, but it is not enabled for this client.Use one of the rails enabled for the client, or ask Roots to enable this one.
backend_unavailable502The payments backend could not complete the request.Retry later; quote the reference in detail to support if it persists.
provider_bank_not_configured500Roots has not recorded the receiving bank for this account's provider, so the funding details cannot name where a wire should go.Contact Roots; this is a configuration gap on our side, not something to retry.
screening_in_progress409An earlier screening of this person or counterparty has not finished yet, so it can neither be replayed nor run again.Retry the same request shortly. This is not about the Idempotency-Key you sent.
service_unavailable503A service this request depends on is unavailable.Retry the same request later.

Errors and transfer outcomes

A transfer that is created and later fails is not an error response. POST /transfers returns 201, and the outcome arrives on the transfer as status, status_detail, and failure. See Track transfer status.

Retry safely

StatusRetry?
400, 401, 403, 404, 405, 413, 415, 422No. Fix the request first.
409No. Re-read the resource and decide again. idempotency_key_in_progress, transfer_cancel_unavailable and screening_in_progress are the exceptions: resend after a short wait, with the same key and body for idempotency_key_in_progress.
429, 502, 503Yes, after a wait. Reuse the same Idempotency-Key and body.
500Read the resource first: the outcome is unknown. If it did not take effect and the response carries X-Should-Retry: false, retry with a new Idempotency-Key; otherwise reuse the same key and body.
501No.

A timeout tells you nothing about whether the request took effect. Retry it with the same Idempotency-Key and the identical body; see Idempotency.

Next steps


Did this page help you?