ROKIConnect
Connectors Start API SDKs Migrate MCP Portal ES

Error catalogue

Every error carries a stable code alongside the human message. Successful responses carry no code.

HTTP code When
401 missing_authorization No Authorization header
401 invalid_api_key Header present, key rejected
404 payment_not_found Well-formed identifier, no such payment for that key
404 transaction_id_expected Numeric payment id where a transaction UUID belongs (13.1)
404 payment_method_not_found No saved card with that pm_ id
404 not_found The path is not in the router. {"message":"The route ... could not be found."} - always English, the only error that ignores Accept-Language
405 method_not_allowed Wrong method: {"message":"The GET method is not supported for route ... Supported methods: POST."}
422 tokenized_charge_disabled Mode 3A is not enabled for the account: list, charge and token-charge refuse before any other check (23.1.0)
422 amount_required, currency_code_invalid, idempotency_key_required, ... Validation or business rule, plus an errors object keyed by field

Branch on code, never on message. code does not change with Accept-Language; every message except the routing 404 does.

A 422 message holds the first error, suffixed with (and N more errors) when there are several; errors groups them by field.

Trap on a multi-error 422: code names only one of the failing fields, and not necessarily the one quoted in message. POST /payments with an empty body answers message about amount and code: "external_reference_required", with all three fields in errors. Use code for single-field failures and for the 401/404/405 families; on a multi-field 422, walk the keys of errors, which are stable and complete.

Changed 2026-08-21. Earlier versions of this guide stated that this API had no machine-readable error codes, and the sample clients here classified errors by matching message text as a result. Codes exist now, on every error, and the samples have been updated to use them. If you copied an older sample, that is the line to change: text matching is no longer merely fragile - for the numeric-id mistake it is actively wrong (12.3).

15.0 When a card is declined: which code to read, and what to retry

A declined charge comes back as card_declined at the Connect level. That tells you nothing about why, and the why is what decides your next move. The reason is in IsoResponseCode (and sometimes in Errors), and that is the field to branch on.

Connect does not retry a declined payment for you, and there is no retryable flag. Deciding whether to invite the customer to try again is your checkout's job. Do not confuse this with the webhook retries in §14: those redeliver a notification, they never re-attempt a charge.

The four groups that matter in practice:

What to do Codes Why
Retry later, as a new payment 51, 91, 96, 98 Insufficient funds, issuer down, system or host trouble - the card is fine, the moment was not
Do not keep retrying 05 "Do not honor". A generic refusal; retrying it in a loop is how a merchant ends up on a monitoring programme
Fix the input first 12, 13, 14, 30, 54, 82, N7, 97 Invalid transaction, amount or card number; expired card; bad CVV; malformed request. Retrying the same data gets the same answer
Never retry 04, 07, 34, 41, 43, 59 Pick-up card, suspected fraud, lost card, stolen card

That last row is the one to get right. Those are not "try again later" - they are the issuer saying something is wrong with the card itself, and repeating the attempt is a signal on the merchant's account, not a chance at a sale.

The common codes, after a charge attempt:

Code Meaning Code Meaning
00 Approved 51 Not sufficient funds
01 / 02 Refer to card issuer 55 Incorrect PIN
03 Invalid merchant 57 / 58 Transaction not permitted
04 / 07 Pick-up card 61 / 65 Limit or activity exceeded
05 Do not honor 82 / N7 CVV check failed
12 Invalid transaction 91 Issuer or switch inoperative
13 Invalid amount 96 System malfunction
14 Card number does not exist 97 Format error
19 Re-enter transaction 98 Host unreachable
30 Format error 99 Errored transaction
33 / 54 Expired card
34 / 59 Suspected fraud
41 Lost card
43 Stolen card

This is the ISO 8583 set. The processor publishes more, less common ones (06–11, 15–29, 31–32, 35–40, 52–53, 60, 62–68, 75–90, 92–95, N0, N3, N4, various P codes, XA / XD). Treat an unrecognised code as "do not retry" and log it, rather than guessing which group it belongs to.

Codes from the 3-D Secure step, which happen before or around the charge and are not approvals:

Code Meaning
3D0 The 3DS process finished. Read the authentication status - this alone does not mean the payment succeeded
3D1 3DS not supported for this card. The flow may continue as a non-3DS payment
3D3 3DS error. Not an approval
SP4 The component is ready for the next step in the browser. Continue normally

Source: the API team, 2026-08-25, relaying the processor's reference. §16.2 lists the sandbox cards that produce several of these on demand.

15.1 Common 422 messages

Message Cause
El campo amount es obligatorio. A required field is missing
El campo amount debe ser al menos 0.01. Amount below the minimum
La moneda seleccionada no esta disponible en su terminal de enlaces de pago. currency_code not enabled
La fecha de vencimiento debe ser en el futuro. expires_at in the past
El campo metadata debe ser un array. metadata sent as a string
Ingrese un monto o porcentaje de impuesto cuando el impuesto esta habilitado. sales_tax_value missing
El porcentaje no puede superar 100%. sales_tax_value above 100 in percentage mode
Seleccione un tipo de propina o permita la seleccion del cliente en el checkout. tip_enabled without a mode
Los limites de propina no pueden ser mayores que el monto del plan. tip_max_amount above amount
El entorno sandbox no esta configurado para enlaces de pago... Sandbox not provisioned for that merchant (16.2)