Skip to main content
Docs

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 statustype
400, 413, 422invalid_request_error
401authentication_error
403permission_error
404not_found_error
409conflict_error
429rate_limit_error
502processor_error
503unavailable_error
500, 504api_error

Errors every request can get#

  • 400 parameter_missing, parameter_invalid, parameter_unknown, invalid_json, unsupported_version, idempotency_key_invalid
  • 409 idempotency_key_reused, idempotency_in_progress
  • 429 rate_limited (with Retry-After and retry_after_seconds)
  • 500 internal_error
  • 503 b2b_unconfigured (with feature), b2b_unavailable, idempotency_unavailable
  • 504 request_timeout: the API answers within 28 seconds (120 on uploads). Work that takes longer is asynchronous: you get a 202 and poll.

Unknown fields in a request body are rejected with parameter_unknown. Send null to clear an optional field.

Errors by credential#

CredentialErrors
Signed-in member401 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 key401 missing_credentials, invalid_api_key, api_key_expired, api_key_not_active. 403 insufficient_scope, tenant_suspended (on writes). 400 mode_mismatch.
Participant portal401 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 routes403 step_up_required, mfa_enrollment_required, mfa_locked.
Upload routes400 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 Stripe409 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 429 and 5xx with exponential backoff, using the same Idempotency-Key. Honour Retry-After.
  • Do not retry other 4xx errors unchanged. They will fail the same way.
  • 409 invalid_state_transition carries current_state, and often next_actions, so you can show what is possible instead of guessing.
  • 422 mandate_invalid carries an errors list, each with a code, a param path such as collections[2].amount and a message, 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

Error codes with HTTP status 400
CodeMeaningExtra fields
parameter_missinga required field/header/query parameter is absentparam
parameter_invalidwrong type, format, range or enum valueparam, optional expected
parameter_unknownfield not accepted by this endpointparam
invalid_jsonbody is not valid JSON—
invalid_cursorstarting_after/ending_before id not in the listparam
invalid_expandfield not expandable hereparam
invalid_settingsettings document violates the schemaparam (dotted wire path), expected
metadata_invalidmetadata key/value rule broken (incl. a holdyn_ key)param
mode_mismatchX-Holdyn-Mode differs from the API key's mode—
key_mode_mismatcha pasted Stripe key/id does not match the connection modeparam
reason_requireda reason is mandatory for this change (gate switch-off, weakening, intervention…)param
unsupported_versionHoldyn-Version not supportedsupported_versions
idempotency_key_invalidIdempotency-Key empty or > 255 chars—
weak_passwordpassword < 12 or > 128 chars, or equals the emailparam
token_invalidverification/reset/invitation/challenge/confirmation token unknown or already used—
token_expiredthat token expired—
invalid_mfa_codeTOTP or backup code wrong (step-up, activate, disable, backup-code regeneration)attempts_remaining
otp_invalidportal email OTP wrongattempts_remaining
microdeposits_mismatchmicrodeposit amounts or descriptor code wrongattempts_remaining
file_missingupload route without a fileparam
file_type_not_allowedMIME or extension not allowedparam, allowed
file_content_mismatchmagic bytes do not match the declared typeparam
too_many_filesmore than one file part (uploads take exactly one file)max_files: 1
invalid_signatureinbound 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_signatureLEGACY /webhook/stripe route only (unchanged); the new routes answer invalid_signature—

401 Not authenticated

