Referencia
Ver como MarkdownErrores y códigos
Todos los códigos que el SDK produce, qué significan y qué hacer con cada uno.
Todo error es un AndcoError con un code estable, lo detecte el SDK por su cuenta o lo responda la API: en ese caso es un AndcoResponseError, con sus datos en data (ver Códigos de la API de AndCo). Ramifica por code, nunca por message: el mensaje está escrito para que lo lea una persona y puede cambiar.
class AndcoError<Code extends string = string> extends Error {
readonly code: Code;
readonly status: number | undefined;
readonly details: Readonly<Record<string, unknown>> | undefined;
}El vocabulario no es una unión cerrada a propósito. AndCo agrega condiciones sin publicar un SDK, y tu propio código puede construir un AndcoError para sus errores de dominio. El resultado de una operación sí lo acota: su error es la unión de los códigos que esa operación declara. Compara contra ANDCO_ERROR_CODES y deja siempre una rama para lo que no reconozcas:
import { ANDCO_ERROR_CODES } from "@andco/sdk";
switch (error.code) {
case ANDCO_ERROR_CODES.POPUP_BLOCKED:
return "Habilita las ventanas emergentes para continuar.";
case ANDCO_ERROR_CODES.SESSION_MISSING:
return "Tu sesión expiró. Vuelve a ingresar.";
default:
console.error("código no manejado:", error.code);
return "No pudimos completar la operación.";
}Todos los códigos son minúsculas con guion bajo, la misma forma que usa la API de AndCo. No hay un segundo vocabulario en mayúsculas.
Códigos accionables en tiempo de ejecución
Los que tu aplicación debería manejar: ocurren con una configuración correcta, por algo que pasó en el momento.
| Código | Qué pasó | Qué hacer |
|---|---|---|
popup_blocked |
el navegador impidió abrir la ventana | reintenta dentro de un gesto de la persona, o usa presentation: "redirect" |
popup_timeout |
la ventana quedó abierta sin resolverse | ofrece reintentar. No es una cancelación |
popup_navigation_failed |
la ventana abrió pero el navegador no la dejó navegar | usa redirección |
authorization_cancelled |
la persona cerró o rechazó la autorización: en andco.auth.present, cerró la ventana (o close()) o la página de retorno trae error=access_denied |
no es un fallo: es una decisión, y status dice "cancelled". No muestres un error |
authorization_timeout |
la autorización no terminó dentro de su plazo | ofrece reintentar |
bank_account_pending_review |
la autorización necesita una cuenta digital que el banco todavía tiene en revisión; llegó como error=access_denied con esa descripción |
no reintentes de inmediato: dile a la persona que vuelva más tarde. Cuando la cuenta exista, una autorización nueva pasa directo. No es una cancelación |
authorization_expired |
la autorización venció (dura 10 minutos) mientras la persona conectaba o abría una cuenta; llegó como error=access_denied con esa descripción |
inicia una autorización nueva. No es una cancelación |
organization_required |
la autorización pidió una Organización y la persona no pertenece a ninguna donde pueda autorizar aplicaciones; eligió volver y llegó como error=access_denied con esa descripción |
dile que cree una Empresa en AndCo y vuelva a conectar; la autorización nueva le deja elegirla. No es una cancelación |
session_missing |
la operación necesitaba sesión y no había | manda a la persona a autenticarse (AndcoError.isAuthorizationEnded es true) |
no_token_for_resource |
la sesión no tiene Resource Token para el resource pedido |
autoriza ese Resource Server; nunca se entrega el token de otra audiencia (isAuthorizationEnded es true) |
refresh_failed |
el refresh token ya no sirve | details.oauth_error dice por qué: con invalid_grant o invalid_token el Grant terminó y AndcoError.isAuthorizationEnded es true, vuelve a autorizar; con temporarily_unavailable, server_error o sin oauth_error, reintenta |
revocation_failed |
POST /oauth/revoke no respondió 200 (token de otro cliente, cliente sin autenticar, red) |
el token se conserva: reintenta, o signOut() para solo olvidar la sesión |
storage_failed |
el almacenamiento no pudo leer ni escribir | modo privado o permisos; ofrece continuar sin persistencia |
handshake_timeout |
la superficie hospedada no respondió | el SDK ya reintentó una vez; comprueba red y origen del widget |
untrusted_origin |
llegó un mensaje de un origen que la instancia no permite | revisa allowedPopupOrigins; también puede ser una suplantación |
browser_unavailable |
el navegador no ofrece una API que el SDK necesita | degrada la funcionalidad |
unknown_error |
un fallo que el SDK no pudo atribuir | revisa cause y repórtalo |
Códigos de integración
Aparecen la primera vez que se ejecuta el camino y se arreglan en el código, no en tiempo de ejecución. Si ves uno en producción, es que ese camino nunca se probó.
| Código | Qué pasó |
|---|---|
invalid_configuration |
falta un valor de configuración o es inválido |
invalid_endpoint_auth · invalid_endpoint_api · invalid_endpoint_button |
el endpoint configurado no es una URL usable |
invalid_client_id |
el identificador de cliente OAuth no está bien formado |
invalid_redirect_to |
la URL de callback no sirve para recibir un callback |
invalid_auth_mode |
el modo de autenticación no es uno que el SDK ofrezca |
invalid_scope |
un permiso pedido no es uno que AndCo publique |
invalid_version |
la versión de protocolo no es una que este build hable |
unsupported_theme · unsupported_theme_mode |
el tema o su modo de color no existen |
presentation_unsupported |
el entorno no puede presentar así |
presentation_target_failed |
resolver la URL a presentar falló antes de mostrar nada |
intent_callback_required |
presentar un Intent en popup exige una URL de callback explícita |
invalid_iframe |
el elemento entregado al controlador no es un iframe montado |
same_origin_endpoint |
el iframe hospedado apunta a tu propio origen |
browser_required |
se pidió algo que solo existe en un navegador |
browser_forbidden |
se creó una instancia de servidor en un navegador, con el secreto adentro |
fetch_unavailable · web_crypto_unavailable |
el runtime no ofrece Fetch o Web Crypto y no se configuró uno |
invalid_identifier · invalid_request |
el SDK rechazó un argumento antes de enviar la petición: un id que no es un UUID válido, o una paginación que mezcla familias o pide cero elementos (en la paginación, error.details.issues dice qué falló). En la ruta de rest.http cada id también se revisa: un organization_id es un entero entre 1 y 2147483647, una cuenta va por su UUID o su Account Key, y todo otro id es un UUID. Son los mismos códigos que la API responde para la misma petición |
watch_stopped |
intents.watch se detuvo (stop() o signal) antes de que el Intent llegara a un estado terminal. No es un fallo: watch.intent conserva la última lectura |
intent_ended |
intents.present se negó a presentar un Intent que ya terminó (succeeded, expired, cancelled.grant_revoked…): la ventana se cierra sin navegar y error.details.intent trae el Intent, cuyo status dice cómo terminó |
intent_factory_failed |
la función que le pasaste a intents.present, o como intentId al Hosted Intent Button, lanzó un error y no hubo Intent que presentar. Lo que falló es tu servidor (o lo que la función llamó), no la configuración del SDK: error.cause trae el error original. Si la función lanza un AndcoError, llega tal cual, con su propio código, también el AndcoResponseError que lanza un .throwOnError() cuando la API responde un error |
authorization_factory_failed |
la función que le pasaste a auth.present lanzó un error y no hubo URL de autorización que presentar. Lo que falló es tu servidor (o lo que la función llamó), no la configuración del SDK: error.cause trae el error original. Si la función lanza un AndcoError, llega tal cual, con su propio código. La ventana, que ya estaba abierta, se cierra sin navegar |
invalid_callback |
el callback no corresponde a la transacción: origen, state o antigüedad. También cuando repite state, code o error, cuando uno de ellos viene vacío, o cuando error no es un código OAuth (letras ASCII, dígitos, _, . y -, hasta 128 caracteres); el mensaje no repite ese valor. Los SDK de Go, Python y Ruby aplican la misma regla. En andco.auth.present, la página de retorno trae un code: tu servidor debió canjearlo antes de redirigir |
invalid_response · invalid_token_response |
la respuesta no traía lo necesario |
request_failed |
la petición a la API nunca llegó (sin status), o la respuesta de error no es de la API, como la página de un proxy (con el status que llegó). Es reintentable |
authorization_request_failed · authorization_exchange_failed |
construir o canjear la autorización falló |
device_authorization_failed · device_exchange_failed |
el flujo de dispositivo (RFC 8628) falló |
userinfo_failed |
consultar UserInfo falló |
La definición de cada uno vive en ANDCO_ERROR_CODES, con su JSDoc.
La superficie hospedada
El botón y el widget hospedados reportan sus fallos en este mismo vocabulario: no hay un segundo conjunto. Lo que sí es más chico es qué puede llegar desde el iframe, porque una condición de tu propia página —session_missing, storage_failed— no tiene cómo originarse ahí. Ese subconjunto es ANDCO_BRIDGE_ERROR_CODES, y el esquema del mensaje lo valida.
Códigos de la API de AndCo
Cuando el fallo viene de la API, error es un AndcoResponseError: su code es el error que respondió la API, sin traducir, y los datos del error están en data, tal como los envió el servidor, tipados por operación como una unión discriminada por code. Esta sección se genera desde el documento OpenAPI de la API, así que lista cada código que el contrato declara, con su status, sus datos y las operaciones que lo responden; las descripciones son las del contrato, en inglés.
Todo error de la API trae además message, una frase en inglés para quien lee un log, y a veces hint, una frase en inglés que sugiere qué hacer: nunca ramifiques por ellas ni se las muestres a una persona. La API gana códigos sin que se publique un SDK, así que deja siempre una rama para los que no conozcas.
idempotency_key_not_allowed
400 · A Signed Instruction carries its idempotency key in jti, so Idempotency-Key is refused beside it.
Lo responden: createIntent (POST /intents) y createTransfer (POST /transfers).
invalid_accounts_cursor
400 · after or before is not a cursor the accounts collection returned.
Lo responden: listAccounts (GET /accounts).
invalid_cursor
400 · after is not a cursor AndCo issued.
Lo responden: listAccountTransactions (GET /accounts/{bank_account_id}/transactions).
invalid_identifier
400 · An identifier in the path is not well formed.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
parameter |
string |
sí | The path parameter that is not well formed. |
Lo responden: todas las operaciones menos createIntent (POST /intents), createTransfer (POST /transfers), getBankCatalog (GET /catalog/banks), getGrantAuthorization (GET /authorization), getPermissionCatalog (GET /catalog/permissions), getUserInfo (GET /userinfo), listAccounts (GET /accounts), listTransfers (GET /transfers), readOrganizationEvents (GET /events) y verifySignature (POST /signatures/verify).
invalid_request
400 · The request's body, query or headers do not match the operation.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
issues |
lista de { type, path, requirement? } |
sí |
Lo responden: todas las operaciones menos closeDeposit (POST /intents/{intent_id}/close), deleteOrganizationAddress (DELETE /organizations/{organization_id}/addresses/{address_id}), deleteProfileAddress (DELETE /profiles/{profile_id}/addresses/{address_id}), getBankCatalog (GET /catalog/banks), getGrantAuthorization (GET /authorization), getIntent (GET /intents/{intent_id}), getTransfer (GET /transfers/{transfer_id}), getUserInfo (GET /userinfo) y verifySignature (POST /signatures/verify).
invalid_signed_instruction
400 · The Signed Instruction did not verify, or its verified claims are not an Intent.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
reason |
"malformed_assertion" · "missing_signature" · "missing_key_id" · "disallowed_algorithm" · "unknown_key" · "revoked_key" · "expired_key" · "unusable_key" · "unsynced_key" · "invalid_signature" · "premature_assertion" · "missing_expiration" · "expiration_too_soon" · "missing_instruction_id" · "missing_claim" · "wrong_audience" · "wrong_issuer" · "verification_failed" · "invalid_claims" |
sí | The one cause: what did not verify, or invalid_claims when the verified claims are not what the operation takes (an Intent on POST /intents, a transfer on POST /transfers). |
issues |
lista de { type, path, requirement? } |
no | On invalid_claims, what failed in the claims; on malformed_assertion of a signed transfer, what failed in its envelope. As invalid_request names it. |
Lo responden: createIntent (POST /intents) y createTransfer (POST /transfers).
expired_signed_instruction
401 · The exp of the Signed Instruction has passed.
Lo responden: createIntent (POST /intents) y createTransfer (POST /transfers).
invalid_token
401 · The OAuth bearer token is missing, invalid, expired or revoked.
Lo responden: todas las operaciones menos getPermissionCatalog (GET /catalog/permissions).
account_key_out_of_grant
403 · The Account Key is outside the Grant's accounts patterns.
Lo responden: createIntent (POST /intents).
insufficient_authorization
403 · The Grant lacks the authorization detail the resource requires.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
required_type |
string |
no | The authorization detail type the Grant has to cover for this operation. |
required_action |
string |
no | The action the authorization detail has to name for this operation. |
Lo responden: todas las operaciones menos cancelIntent (POST /intents/{intent_id}/cancel), getGrantAuthorization (GET /authorization), getIntent (GET /intents/{intent_id}), getPermissionCatalog (GET /catalog/permissions), getTransfer (GET /transfers/{transfer_id}), getUserInfo (GET /userinfo), listTransfers (GET /transfers), readIntentEvents (GET /intents/{intent_id}/events), readOrganizationEvents (GET /events) y verifySignature (POST /signatures/verify).
insufficient_scope
403 · The Grant carries no scope for this operation.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
required_scope |
string |
sí | The scope the operation requires. |
Lo responden: getUserInfo (GET /userinfo).
invalid_origin
403 · The browser origin is not allowed for this Client.
Lo responden: todas las operaciones menos getPermissionCatalog (GET /catalog/permissions).
not_found
404 · The resource does not exist under the presented Grant.
Lo responden: todas las operaciones menos createTransfer (POST /transfers), getBankCatalog (GET /catalog/banks), getGrantAuthorization (GET /authorization), getPermissionCatalog (GET /catalog/permissions), getUserInfo (GET /userinfo), listAccounts (GET /accounts), listProjectProfiles (GET /projects/{project_id}/profiles), listTransfers (GET /transfers), readOrganizationEvents (GET /events) y verifySignature (POST /signatures/verify).
unsupported_version
404 · The requested API version is not supported.
Lo responden: todas las operaciones.
account_key_taken
409 · The Account Key names an account of the subject.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
reason |
"held_by_subject" · "closed" |
sí | held_by_subject: an open account carries it; closed: a closed account did. |
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve) y createIntent (POST /intents).
bank_account_quota_exceeded
409 · The Organization holds every digital account its quota allows; nothing was opened.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
used |
integer |
no | How many digital accounts the Organization holds, closed ones included. Absent when they could not be read after the refusal. |
quota |
integer |
no | How many digital accounts the Organization may hold. Absent when it could not be read after the refusal. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve) y createIntent (POST /intents).
idempotency_conflict
409 · The idempotency key was already used with a different request.
Lo responden: createIntent (POST /intents) y createTransfer (POST /transfers).
intent_expired
409 · The Intent's deadline has passed.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve), cancelIntent (POST /intents/{intent_id}/cancel), createIntent (POST /intents) y rejectIntent (POST /intents/{intent_id}/reject).
interaction_required
409 · Only a person can let this Intent go on; nothing was approved, frozen or moved.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
reason |
"bank_verification_required" · "source_account_required" · "bank_connection_pin_required" · "bank_connection_reconnect_required" · "bank_representative_replacement_required" |
no | Why only a person can go on. |
authorization_url |
string (uri) |
no | Where the person completes the Intent, for bank_verification_required and source_account_required. |
interaction_url |
string (uri) |
no | Where in Platform the person brings their AndCo account connection back, for the bank_* reasons. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve), createIntent (POST /intents) y createTransfer (POST /transfers).
409 · The subject's AndCo account connection needs the person back before AndCo can answer for them.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
code |
"bank_connection_pin_required" · "bank_connection_reconnect_required" · "bank_representative_replacement_required" |
sí | What the person has to do: type the web AndPass (bank_connection_pin_required), connect the account again (bank_connection_reconnect_required) or, for an Organization, connect another account representative (bank_representative_replacement_required). |
interaction_url |
string (uri) |
no | Where in Platform the person does what code names. |
Lo responden: getBankCatalog (GET /catalog/banks), listAccountTransactions (GET /accounts/{bank_account_id}/transactions) y listAccounts (GET /accounts).
invalid_intent_state
409 · The Intent is not in a state where this applies.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve), cancelIntent (POST /intents/{intent_id}/cancel), closeDeposit (POST /intents/{intent_id}/close), createIntent (POST /intents) y rejectIntent (POST /intents/{intent_id}/reject).
payload_too_large
413 · The request body is larger than this operation reads.
Lo responden: cancelIntent (POST /intents/{intent_id}/cancel), createIntent (POST /intents), createOrganizationAddress (POST /organizations/{organization_id}/addresses), createProfileAddress (POST /profiles/{profile_id}/addresses), createTransfer (POST /transfers), rejectIntent (POST /intents/{intent_id}/reject), updateOrganizationAddress (PATCH /organizations/{organization_id}/addresses/{address_id}), updateProfileAddress (PATCH /profiles/{profile_id}/addresses/{address_id}) y verifySignature (POST /signatures/verify).
unsupported_media_type
415 · The request's Content-Type is not one this operation accepts.
Lo responden: createIntent (POST /intents), createTransfer (POST /transfers) y verifySignature (POST /signatures/verify).
address_not_created
422 · The address was well formed but could not be created.
Lo responden: createOrganizationAddress (POST /organizations/{organization_id}/addresses) y createProfileAddress (POST /profiles/{profile_id}/addresses).
address_not_updated
422 · The address was well formed but could not be updated.
Lo responden: updateOrganizationAddress (PATCH /organizations/{organization_id}/addresses/{address_id}) y updateProfileAddress (PATCH /profiles/{profile_id}/addresses/{address_id}).
amount_out_of_grant
422 · The amount is outside what the Grant allows.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve), createIntent (POST /intents) y createTransfer (POST /transfers).
bank_account_limit_reached
422 · The holder reached AndCo's ceiling of accounts.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve) y createIntent (POST /intents).
bank_account_number_missing
422 · AndCo answered the opening without an account number.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve) y createIntent (POST /intents).
bank_authorization_denied
422 · AndCo does not let that person open accounts for that company.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve) y createIntent (POST /intents).
bank_connection_unavailable
422 · The subject has no AndCo account connection to a company.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve), createIntent (POST /intents) y createTransfer (POST /transfers).
bank_holder_without_account
422 · The holder has no account at AndCo.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve) y createIntent (POST /intents).
bank_refused
422 · AndCo refused the request.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve), createIntent (POST /intents) y createTransfer (POST /transfers).
bank_rejected
422 · AndCo rejected the movement; nothing stays moved.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve), createIntent (POST /intents) y createTransfer (POST /transfers).
bank_review_required
422 · AndCo must review the movement; money may have left the source account.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve), createIntent (POST /intents) y createTransfer (POST /transfers).
deposit_amount_out_of_bounds
422 · The deposit's amount is outside the bounds of the Grant.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: createIntent (POST /intents).
deposit_destination_ambiguous
422 · The deposit names no destination and the Grant admits more than one.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: createIntent (POST /intents).
insufficient_funds
422 · The source account does not hold enough money.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve), createIntent (POST /intents) y createTransfer (POST /transfers).
invalid_destination
422 · The destination is not one the Grant admits.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve), createIntent (POST /intents) y createTransfer (POST /transfers).
invalid_source
422 · The source is not one the Grant admits.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve), createIntent (POST /intents) y createTransfer (POST /transfers).
sender_mismatch
422 · The signed sender is not the account: country CL, bank 0739, its own account type and its holder's RUT.
Lo responden: createTransfer (POST /transfers).
transfer_amount_required
422 · The person still sets the transfer's amount.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve).
transfer_destination_required
422 · The person still completes the transfer's receiver.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve).
transfer_sender_identity_unavailable
422 · The sender's identity cannot be named to the receiving bank.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve), createIntent (POST /intents) y createTransfer (POST /transfers).
unsupported_bank
422 · The destination's bank is not supported.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve) y createIntent (POST /intents).
unverified_signed_instruction
422 · The assertion did not verify against the OAuth Client's registered Signing Keys.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
reason |
"malformed_assertion" · "missing_signature" · "missing_key_id" · "disallowed_algorithm" · "unknown_key" · "revoked_key" · "expired_key" · "unusable_key" · "unsynced_key" · "invalid_signature" · "expired_assertion" · "premature_assertion" · "missing_expiration" · "expiration_too_soon" · "missing_instruction_id" · "missing_claim" · "wrong_audience" · "wrong_issuer" · "verification_failed" |
sí | The one cause, never a generic failure. |
key_id |
string · null |
sí | The kid the assertion declared, when one could be read from it. |
Lo responden: verifySignature (POST /signatures/verify).
server_error
500 · AndCo failed while serving the request.
Lo responden: todas las operaciones.
not_implemented
501 · The requested case is unavailable, and code says which when the contract names it.
| Dato | Tipo | Siempre | Descripción |
|---|---|---|---|
code |
"account_closure_not_implemented" · "account_opening_not_implemented" · "own_account_transfer_not_implemented" · "signed_outgoing_transfer_not_implemented" · "external_transfer_execution_not_implemented" · "multiple_destinations_not_implemented" · "split_payments_not_implemented" · "multiple_instructions_not_implemented" · "intent_type_not_decidable" |
no | Which case is unavailable: closing an account (postponed with no date), opening an additional account or a transfer between two accounts of the same holder where AndCo does not serve them, a signed transfer that leaves its holder where AndCo does not verify signatures yet, and the payment shapes not built yet. Absent for a case this version of the contract does not name yet. |
intent_id |
string (uuid) |
no | The Intent the refusal is about, when it was refused at its release rather than at its creation. |
Lo responden: approveIntent (POST /intents/{intent_id}/approve), createIntent (POST /intents) y createTransfer (POST /transfers).
temporarily_unavailable
503 · A required upstream service is temporarily unavailable.
Lo responden: todas las operaciones.
Cómo termina un Intent que falló
Una transferencia que pasó por el banco dice en su status por qué falló. No son errores de una llamada: son el estado final del Intent, que llega también en transfer.failed.
status |
qué pasó | se movió dinero |
|---|---|---|
failed.fraud_rejected |
el motor de fraude del banco la rechazó antes de aceptarla, directo desde requires_action |
no |
failed.bank_refused |
el banco o su libro contable no aceptó la solicitud, directo desde requires_action si la transferencia sale del titular |
no |
failed.bank_rejected |
el banco la aceptó y el banco de destino (o, entre cuentas del mismo titular, el libro contable) la rechazó | el banco revierte el débito; nada queda movido |
failed.bank_review_required |
entre cuentas del mismo titular, el banco se detuvo a medias o no dio respuesta usable en un día | puede haber salido dinero de la cuenta de origen sin llegar al destino; el banco debe revisarlo y no se reintenta con otro Intent |
failed.own_account_transfer_not_implemented |
el banco de este entorno no atiende transferencias entre cuentas propias | no |
Una apertura de cuenta que falla termina en estos estados; en ninguno se abrió una cuenta.
status |
qué pasó |
|---|---|
failed.bank_authorization_denied |
el banco no deja a esa persona abrir cuentas para esa Empresa |
failed.bank_holder_without_account |
el banco no reconoce una cuenta del titular |
failed.bank_account_limit_reached |
el titular alcanzó el máximo de cuentas |
failed.bank_connection_unavailable |
el sujeto no tiene una conexión bancaria con una Empresa |
failed.account_opening_not_implemented |
el banco de este entorno no atiende aperturas |
failed.bank_core_unavailable |
no se pudo preguntar al banco; pedir de nuevo el mismo Intent es seguro |
failed.bank_account_save_failed |
el banco respondió pero AndCo no pudo guardar la cuenta |
Una transferencia entre cuentas del mismo titular no pide PIN ni código: se mueve sin nadie presente. Si el banco aún no responde del todo queda en processing.confirmed, que en este caso empieza al liberarla (en una transferencia que sale del titular empieza cuando el banco la acepta; en ambas significa que el banco tiene la orden y nadie tiene que hacer nada); el servidor vuelve a preguntar con la misma clave en un calendario acotado y el resultado llega como transfer.succeeded o transfer.failed. Un 503 con temporarily_unavailable significa que no se pudo preguntar al banco; pedir de nuevo el mismo Intent es seguro y responde la misma cuenta o transferencia.
Una transferencia que sale del titular (a otro banco o a otro cliente de AndCo) está en requires_action desde que se crea y mientras una persona deba al banco una prueba, y toda lectura trae interaction_reason: "bank_verification_required". Pulsar Confirmar, escribir el PIN o escribir el código no cambia el status y no se ha movido dinero. Pasa a processing.confirmed, y se publica transfer.confirmed una vez, cuando el banco acepta la transferencia; desde ahí nadie tiene que hacer nada y el resultado llega como transfer.succeeded o transfer.failed. Un desafío abandonado, vencido o agotado no falla el Intent: sigue en requires_action, la persona confirma de nuevo y recibe otro código, y el Intent termina por su propio plazo (expired, con transfer.expired). Mientras el banco ya fue consultado y su respuesta aún no se conoce, el Intent sigue en requires_action, no pasa a expired aunque venza su plazo, y cancel y reject responden 409 invalid_intent_state.
interaction_reason está en toda lectura del Intent mientras está en requires_action y solo una persona puede liberarlo; no está cuando una credencial puede liberarlo ni cuando el Intent ya salió de requires_action. Son las mismas dos palabras que reason de interaction_required al intentar POST /intents/{id}/approve con una credencial.
interaction_reason |
qué pide |
|---|---|
bank_verification_required |
el banco pide a la persona confirmar con su AndPass web y un código por SMS |
source_account_required |
la persona aún elige la cuenta de la que sale el dinero |
processing.settling ya no se emite.
Códigos del servidor de autorización
Cuando el servidor de autorización devuelve el error en la redirección de vuelta, el code es el de OAuth 2.1 tal cual: access_denied, invalid_scope, server_error, temporarily_unavailable. Se pasan sin traducir para que puedas buscarlos en el RFC.
Cuando lo responde el token endpoint o el de revocación (renovar, canjear un código, revocar), el code es el del SDK (refresh_failed, authorization_exchange_failed, revocation_failed) y el error OAuth viene en details.oauth_error, con details.oauth_error_description si el servidor la envió. Para decidir si hay que pedir una autorización nueva no lo compares a mano: usa AndcoError.isAuthorizationEnded.
Un Service que pide un token para un sujeto (andco.service) recibe además dos códigos del token endpoint:
| Código | Qué pasó | Qué hacer |
|---|---|---|
authorization_required |
el Service no tiene ningún Grant aprobado para ese sujeto y recurso | una persona aprueba los permisos en Platform; no hay nada que reintentar |
ambiguous_grant |
varios Grants del Service calzan con el sujeto y el recurso | fija uno con grant; details.candidate_grant_ids los nombra |
access_denied es el único que lleva una decisión de la persona, y por eso llega como cancelación y no como error. La excepción son tres descripciones estables: access_denied con error_description=bank_account_pending_review, error_description=authorization_expired o error_description=organization_required no es una cancelación, porque nadie rechazó nada. El SDK las entrega como error con ese mismo code, y conserva access_denied en details.oauth_error.
Cancelar no es fallar
Una persona que cierra la ventana no produjo un error. El SDK lo reporta como cancelación y tu aplicación debería volver al estado anterior sin mostrar nada rojo.
status y details
En un AndcoError, status trae el código HTTP cuando el error vino de una respuesta (por ejemplo un 502 con una página de un proxy, que no es de la API) y details trae lo que haya explicado el fallo: el error OAuth del servidor de autorización, el Intent de intent_ended.
Un error de la API trae sus datos en data, tipados (required_scope en insufficient_scope; required_type y required_action en insufficient_authorization; issues en invalid_request), además de status y la respuesta completa en response. Súrfalos: sin ellos solo puedes decir que algo falló, no qué permiso falta.
