Errors
Every failure uses the same envelope. Switch on error.code, never on message: messages are for people and may change.
json
{
"error": {
"type": "conflict_error",
"code": "invalid_state_transition",
"message": "This release cannot be cancelled while it is executing.",
"param": null,
"request_id": "req_8f2c51d0",
"doc_url": "https://business.holdyn.io/docs/errors#invalid_state_transition",
"details": null,
"current_state": "executing",
"next_actions": []
}
}type, code, message, request_id, param, doc_url and details are always present; param, doc_url and details may be null. Some codes add fields of their own (listed in the tables below). The message never contains Stripe's raw text. Quote request_id when you contact support; it is also returned in the X-Request-ID response header.
Types#
| HTTP status | type |
|---|---|
| 400, 413, 422 | invalid_request_error |
| 401 | authentication_error |
| 403 | permission_error |
| 404 | not_found_error |
| 409 | conflict_error |
| 429 | rate_limit_error |
| 502 | processor_error |
| 503 | unavailable_error |
| 500, 504 | api_error |
Errors every request can get#
400 parameter_missing,parameter_invalid,parameter_unknown,invalid_json,unsupported_version,idempotency_key_invalid409 idempotency_key_reused,idempotency_in_progress429 rate_limited(withRetry-Afterandretry_after_seconds)500 internal_error503 b2b_unconfigured(withfeature),b2b_unavailable,idempotency_unavailable504 request_timeout: the API answers within 28 seconds (120 on uploads). Work that takes longer is asynchronous: you get a202and poll.
Unknown fields in a request body are rejected with parameter_unknown. Send null to clear an optional field.
Errors by credential#
| Credential | Errors |
|---|---|
| Signed-in member | 401 missing_credentials, invalid_session, session_expired, session_revoked, session_upgrade_required. 403 insufficient_permission, live_not_enabled, member_suspended, email_not_verified, tenant_suspended (on writes), tenant_rejected, tenant_offboarded. |
| API key | 401 missing_credentials, invalid_api_key, api_key_expired, api_key_not_active. 403 insufficient_scope, tenant_suspended (on writes). 400 mode_mismatch. |
| Participant portal | 401 missing_portal_session, invalid_session, portal_session_expired, portal_session_revoked. 403 insufficient_permission, tenant_suspended (on actions). Money-moving actions can also answer 403 otp_required and otp_locked. |
| Step-up routes | 403 step_up_required, mfa_enrollment_required, mfa_locked. |
| Upload routes | 400 file_missing, file_type_not_allowed, file_content_mismatch, too_many_files. 413 file_too_large. 503 upload_busy, b2b_storage_unconfigured. |
| Routes that can reach Stripe | 409 automation_paused, connection_missing, connection_unhealthy, connection_account_changed. 502 stripe_error. 503 stripe_unavailable, b2b_secrets_unconfigured, b2b_index_missing, record_unavailable. |
Handling errors#
- Retry on
429and5xxwith exponential backoff, using the sameIdempotency-Key. HonourRetry-After. - Do not retry other
4xxerrors unchanged. They will fail the same way. 409 invalid_state_transitioncarriescurrent_state, and oftennext_actions, so you can show what is possible instead of guessing.422 mandate_invalidcarries anerrorslist, each with acode, aparampath such ascollections[2].amountand amessage, so you can mark the field.
Error codes#
Each code below is an anchor, so https://…/docs/errors#invalid_state_transition opens the right row.
400 Bad request
| Code | Meaning | Extra fields |
|---|---|---|
| parameter_missing | a required field/header/query parameter is absent | param |
| parameter_invalid | wrong type, format, range or enum value | param, optional expected |
| parameter_unknown | field not accepted by this endpoint | param |
| invalid_json | body is not valid JSON | — |
| invalid_cursor | starting_after/ending_before id not in the list | param |
| invalid_expand | field not expandable here | param |
| invalid_setting | settings document violates the schema | param (dotted wire path), expected |
| metadata_invalid | metadata key/value rule broken (incl. a holdyn_ key) | param |
| mode_mismatch | X-Holdyn-Mode differs from the API key's mode | — |
| key_mode_mismatch | a pasted Stripe key/id does not match the connection mode | param |
| reason_required | a reason is mandatory for this change (gate switch-off, weakening, intervention…) | param |
| unsupported_version | Holdyn-Version not supported | supported_versions |
| idempotency_key_invalid | Idempotency-Key empty or > 255 chars | — |
| weak_password | password < 12 or > 128 chars, or equals the email | param |
| token_invalid | verification/reset/invitation/challenge/confirmation token unknown or already used | — |
| token_expired | that token expired | — |
| invalid_mfa_code | TOTP or backup code wrong (step-up, activate, disable, backup-code regeneration) | attempts_remaining |
| otp_invalid | portal email OTP wrong | attempts_remaining |
| microdeposits_mismatch | microdeposit amounts or descriptor code wrong | attempts_remaining |
| file_missing | upload route without a file | param |
| file_type_not_allowed | MIME or extension not allowed | param, allowed |
| file_content_mismatch | magic bytes do not match the declared type | param |
| too_many_files | more than one file part (uploads take exactly one file) | max_files: 1 |
| invalid_signature | inbound webhook (Stripe or email provider): signature missing or not verifying, body not raw, malformed or unknown connection id, unknown scope — one answer for all, so the route reveals nothing | — |
| missing_signature | LEGACY /webhook/stripe route only (unchanged); the new routes answer invalid_signature | — |
401 Not authenticated
| Code | Meaning | Extra fields |
|---|---|---|
| missing_credentials | no Authorization header on a tenant route | — |
| invalid_credentials | wrong email/password, unknown email, locked member or locked MFA (generic, no enumeration) | — |
| invalid_api_key | unknown or revoked API key | — |
| api_key_expired | API key past expires_at | expired_at |
| api_key_not_active | live write key still pending_activation (its change request is not approved yet) | activates_at (sole-approver rule) or null |
| invalid_session | JWT malformed, bad signature, or wrong kind for the route | — |
| session_expired | dashboard JWT expired | — |
| session_revoked | member tokenVersion or tenant sessionsVersion changed | — |
| session_upgrade_required | legacy account-subject JWT (no acct claim); log in again | — |
| invalid_mfa_code | wrong code at the MFA login step | attempts_remaining |
| mfa_challenge_expired | MFA login challenge expired, used or out of attempts | — |
| missing_access_token | POST /portal/session without X-Access-Token | — |
| invalid_access_token | unknown grant token | — |
| expired_access_token | grant past expires_at | request_link_available: true |
| revoked_access_token | grant revoked (by the tenant, a newer link, a contact change, member removal, offboarding) | request_link_available: true, details.revoked_reason (the grant's revocation reason, e.g. contact_changed, superseded) |
| missing_portal_session | portal route without a portal session | — |
| portal_session_expired | portal JWT expired (30 min); refresh or re-exchange | — |
| portal_session_revoked | grant revoked/expired since the session was minted | request_link_available: true, details.revoked_reason (the grant's revocation reason; expired when the grant expired) |
| device_mismatch | legacy transaction grants only: IP/UA binding mismatch | request_link_available: true |
| exhausted_access_token | legacy transaction grants only: max_uses reached | — |
403 Not permitted
| Code | Meaning | Extra fields |
|---|---|---|
| insufficient_permission | member role / grant lacks the permission | required_permission |
| insufficient_scope | API key lacks the scope, or the route has no API scope | required_scope (or null) |
| scope_ceiling_exceeded | a LIVE key's requested scopes exceed the creator's role ceiling | allowed_scopes |
| live_not_enabled | live mode requested but the tenant is not live-enabled (also: creating a live API key) | missing (live prerequisite codes) |
| mfa_enrollment_required | the member must enrol TOTP before this live action | — |
| step_up_required | a fresh MFA step-up (≤ 15 min) is required | step_up_window_seconds: 900 |
| mfa_locked | ≥ 10 MFA failures in 24 h: step-up and MFA changes locked for 1 h | available_at |
| tenant_suspended | tenant suspended: reads and exports only | — |
| tenant_rejected | tenant application rejected (after a correct password) | — |
| tenant_offboarded | tenant offboarded | — |
| email_not_verified | member must verify the email first (after a correct password) | — |
| member_suspended | member suspended (after a correct password / on every request) | — |
| legacy_api_disabled | legacy /transactions API refused: the flag is false, OR the tenant has a Stripe connection in any mode | reason: flag_off · tenant_connected |
| otp_required | a money-moving portal action needs an emailed code | otp_endpoint: "/api/v1/b2b/portal/otp/send", reason: tenant_setting · tenant_delivered_link, email_hint (masked verified address) |
| otp_locked | codes locked for this party and mandate after ≥ 10 failed verifies in 24 h | locked_until |
| tenant_delivered_links_disabled | a URL-returning grant was requested in live while portal.tenant_delivers_links is off | — |
404 Not found
| Code | Meaning | Extra fields |
|---|---|---|
| resource_missing | object does not exist for this tenant and mode (also every cross-tenant / cross-mode id, and in the portal every object of another mandate or, for party-owned objects, of the other party) | — |
| unrecognized_request_url | unknown B2B route (and every test helper in live mode) | — |
| not_found | public branding/logo of a tenant that is not approved or live_enabled, unknown receipt verify token | — |
409 Conflict
| Code | Meaning | Extra fields |
|---|---|---|
| invalid_state_transition | action not allowed from the object's current state | current_state, next_actions |
| idempotency_key_reused | same key, different route or body (or, until release N+1, another actor of the tenant) | — |
| idempotency_in_progress | same key still running | retry_after_seconds |
| same_member_not_allowed | dual control: the approver equals the initiator, recorder, reviewer, uploader (or the key's creator), an earlier approver, or the member a role grant is for | excluded_reason: initiator · recorder · confirmer · reviewer · uploader · key_creator · earlier_approver · override_initiator · subject |
| approver_cooling | the member's approver-capable role is younger than security.new_approver_cooling_hours and they would be the SECOND actor of a live dual-control action | available_at |
| same_admin_not_allowed | admin dual control violated | — |
| use_engine_route | a legacy admin route (/accounts/:id/suspend, /access-tokens/:id/revoke) reached an engine-managed tenant or grant whose change needs the engine route and its dual control | — |
| condition_not_overridable | condition is system, an approval condition, or overridable: false in the terms/controls | condition |
| condition_not_failing | override requested for a condition that is not fail (or pending for time holds) | condition |
| override_pending | an open override already covers one of these conditions on this release | override |
| terms_changed | terms_hash sent does not match the version awaiting acceptance | terms_hash (current) |
| nothing_to_accept | no version awaits this party's acceptance | — |
| retry_not_allowed | NACHA/retry policy forbids this attempt now (also: a refund retry for a non-transient failure) | reason, next_allowed_at |
| dispute_already_open | a live dispute already covers this stage | dispute |
| open_dispute_required | cancellation basis external_outcome needs an OPEN dispute on the mandate | — |
| outcome_not_feasible | refund/release plan cannot be executed as proposed (at proposal, acceptance or execution) | alternatives, warnings, stranded_amount |
| confirmation_pending | an external outcome or a cancellation basis waits for a second member or for its notice period | confirmation_status: awaiting_confirmation · notice_period; execute_after (null while awaiting confirmation) |
| collection_in_flight | before_collection cancellation lost to a collection attempt (use mutual_agreement), or another operation needs every attempt resolved first | collection |
| change_request_limit_reached | approvals.max_change_requests_per_stage used: the payer can only approve or raise a dispute | limit |
| awaiting_payee_onboarding | payer payment setup blocked until the payee is ready for on-behalf-of | payee_ready_for_on_behalf_of: false |
| invitation_invalidated | at accept: the inviter is no longer active or may no longer grant the role, or (live-enabled tenant) an admin/finance invitation has no approved role_grant; at resend: the latter | — |
| connection_exists | a connected or connecting row already exists for this mode (use rotate) | connection |
| connection_missing | no active Stripe connection for this mode | mode |
| connection_unhealthy | the connection cannot be used now | health, health_reason |
| connection_has_open_mandates | disconnect refused while non-terminal mandates exist (an owner may acknowledge) | open_mandates (count) |
| connection_has_money_in_flight | disconnect refused while money is in flight (no override) | in_flight: {collections, refunds, releases, processor_disputes} |
| connection_account_changed | the connection's proven Stripe account differs from the one non-terminal mandates were sent on; on connect an owner may force it | open_mandates, account_id |
| publishable_key_unverified | portal payment setup blocked until the pk_ pair check passed | — |
| stripe_webhook_limit | POST /connections/:mode/rotate-webhook-secrets needs 2 free webhook endpoint slots on the tenant's Stripe account (connect and probe report the same code asynchronously) | free_slots |
| email_in_use | the email already has a B2B login (one login per email across tenants) | — |
| member_exists | the email is already a member of this tenant | member |
| invitation_exists | a pending invitation for this email exists (resend it) | invitation |
| last_owner | the last active owner cannot be removed, demoted or suspended | — |
| mfa_already_enabled | MFA state precondition | — |
| mfa_not_enabled | MFA state precondition | — |
| amendment_touches_locked_item | the amendment changes a collection/stage that is already settled, processing, triggered or past open | param |
| amendment_pending | another terms version is already awaiting acceptance | version |
| party_has_open_mandates | erase refused while a non-terminal mandate references the party | open_mandates |
| contact_change_pending | a party contact-email change already awaits the party's confirmation (cancel it first) | pending_email (masked) |
| payee_account_exists | the payee already has a connected account | stripe_account_id |
| payee_account_in_terms | re-linking a payee whose account is named in an accepted terms version needs an amendment | mandates |
| preset_not_installed | sandbox seed / template from a preset that is not installed | preset |
| preset_conflicts_unacknowledged | preset install would overwrite current values the member did not acknowledge | conflicts: [{path, current, preset}] |
| template_not_published | mandate creation from a draft or archived template | template |
| template_key_exists | a template with this key already exists (create a new version instead) | template |
| settings_version_conflict | expected_version ≠ current settings version (also for controls) | current_version |
| change_request_pending | a change request of the same kind (and mandate / member / key) is already pending | change_request |
| external_reference_in_use | another party/mandate of this tenant+mode already uses the external reference | party or mandate |
| microdeposits_failed | microdeposit verification attempts exceeded or the 10-day window expired; set up the account again | — |
| compliance_acknowledgement_required | pack mode warn/block set, or a mandate sent, without the required acknowledgement | pack |
| automation_paused | Holdyn intervention or a platform brake pauses this operation | scope |
| payment_method_in_use | method backs a processing collection | collection |
| duplicate_file | the same file (sha256) is already on this stage | existing_evidence |
| fund_flow_locked | fund flow cannot change after the first collection attempt | — |
| webhook_endpoint_limit | max 10 endpoints per tenant per mode | — |
| dashboard_link_unavailable | the payee's Stripe dashboard link cannot be minted (Login links permission missing, account not Express, or not onboarded) | reason |
| live_prerequisites_missing | admin enable-live with missing prerequisites | missing |
| cancellation_pending | a cancellation request already awaits acceptance or confirmation | cancellation |
| outcome_in_progress | a new dispute agreement while the agreed outcome still moves money (an outcome refund or release in flight); also next_actions[].blocked_reason of propose_outcome | refund, release (ids or null) |
| funds_unavailable | the money a refund or reservation needs is no longer held on the payment; nothing was booked | refund, amount |
| dispute_resolving | cancel while an agreed dispute outcome is being carried out on the mandate | dispute |
422 Cannot be processed
| Code | Meaning | Extra fields |
|---|---|---|
| mandate_invalid | schedule/terms validation failed | errors: [{code, param, message}], warnings |
| template_invalid | template body validation failed | errors, warnings |
| compliance_blocked | a pack in block mode has violations without exemption | violations: [{pack, rule, detail}] |
| evidence_incomplete | stage submit without the required evidence | missing: [{type, required, present}] |
| consent_missing | acceptance without every required consent | missing_consents (ids; the same list in details.missing_consents) |
| fund_flow_unavailable | fund flow not available on this connection (direct_charge always; hold_and_transfer in live without payout protection) | fund_flow, reasons |
| override_out_of_bounds | per-mandate override outside tenant limits | param, limit |
| feature_not_available | P1/launch-cut feature, or a funding party other than the payer | feature |
| payee_account_not_connected | the acct_ is not a connected account of the tenant's platform | — |
| payee_country_unsupported | payees must be in the US at launch | country |
| connect_platform_not_ready | the tenant's Stripe Connect platform profile is not usable, so a payee account cannot be created | guidance_url |
| payment_method_not_usable | method not active, not the grant's party's, scoped to another mandate, or a card without backup consent | reason |
| reversal_basis_required | a transfer reversal without a valid basis, or an amount above what the basis allows | basis, max_amount |
| reschedule_notice_too_short | a reschedule would move a debit earlier with less than 7 days' notice | collection, earliest_debit_on |
| remainder_required | a cancellation strands money the plan cannot refund and names no remainder fate | stranded_amount |
| forum_not_in_terms | external outcome forum not listed in the accepted terms' external_forums | allowed_forums |
| default_rule_not_in_terms | cancellation basis default_rule but the terms say parties_agree (or the mandate is not defaulted) | — |
| setup_extension_limit | extend-setup above 60 days per call or 180 days in total | max_total_days |
| ai_refused | the model refused; nothing created | — |
| recollect_requires_payer | an external outcome names a re-collection: collecting again needs the payer's own debit authorisation (use a party settlement) | param (outcome.recollect) |
413 Too large
| Code | Meaning | Extra fields |
|---|---|---|
| file_too_large | Content-Length > 21 MB, or the file above its cap (20 MB evidence/documents, 512 KB logo) | max_bytes |
429 Rate limited
| Code | Meaning | Extra fields |
|---|---|---|
| rate_limited | rate limit exceeded | retry_after_seconds |
| ai_budget_exceeded | tenant daily AI budget used | retry_after_seconds |
502 Processor error
| Code | Meaning | Extra fields |
|---|---|---|
| stripe_error | Stripe refused a call (non-transient) | stripe_code, decline_code, stripe_request_id |
503 Unavailable
| Code | Meaning | Extra fields |
|---|---|---|
| stripe_unavailable | Stripe transient failure (429/5xx/network); retry with the same Idempotency-Key | retry_after_seconds |
| b2b_unconfigured | a required B2B secret is missing for this feature | feature |
| b2b_unavailable | the B2B router failed to load, or the engine is dark-launched (B2B_ENGINE_ENABLED=false) | — |
| b2b_index_missing | a money-critical unique index is missing; engine money writes fail closed | — |
| b2b_secrets_unconfigured | B2B_SECRETS_KEY missing/invalid (connect, rotate, webhook secrets, MFA enrolment) | — |
| b2b_public_url_unconfigured | B2B_PUBLIC_API_BASE_URL missing | — |
| b2b_storage_unconfigured | B2B S3 principal or bucket missing (no fallback to the consumer bucket) | — |
| upload_busy | the process upload semaphore is full | retry_after_seconds |
| billing_unconfigured | Holdyn billing Stripe key missing, or not of the mode the statement needs (admin issue-invoice; the billing client receives no call) | details.reason: key_missing · key_not_live · key_not_test |
| ai_unavailable | AI disabled (B2B_AI_ENABLED, key or tenant setting) | reason |
| record_unavailable | the record entry could not be appended/verified; no money call was made; retry | retry_after_seconds |
| idempotency_unavailable | idempotency store failed (fail closed) | — |
504 Timeout
| Code | Meaning | Extra fields |
|---|---|---|
| request_timeout | the B2B request timer fired (28 s; 120 s on uploads); the work may still finish — poll or retry with the same key | — |
501 Not implemented
| Code | Meaning | Extra fields |
|---|---|---|
| feature_not_available | W0 placeholder sub-router only, type api_error; never answered by a deployed P0 route (the inventory test fails on it). Production P1 routes answer 422 feature_not_available | feature |
500 Server error
| Code | Meaning | Extra fields |
|---|---|---|
| internal_error | unexpected | — |
| raw_body_missing | inbound webhook body was parsed before the route (mount-order regression) | — |
Background job codes (not HTTP)
| Code | Meaning | Extra fields |
|---|---|---|
| stripe_key_invalid | Stripe rejected the key. | — |
| account_mismatch | The key belongs to another Stripe account than the one pasted (or, on rotation, than the connection). The old key stays active. | — |
| stripe_account_in_use | Another tenant holds a proven active connection to this Stripe account and mode. | — |
| missing_permission | A required key permission is missing; the permissions are in details. | — |
| secrets_key_unavailable | Encryption of the key is unavailable on this deployment. | — |
