Skip to main content
ReconLayer returns errors as JSON objects with a machine-readable error code and, in most cases, a human-readable message. Some errors add extra fields — issues for validation failures, or extra context fields for domain-specific conflicts.

Error envelope

string
required
Machine-readable error code. Stable — safe to branch on in client code. See the catalog below.
string
Human-readable description of what went wrong. Present on most errors; not guaranteed to be stable wording.
array
Present on invalid_request. Each item has a path (array of field-name segments locating the offending field) and a message.
object
Present on some errors with extra structured context (e.g. conflict details).
integer
Present on errors that proxy a failure from an upstream provider, indicating the upstream’s HTTP status.

Validation errors — 400 invalid_request

Request bodies and query strings are validated against the API’s schemas. A validation failure returns 400 with error: "invalid_request" and an issues array:
400 Invalid request body
Each issue’s path is the segment path to the offending field, with array indices and nested object keys decoded — for example ["amount", "currency"] for a nested field, or ["metadata", "0", "value"] for an array item.

Two special header-validation cases

Two specific missing-header conditions are surfaced with their own error codes instead of a generic invalid_request, because they’re common integration mistakes:
Returned by any write endpoint that requires Idempotency-Key when the header is absent. See Idempotency.
Returned when the request’s organization cannot be resolved from the credential or headers. See Authentication → Organization resolution.

Authentication and authorization errors

401 Missing credential
403 Signed-in session required
See Authentication for the full set of 401/403 cases.

Not found — 404 not_found

Requesting a resource (by ID) that doesn’t exist for your organization returns 404:
404 Payment intent not found
ReconLayer scopes lookups to your resolved organizationId — a resource that exists in a different organization is indistinguishable from one that doesn’t exist, and both return 404.

Conflicts — 409

409 responses indicate the request was understood but cannot be applied as-is, because of a conflict with existing state. ReconLayer uses several specific codes:
Returned by POST /v1/payment-intents when the externalReference already exists for your organization but the new request’s canonical fields (amounts, currencies, beneficiary, etc.) don’t match the stored payment intent. The response includes the conflicting fields:
See API Design Principles → Business-level uniqueness.
See Idempotency.
Retry after a short delay. See Idempotency.

Rate limiting — 429

Exceeding your organization’s request rate returns 429 with the standard @fastify/rate-limit error body and RateLimit-* / Retry-After headers. See Rate limits.

Server and upstream errors — 5xx

A 5xx response means the request may or may not have been applied. For write endpoints, retry with the same Idempotency-Key and the same body — ReconLayer will either replay the completed result or safely re-execute, never duplicate. See Idempotency.

Quick reference

Next steps