environment that answered. This page is the whole error
story: the envelope, the codes, what to branch on, and the one deliberate
exception.
The envelope
codeis what you branch on. It is stable.messageis for your logs, not your users. Its wording may change.fieldsappears only when a bank endpoint refused a specific input, and it names the field, never the value.environmentsays which upstreams answered:sandboxorproduction. Read it off any response you paste into a ticket.
The codes
The bank onboarding flow adds a few of its own on the consent calls:
consent_session_invalid, consent_declined, consent_link_failed and, on the
sandbox identity call, kyc_provider_refused. Each is listed on the endpoint
page that answers it.
What to branch on
- Branch on
codeand the HTTP status. Never onmessage: its wording is not part of the contract. - Three are worth handling on their own.
no_routeis temporary: re-quote later.rate_limitedmeans back off, not retry at once.chain_not_allowedmeans the corridor was never yours, so no retry will fix it. - A 4xx on a create call created nothing. There is no order or payout to clean up; fix the request and call again.
- Do not enumerate the codes for the user. Show your own copy per branch
and keep
codeandmessagein your logs for the support ticket.
The exception: bank transfers and virtual accounts
On the bank transfer and virtual account endpoints the envelope is the same, butcode and fields inside it are the banking partner’s own, passed through
unchanged rather than mapped to the table above. The set is theirs and it can
grow, so there:
- branch on the HTTP status first,
- log
codeas a string rather than matching it against a fixed set, - read
fieldsto know which input to fix; it names the field, not the value.
Related
- Which products, chains and tokens your key carries, and why a request is refused rather than defaulted: Authentication.
- Rate limits and what your key’s ceiling means for your own users: Rheon API.