Error codes with HTTP status 401
CodeMeaningExtra fields
missing_credentialsno Authorization header on a tenant route—
invalid_credentialswrong email/password, unknown email, locked member or locked MFA (generic, no enumeration)—
invalid_api_keyunknown or revoked API key—
api_key_expiredAPI key past expires_atexpired_at
api_key_not_activelive write key still pending_activation (its change request is not approved yet)activates_at (sole-approver rule) or null
invalid_sessionJWT malformed, bad signature, or wrong kind for the route—
session_expireddashboard JWT expired—
session_revokedmember tokenVersion or tenant sessionsVersion changed—
session_upgrade_requiredlegacy account-subject JWT (no acct claim); log in again—
invalid_mfa_codewrong code at the MFA login stepattempts_remaining
mfa_challenge_expiredMFA login challenge expired, used or out of attempts—
missing_access_tokenPOST /portal/session without X-Access-Token—
invalid_access_tokenunknown grant token—
expired_access_tokengrant past expires_atrequest_link_available: true
revoked_access_tokengrant 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_sessionportal route without a portal session—
portal_session_expiredportal JWT expired (30 min); refresh or re-exchange—
portal_session_revokedgrant revoked/expired since the session was mintedrequest_link_available: true, details.revoked_reason (the grant's revocation reason; expired when the grant expired)
device_mismatchlegacy transaction grants only: IP/UA binding mismatchrequest_link_available: true
exhausted_access_tokenlegacy transaction grants only: max_uses reached—

403 Not permitted

Error codes with HTTP status 403
CodeMeaningExtra fields
insufficient_permissionmember role / grant lacks the permissionrequired_permission
insufficient_scopeAPI key lacks the scope, or the route has no API scoperequired_scope (or null)
scope_ceiling_exceededa LIVE key's requested scopes exceed the creator's role ceilingallowed_scopes
live_not_enabledlive mode requested but the tenant is not live-enabled (also: creating a live API key)missing (live prerequisite codes)
mfa_enrollment_requiredthe member must enrol TOTP before this live action—
step_up_requireda fresh MFA step-up (≤ 15 min) is requiredstep_up_window_seconds: 900
mfa_locked≥ 10 MFA failures in 24 h: step-up and MFA changes locked for 1 havailable_at
tenant_suspendedtenant suspended: reads and exports only—
tenant_rejectedtenant application rejected (after a correct password)—
tenant_offboardedtenant offboarded—
email_not_verifiedmember must verify the email first (after a correct password)—
member_suspendedmember suspended (after a correct password / on every request)—
legacy_api_disabledlegacy /transactions API refused: the flag is false, OR the tenant has a Stripe connection in any modereason: flag_off · tenant_connected
otp_requireda money-moving portal action needs an emailed codeotp_endpoint: "/api/v1/b2b/portal/otp/send", reason: tenant_setting · tenant_delivered_link, email_hint (masked verified address)
otp_lockedcodes locked for this party and mandate after ≥ 10 failed verifies in 24 hlocked_until

404 Not found

Error codes with HTTP status 404
CodeMeaningExtra fields
resource_missingobject 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_urlunknown B2B route (and every test helper in live mode)—
not_foundpublic branding/logo of a tenant that is not approved or live_enabled, unknown receipt verify token—

409 Conflict

Error codes with HTTP status 409
CodeMeaningExtra fields
invalid_state_transitionaction not allowed from the object's current statecurrent_state, next_actions
idempotency_key_reusedsame key, different route or body (or, until release N+1, another actor of the tenant)—
idempotency_in_progresssame key still runningretry_after_seconds
same_member_not_alloweddual control: the approver equals the initiator, recorder, reviewer, uploader (or the key's creator), an earlier approver, or the member a role grant is forexcluded_reason: initiator · recorder · confirmer · reviewer · uploader · key_creator · earlier_approver · override_initiator · subject
approver_coolingthe 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 actionavailable_at
same_admin_not_allowedadmin dual control violated—
use_engine_routea 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_overridablecondition is system, an approval condition, or overridable: false in the terms/controlscondition
condition_not_failingoverride requested for a condition that is not fail (or pending for time holds)condition
override_pendingan open override already covers one of these conditions on this releaseoverride
terms_changedterms_hash sent does not match the version awaiting acceptanceterms_hash (current)
nothing_to_acceptno version awaits this party's acceptance—
retry_not_allowedNACHA/retry policy forbids this attempt now (also: a refund retry for a non-transient failure)reason, next_allowed_at
dispute_already_opena live dispute already covers this stagedispute
open_dispute_requiredcancellation basis external_outcome needs an OPEN dispute on the mandate—
outcome_not_feasiblerefund/release plan cannot be executed as proposed (at proposal, acceptance or execution)alternatives, warnings, stranded_amount
confirmation_pendingan external outcome or a cancellation basis waits for a second member or for its notice periodconfirmation_status: awaiting_confirmation · notice_period; execute_after (null while awaiting confirmation)
collection_in_flightbefore_collection cancellation lost to a collection attempt (use mutual_agreement), or another operation needs every attempt resolved firstcollection
change_request_limit_reachedapprovals.max_change_requests_per_stage used: the payer can only approve or raise a disputelimit
awaiting_payee_onboardingpayer payment setup blocked until the payee is ready for on-behalf-ofpayee_ready_for_on_behalf_of: false
invitation_invalidatedat 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_existsa connected or connecting row already exists for this mode (use rotate)connection
connection_missingno active Stripe connection for this modemode
connection_unhealthythe connection cannot be used nowhealth, health_reason
connection_has_open_mandatesdisconnect refused while non-terminal mandates exist (an owner may acknowledge)open_mandates (count)
connection_has_money_in_flightdisconnect refused while money is in flight (no override)in_flight: {collections, refunds, releases, processor_disputes}
connection_account_changedthe connection's proven Stripe account differs from the one non-terminal mandates were sent on; on connect an owner may force itopen_mandates, account_id
publishable_key_unverifiedportal payment setup blocked until the pk_ pair check passed—
stripe_webhook_limitPOST /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_usethe email already has a B2B login (one login per email across tenants)—
member_existsthe email is already a member of this tenantmember
invitation_existsa pending invitation for this email exists (resend it)invitation
last_ownerthe last active owner cannot be removed, demoted or suspended—
mfa_already_enabledMFA state precondition—
mfa_not_enabledMFA state precondition—
amendment_touches_locked_itemthe amendment changes a collection/stage that is already settled, processing, triggered or past openparam
amendment_pendinganother terms version is already awaiting acceptanceversion
party_has_open_mandateserase refused while a non-terminal mandate references the partyopen_mandates
contact_change_pendinga party contact-email change already awaits the party's confirmation (cancel it first)pending_email (masked)
payee_account_existsthe payee already has a connected accountstripe_account_id
payee_account_in_termsre-linking a payee whose account is named in an accepted terms version needs an amendmentmandates
preset_not_installedsandbox seed / template from a preset that is not installedpreset
preset_conflicts_unacknowledgedpreset install would overwrite current values the member did not acknowledgeconflicts: [{path, current, preset}]
template_not_publishedmandate creation from a draft or archived templatetemplate
template_key_existsa template with this key already exists (create a new version instead)template
settings_version_conflictexpected_version ≠ current settings version (also for controls)current_version
change_request_pendinga change request of the same kind (and mandate / member / key) is already pendingchange_request
external_reference_in_useanother party/mandate of this tenant+mode already uses the external referenceparty or mandate
microdeposits_failedmicrodeposit verification attempts exceeded or the 10-day window expired; set up the account again—
compliance_acknowledgement_requiredpack mode warn/block set, or a mandate sent, without the required acknowledgementpack
automation_pausedHoldyn intervention or a platform brake pauses this operationscope
payment_method_in_usemethod backs a processing collectioncollection
duplicate_filethe same file (sha256) is already on this stageexisting_evidence
fund_flow_lockedfund flow cannot change after the first collection attempt—
webhook_endpoint_limitmax 10 endpoints per tenant per mode—
live_prerequisites_missingadmin enable-live with missing prerequisitesmissing
cancellation_pendinga cancellation request already awaits acceptance or confirmationcancellation
outcome_in_progressa new dispute agreement while the agreed outcome still moves money (an outcome refund or release in flight); also next_actions[].blocked_reason of propose_outcomerefund, release (ids or null)
funds_unavailablethe money a refund or reservation needs is no longer held on the payment; nothing was bookedrefund, amount
dispute_resolvingcancel while an agreed dispute outcome is being carried out on the mandatedispute

422 Cannot be processed

Error codes with HTTP status 422
CodeMeaningExtra fields
mandate_invalidschedule/terms validation failederrors: [{code, param, message}], warnings
template_invalidtemplate body validation failederrors, warnings
compliance_blockeda pack in block mode has violations without exemptionviolations: [{pack, rule, detail}]
evidence_incompletestage submit without the required evidencemissing: [{type, required, present}]
fund_flow_unavailablefund flow not available on this connection (direct_charge always; hold_and_transfer in live without payout protection)fund_flow, reasons
override_out_of_boundsper-mandate override outside tenant limitsparam, limit
feature_not_availableP1/launch-cut feature, or a funding party other than the payerfeature
payee_account_not_connectedthe acct_ is not a connected account of the tenant's platform—
payee_country_unsupportedpayees must be in the US at launchcountry
connect_platform_not_readythe tenant's Stripe Connect platform profile is not usable, so a payee account cannot be createdguidance_url
payment_method_not_usablemethod not active, not the grant's party's, scoped to another mandate, or a card without backup consentreason
reversal_basis_requireda transfer reversal without a valid basis, or an amount above what the basis allowsbasis, max_amount
reschedule_notice_too_shorta reschedule would move a debit earlier with less than 7 days' noticecollection, earliest_debit_on
remainder_requireda cancellation strands money the plan cannot refund and names no remainder fatestranded_amount
forum_not_in_termsexternal outcome forum not listed in the accepted terms' external_forumsallowed_forums
default_rule_not_in_termscancellation basis default_rule but the terms say parties_agree (or the mandate is not defaulted)—
setup_extension_limitextend-setup above 60 days per call or 180 days in totalmax_total_days
ai_refusedthe model refused; nothing created—
recollect_requires_payeran 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

Error codes with HTTP status 413
CodeMeaningExtra fields
file_too_largeContent-Length > 21 MB, or the file above its cap (20 MB evidence/documents, 512 KB logo)max_bytes

429 Rate limited

Error codes with HTTP status 429
CodeMeaningExtra fields
rate_limitedrate limit exceededretry_after_seconds
ai_budget_exceededtenant daily AI budget usedretry_after_seconds

502 Processor error

Error codes with HTTP status 502
CodeMeaningExtra fields
stripe_errorStripe refused a call (non-transient)stripe_code, decline_code, stripe_request_id

503 Unavailable

Error codes with HTTP status 503
CodeMeaningExtra fields
stripe_unavailableStripe transient failure (429/5xx/network); retry with the same Idempotency-Keyretry_after_seconds
b2b_unconfigureda required B2B secret is missing for this featurefeature
b2b_unavailablethe B2B router failed to load, or the engine is dark-launched (B2B_ENGINE_ENABLED=false)—
b2b_index_missinga money-critical unique index is missing; engine money writes fail closed—
b2b_secrets_unconfiguredB2B_SECRETS_KEY missing/invalid (connect, rotate, webhook secrets, MFA enrolment)—
b2b_public_url_unconfiguredB2B_PUBLIC_API_BASE_URL missing—
b2b_storage_unconfiguredB2B S3 principal or bucket missing (no fallback to the consumer bucket)—
upload_busythe process upload semaphore is fullretry_after_seconds
billing_unconfiguredHoldyn 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_unavailableAI disabled (B2B_AI_ENABLED, key or tenant setting)reason
record_unavailablethe record entry could not be appended/verified; no money call was made; retryretry_after_seconds
idempotency_unavailableidempotency store failed (fail closed)—

504 Timeout

Error codes with HTTP status 504
CodeMeaningExtra fields
request_timeoutthe 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

Error codes with HTTP status 501
CodeMeaningExtra fields
feature_not_availableW0 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_availablefeature

500 Server error

Error codes with HTTP status 500
CodeMeaningExtra fields
internal_errorunexpected—
raw_body_missinginbound webhook body was parsed before the route (mount-order regression)—

Background job codes (not HTTP)

Error codes with HTTP status job
CodeMeaningExtra fields
stripe_key_invalidStripe rejected the key.—
account_mismatchThe key belongs to another Stripe account than the one pasted (or, on rotation, than the connection). The old key stays active.—
stripe_account_in_useAnother tenant holds a proven active connection to this Stripe account and mode.—
missing_permissionA required key permission is missing; the permissions are in details.—
secrets_key_unavailableEncryption of the key is unavailable on this deployment.—
Errors · Holdyn Business docs