Underlayer client API: error answers
Every answer the client API gives when it does not accept a request, with its HTTP status, what it means and what your system should do. Read with the API reference and openapi.yaml.
This list is kept in step with the code by an automated test: every error text the client routes can answer, every reason a CDD row can be refused for, and every VALIDATION: refusal the database can raise must be written here, or the test fails. The database's refusals are read from the database itself.
How an error looks
{ "error": "Decisioning engine error", "error_code": "ENGINE_ERROR", "code": "P0001" }
error_codenames the kind of refusal, in upper-case letters, digits and underscores (theerror_codecolumn of every table below). Match on the HTTP status anderror_code, never on the words. Every error answer carries one. A code keeps its meaning for as long as v1 is served: a new code may be added (treat one you do not know by its HTTP status), and renaming or removing one is a change that needs a new version (Versioning). The same refusal has the same code on every endpoint, and a card refusal has the code the card file on the Data imports screen gives its row.erroris words for a person, listed below; they change only through a reviewed change to this file. A400from the database carries its refusal text (section 2), which names the field and may quote the value you sent; log it, but read the refusal fromerror_code.codeis present on a server-side refusal: the database's error code, an SQLSTATE such asP0001or a PostgREST code such asPGRST116(nullwhen there is none). It never carries the database's message, which can quote values or internal names. Quote it when you contact support.- Every answer carries an
X-Request-Idheader: a value our server makes for that request (32 hexadecimal characters), on errors and refusals too. Quote it when you contact support; we find the request in our logs by it. It is never the value you sent: a header of that name in your request is not used as the ID. - Every answer of the API is JSON, a path or a method this API does not serve included (section 0). An answer that is not JSON, or not in this shape, comes from our hosting provider (for example a bare
502or504: treat it like a503).
Retrying. A payment is safe to retry: it is identified by source_system + external_transaction_id (and Idempotency-Key), so a retry returns the payment's current decision. A card event must carry an Idempotency-Key (without one it is refused, 400), and a retry with the same key returns the card event's first decision. A CDD file is safe to send again (rows already stored come back unchanged). Retry 429, 503 and hosting-provider errors with back-off (for example 1 s, 2 s, 4 s ... up to a minute), waiting at least the seconds in Retry-After when the answer carries it (every 429; a 503 Service busy or Service unavailable). Retry a 500 once, with the same request; if the same code comes back, contact Underlayer. Never retry a 400, 401, 403, 404, 405, 409 or 413 unchanged. The whole table is in Idempotency and retries.
0. A path or a method this API does not serve
These come before anything else: no key is read, nothing is counted against your rate limits, nothing is stored. The answer names nothing from your request.
| Status | error | error_code | Meaning | What to do |
|---|---|---|---|---|
| 404 | Not found | NOT_FOUND | No endpoint of this API has this path, whatever the method: a misspelt path (/v1/transaction), a path with a segment too many or too few (/v1/transactions/{id} without /decision). | Check the path against openapi.yaml. Do not retry unchanged. |
| 405 | Method not allowed | METHOD_NOT_ALLOWED | The path is an endpoint, but not for this method (for example GET /v1/transactions, which takes only POST). The Allow header lists the methods it takes. HEAD is taken wherever GET is; OPTIONS is taken nowhere (the API is called from servers and answers no CORS preflight). | Use a method from Allow. Do not retry unchanged. |
A path is matched exactly, in lower case and without a trailing slash: /V1/HEALTH/ answers 404. Both answers carry Cache-Control: no-store.
1. Every client endpoint
These come before your request is processed: the key, the institution, the body.
| Status | error | error_code | Meaning | What to do |
|---|---|---|---|---|
| 401 | Missing or malformed API key | API_KEY_MISSING | No X-API-Key header, or it is not <key_id>.<secret>. | Send the key as issued. Do not retry unchanged. |
| 401 | Invalid or revoked API key | API_KEY_INVALID | The key is unknown, revoked, or the secret is wrong. | Check which key the caller uses; issue a new key if it was lost. Repeated failures from one address lock it out for 10 minutes (429 below). |
| 403 | API key not allowed from this address | API_KEY_ADDRESS_NOT_ALLOWED | The key is limited to allowed IP addresses and ranges (set on the API and webhooks screen) and the request came from another address, or from no address the platform recorded. Checked after the secret, so a wrong key still answers 401. Counts as a failed authentication of your address (429 below). | Send from an allowed address, or ask your administrator to add the address to the key. Do not retry unchanged. |
| 403 | Institution is not active | INSTITUTION_NOT_ACTIVE | The key belongs to an institution that is not active. | Contact Underlayer. |
| 503 | Service unavailable | SERVICE_UNAVAILABLE | The key could not be checked: the database did not answer three tries. Your key was not judged; this is not a key error. Carries Retry-After: 5. | Wait Retry-After seconds, then retry the same request with back-off. |
| 503 | Service busy | SERVICE_BUSY | Payments and card events; customer events and card registrations have a pool of their own (sections 4a and 4b). This server instance is already deciding as many payments and card events as it runs at once, your institution already holds its share of them, or a request with the same API key and Idempotency-Key is still being decided here. Answered at once: nothing was stored, it does not count as a failed authentication, and the key was not judged (except for the share, which is known once the key is checked). Carries Retry-After: 1. | Wait Retry-After seconds, then retry the same request (same Idempotency-Key, same external_transaction_id) with back-off: 1 s, 2 s, 4 s ... up to a minute. |
| 413 | Request body too large | BODY_TOO_LARGE | The body is larger than 64 000 bytes (payments, card events, customer events, cards) or 2 000 000 bytes (CDD). A larger Content-Length is refused before the body is read and before the key is checked. | Split the request. |
| 400 | Body must be valid JSON | BODY_NOT_JSON | The body is not JSON. | Fix the body. |
| 400 | Body must be a JSON object | BODY_NOT_OBJECT | The body is JSON but not an object (an array, a string, null). | Send one object. |
| 429 | Too many failed authentication attempts from this address; retry after the number of seconds in Retry-After | TOO_MANY_FAILED_AUTHENTICATIONS | 20 failed authentications from your address within 10 minutes: the address is refused for 10 minutes, a right key included. | Fix the key, then wait Retry-After seconds. |
| 429 | Too many requests for this API key; retry after the number of seconds in Retry-After | RATE_LIMITED_KEY | More than 3 000 requests a minute on this key (bursts of 1 000), per server instance. | Wait Retry-After seconds, then retry the same request. |
| 429 | Too many requests from this address; retry after the number of seconds in Retry-After | RATE_LIMITED_ADDRESS | More than 120 requests a minute from your address with a key not yet seen by this server instance. | Wait Retry-After seconds, then retry. |
| 503 | Service temporarily unavailable | SERVICE_SETTINGS_UNUSABLE | The rate-limit settings of the service are unusable. | Retry with back-off; contact Underlayer if it lasts. |
2. Payments: POST /v1/transactions
| Status | error | error_code | Meaning | What to do |
|---|---|---|---|---|
| 403 | This API key may not submit <classification> payments | CLASSIFICATION_NOT_ALLOWED_FOR_KEY | The key does not allow the data_classification you sent (default PRODUCTION). | Use a key issued for that classification. |
| 400 | a database refusal, below | per refusal, below | The database refused the payment; nothing was stored. A value of the wrong type is refused this way too (an amount that is not a number, a card_present that is not true or false, a country that is not on the platform's list): every amount, currency, country and flag is checked before anything is stored. | Correct the request; do not send it again unchanged. |
| 409 | this external_transaction_id or Idempotency-Key was already used for a payment with a different %: retry with the same body, or send a new payment with a new external_transaction_id and a new Idempotency-Key | IDEMPOTENCY_CONFLICT | The request repeats an earlier payment's source_system and external_transaction_id, or its Idempotency-Key, but its customer_ref, amount, currency, direction, channel or instant differs. % names the fields that differ, never a value. Nothing was stored. | A retry sends the same body. A new payment needs a new external_transaction_id and a new Idempotency-Key. |
| 409 | the Idempotency-Key and the external_transaction_id name two different payments: retry with the key and the reference you sent the first time | REFERENCE_KEY_MISMATCH | The Idempotency-Key belongs to one of your payments and the source_system and external_transaction_id to another. Nothing was stored. | Retry with the key and the reference of one payment, as you sent them the first time. |
| 500 | Decisioning engine error (with code) | ENGINE_ERROR | The database refused the payment with something other than a validation message. For example P0001, no decision policy is in force for your institution. | Retry once (the request is idempotent). If the same code comes back, contact Underlayer. |
A 202 is not an error: it means the payment is accepted for screening and must not be settled yet (Payments).
Payment refusals (400)
The database writes these for you; the answer carries the text after VALIDATION:. % stands for the value you sent.
error | error_code | When | What to do |
|---|---|---|---|
institution is not active | INSTITUTION_NOT_ACTIVE | Your institution was switched off between the key check and the payment. | Contact Underlayer. |
transaction_timestamp must be a date YYYY-MM-DD or a date-time YYYY-MM-DDThh:mm[:ss[.ffffff]] with an optional zone Z, +hh:mm or -hh:mm (no zone = UTC), such as 2026-09-01T14:30:00Z | INVALID_DATE_TIME | transaction_timestamp is not in that grammar (a space instead of T, +0300, 01.09.2026, an impossible day). | Send ISO 8601 as described, or leave it out (the time of receipt is used). |
data_classification % is not accepted by the decisioning engine | INVALID_DATA_CLASSIFICATION | A data_classification other than PRODUCTION, TEST, SCALE_TEST, DEMO that your key nevertheless allows. | Use one of the four. |
data_classification % is accepted only by a sandbox institution: a production institution takes PRODUCTION data only | CLASSIFICATION_NOT_ACCEPTED | Your institution is a production institution and the data_classification you sent is TEST, SCALE_TEST or DEMO. Test data goes to a sandbox institution. Nothing is stored. A retry, with the same reference or Idempotency-Key, of a payment your institution accepted while it was a sandbox is answered as a repeat, with the payment's current decision. | Send PRODUCTION, or send test data to your sandbox institution with its own key. |
external_transaction_id is required | MISSING_EXTERNAL_TRANSACTION_ID | It is missing or blank. | Send your unique id for the payment. |
references beginning EXAMPLE- come from the documentation and are refused: send your own references | EXAMPLE_ROW | external_transaction_id or customer_ref begins EXAMPLE-, in any case: a reference copied from the examples of this documentation. Nothing is stored. | Send your own references. |
unknown channel % | INVALID_CHANNEL | channel is missing or not one of SEPA, SWIFT, CARD, ATM. | Send one of them. |
channel % is disabled | CHANNEL_DISABLED | The channel exists but is switched off on the platform. | Contact Underlayer. |
direction % is not supported on % | INVALID_DIRECTION | direction is missing or not INCOMING / OUTGOING for that channel. | Send INCOMING or OUTGOING. |
% is required | MISSING_FIELD | amount is missing, null or an empty string. | Send the amount. |
% must be a number | INVALID_NUMBER | amount is neither a JSON number nor a string (true, an object, an array). | Send a number such as 125.50. |
% must be a decimal number such as 125.50 (no exponent, NaN or Infinity) | INVALID_DECIMAL | amount is a string that is not digits with an optional dot and decimals (1e3, 1,250.00, NaN, Infinity) or is longer than 40 characters. | Send digits with a dot as the decimal separator, for example 1250.00. |
% may have at most two decimals | TOO_MANY_DECIMALS | amount has more than two decimals (10.123; trailing zeros such as 10.120 are accepted). Nothing is rounded. | Round the amount yourself. |
% exceeds the largest supported amount, 999999999999.99 | AMOUNT_TOO_LARGE | amount is 1 000 000 000 000 or more. | Correct the amount. |
% must be greater than zero | AMOUNT_NOT_POSITIVE | amount is zero or negative (0, -5, "-5.00"). | Send a positive amount. |
% must be a three-letter ISO 4217 currency code such as EUR | INVALID_CURRENCY | currency is missing, or after upper-casing not a code of the platform's ISO 4217 list (E1R, EURO, or three letters that name no currency such as QZQ). | Send an ISO 4217 code such as EUR. |
% must be a two-letter ISO 3166-1 alpha-2 country code such as LT | INVALID_COUNTRY | origin_country, destination_country, counterparty_country, merchant_country or customer_country is not a code of the platform's country list (every ISO 3166-1 alpha-2 code and XK) after upper-casing: XX, ZZ, LTU. | Send the two-letter code, or leave the field out (SWIFT requires origin_country and destination_country). |
% must be true or false | INVALID_BOOLEAN | card_present, instant or executed_during_outage is neither JSON true / false nor the string "true" / "false" ("yes", 1 and 0 are refused). | Send true or false, or leave it out. |
% must be one of % | INVALID_OPTION | counterparty_relationship or payee_verification is not one of its values after upper-casing (the second % lists them). The session and device codes (initiation_channel, initiation, device_os) never refuse a payment: see "Session and device warnings". | Send one of the listed values, or leave the field out. |
% must be 1 to 34 letters and digits (spaces are taken out) | INVALID_ACCOUNT | counterparty_account holds something other than letters, digits and spaces, or more than 34 of them. | Send the account number or IBAN as letters and digits. |
% looks like an IBAN but does not begin with a known country code | INVALID_IBAN_COUNTRY | counterparty_account is shaped as an IBAN but its first two letters are not a code of the platform's country list. | Check the account; send it as your system holds it, or leave it out. |
% looks like an IBAN but its check digits are wrong | INVALID_IBAN_CHECK_DIGITS | counterparty_account is shaped as an IBAN and fails the IBAN check (ISO 13616, mod 97): a mistyped or truncated IBAN. | Correct the IBAN. |
% is required for % payments | MISSING_CHANNEL_FIELD | A field the channel requires is missing or blank: counterparty for SEPA, origin_country and destination_country for SWIFT. A missing amount or currency is refused by the messages above. | Send the field. |
instant is only for SEPA payments | INSTANT_NOT_SEPA | instant is true on a payment whose channel is not SEPA: only a SEPA credit transfer can be an instant transfer. Nothing is stored. | Send instant only with SEPA payments, or leave it out. |
unsupported counterparty_type % | INVALID_COUNTERPARTY_TYPE | counterparty_type is not one of INDIVIDUAL, LEGAL_ENTITY, FINANCIAL_INSTITUTION, GOVERNMENT, MERCHANT, OTHER. | Send one of them, or leave it out. |
counterparty_sector_code % is unknown or retired | INVALID_COUNTERPARTY_SECTOR_CODE | The sector code is not an active code of the platform's list. | Leave it out unless you were given the list. |
unknown customer_ref % | UNKNOWN_CUSTOMER | customer_ref is missing, or unknown and could not be opened as a provisional customer: your decision policy does not allow provisional customers, or today's limit of new provisional customers is reached (a sign that your customer feed is broken). | Send the customer's CDD record first (POST /v1/cdd-ingest), then the payment. |
transaction_timestamp is required when executed_during_outage is true: send the time your system executed the payment | OUTAGE_TIMESTAMP_REQUIRED | A payment marked executed_during_outage has no transaction_timestamp. It is checked after the event as of the time it was executed, so that time is required. Nothing is stored. | Send the time your system executed the payment. |
transaction_timestamp of a payment executed during an outage cannot be later than the time it is sent | OUTAGE_TIMESTAMP_IN_FUTURE | A payment marked executed_during_outage carries a time more than five minutes after the time it reaches us. Nothing is stored. | Send the time your system executed it; check your system's clock. |
executed_during_outage is refused: your institution has not chosen its policy for payments while Underlayer cannot be reached (Settings, Decision policies), so every payment is decided in real time | OUTAGE_POLICY_NOT_CHOSEN | Your institution has not chosen what its system does while Underlayer cannot be reached. Nothing is assumed and nothing is stored. Checked after the look-up of a repeat. | Your MLRO or administrator chooses the policy in Settings, Decision policies (SKIP_AND_CHECK_LATER if your system lets payments go during an outage), then send the payment again. |
executed_during_outage is refused: your institution's policy is to hold payments while Underlayer cannot be reached, so send the payment without it and it is decided in real time | OUTAGE_POLICY_HOLD | Your institution's policy is HOLD: its system holds a payment until Underlayer answers, so none is executed without an answer. A payment marked as executed contradicts that policy. Nothing is stored. | If your system held the payment, send it without the mark and it is decided as usual. If it let the payment go, your procedure was not followed: your MLRO or administrator records SKIP_AND_CHECK_LATER (with its reason, audited) before it is sent again. |
Session and device warnings (in a 200 or 202 answer, not an error)
A malformed session or device field never refuses a payment: the payment is decided as if the field had not been sent, the value is not stored, and the answer carries warnings, a list of { "field", "message" }. A field you leave out never causes a warning. Fix your integration when you see one; the payment itself needs nothing.
field | message |
|---|---|
ip_address | ip_address is not one IPv4 or IPv6 address (such as 203.0.113.10 or 2001:db8::10, without a prefix such as /24): not stored |
ip_country | ip_country is not a two-letter ISO 3166-1 alpha-2 country code such as LT: not stored |
device_id | device_id must be 8 to 128 letters, digits or the characters . _ : + / = -: not stored |
device_timezone | device_timezone is not an IANA time zone name such as Europe/Vilnius: not stored |
device_utc_offset | device_utc_offset must be +hh:mm or -hh:mm between -12:00 and +14:00 in quarter hours, such as +03:00: not stored |
device_utc_offset | device_utc_offset does not agree with device_timezone at the event's time: the time zone's own offset is stored |
session_id | session_id must be 1 to 128 printable characters without spaces: not stored |
initiation_channel | initiation_channel must be one of MOBILE_APP, WEB_BROWSER, API, BRANCH, PHONE, OTHER: not stored |
initiation | initiation must be one of CUSTOMER_INITIATED, STANDING_ORDER, SCHEDULED, DIRECT_DEBIT, MERCHANT_INITIATED, BULK_UPLOAD, STAFF_INITIATED, OTHER: not stored |
device_os | device_os must be one of ANDROID, IOS, WINDOWS, MACOS, LINUX, OTHER: not stored |
vpn_or_proxy | vpn_or_proxy must be true or false: not stored |
remote_access_detected | remote_access_detected must be true or false: not stored |
3. Decision look-up: GET /v1/transactions/{id}/decision
| Status | error | error_code | Meaning | What to do |
|---|---|---|---|---|
| 404 | Decision not found | DECISION_NOT_FOUND | No decision of your institution has this id or reference (another institution's payment answers the same). | Check the id; use the decision_ref or transaction_id from the payment's answer. |
| 409 | More than one of your payments has this reference: use the transaction id or the decision reference | AMBIGUOUS_REFERENCE | You looked up your own external_transaction_id, and two of your payments from different source_systems share it. | Look up by transaction_id or decision_ref. |
| 500 | Lookup failed | LOOKUP_FAILED | The look-up failed on the server. | Retry with back-off. |
4. Card authorisations: POST /v1/card-authorizations
| Status | error | error_code | Meaning | What to do |
|---|---|---|---|---|
| 403 | This API key may not submit <classification> events | CLASSIFICATION_NOT_ALLOWED_FOR_KEY | The key does not allow the data_classification you sent (default PRODUCTION). | Use a key issued for that classification. |
| 400 | a database refusal, below | per refusal, below | The database refused the event; nothing was stored. A request without Idempotency-Key, and a value of the wrong type (an amount that is not a number, a code that is not one of its values), are refused this way: the key and every amount, currency, country and card code are checked before anything is stored. | Correct the request. |
| 409 | this Idempotency-Key was already used for a card event with a different %: retry with the same body, or send a new event with a new Idempotency-Key | IDEMPOTENCY_CONFLICT | The request repeats an earlier card event's Idempotency-Key, but its card_token, event_type, amount or currency differs. % names the fields that differ, never a value. Nothing was stored. | A retry sends the same body. A new event needs a new Idempotency-Key. |
| 500 | Authorization engine error (with code) | ENGINE_ERROR | The database refused the event with something other than a validation message: a fault on our side. Two card events with the same Idempotency-Key never meet here: the second waits for the first and answers the card event's first decision. | Retry once with the same Idempotency-Key; contact Underlayer with the code if it comes back. |
Card refusals (400)
error | error_code | When | What to do |
|---|---|---|---|
the Idempotency-Key header is required for card events: send a unique key for each event and the same key when you retry it | MISSING_IDEMPOTENCY_KEY | No Idempotency-Key header, or a blank one. It is checked before anything else. | Send a unique key for each card event (a UUID, for example) and the same key on every retry of it. |
the Idempotency-Key may be at most 255 characters | IDEMPOTENCY_KEY_TOO_LONG | The key is longer than 255 characters (spaces around it are not counted). | Send a shorter key, such as a UUID. |
data_classification % is not accepted by the decisioning engine | INVALID_DATA_CLASSIFICATION | A data_classification other than PRODUCTION, TEST, SCALE_TEST, DEMO that your key nevertheless allows (checked before the card is looked up). | Use one of the four. |
data_classification % is accepted only by a sandbox institution: a production institution takes PRODUCTION data only | CLASSIFICATION_NOT_ACCEPTED | Your institution is a production institution and the data_classification you sent is TEST, SCALE_TEST or DEMO. Test data goes to a sandbox institution. Nothing is stored. A retry, with the same Idempotency-Key, of a card event your institution accepted while it was a sandbox is answered as a repeat, with the card event's first decision. | Send PRODUCTION, or send test data to your sandbox institution with its own key. |
event_type must be CARD_AUTHORIZATION, ATM_WITHDRAWAL, CARD_REFUND or CARD_REVERSAL | INVALID_EVENT_TYPE | event_type is missing or another value. It is compared exactly as sent: card_refund is refused. | Send one of the four, in upper case. |
% is required | MISSING_FIELD | amount is missing, null or an empty string. | Send the amount. |
% must be a number | INVALID_NUMBER | amount, billing_amount or available_balance is neither a JSON number nor a string (true, an object, an array). | Send a number such as 49.90. |
% must be a decimal number such as 125.50 (no exponent, NaN or Infinity) | INVALID_DECIMAL | amount, billing_amount or available_balance is a string that is not digits with an optional dot and decimals (1e3, 1,250.00, NaN, Infinity) or is longer than 40 characters. | Send digits with a dot as the decimal separator. |
% may have at most two decimals | TOO_MANY_DECIMALS | amount, billing_amount or available_balance has more than two decimals (10.123). Nothing is rounded. | Round the amount yourself. |
% exceeds the largest supported amount, 999999999999.99 | AMOUNT_TOO_LARGE | amount, billing_amount or available_balance is 1 000 000 000 000 or more (for available_balance, also -1 000 000 000 000 or less). | Correct the amount. |
% must be greater than zero | AMOUNT_NOT_POSITIVE | amount or billing_amount is zero or negative (available_balance may be zero or negative: -12.50). | Send a positive amount, or leave billing_amount out. |
% must be a three-letter ISO 4217 currency code such as EUR | INVALID_CURRENCY | currency, card_currency or billing_currency is, after upper-casing, not a code of the platform's ISO 4217 list (E1R, QZQ). Left out or empty, each takes its default. | Send an ISO 4217 code such as EUR, or leave it out. |
% must be a two-letter ISO 3166-1 alpha-2 country code such as LT | INVALID_COUNTRY | merchant_country is not a code of the platform's country list (every ISO 3166-1 alpha-2 code and XK) after upper-casing: XX, LTU. | Send the two-letter code, or leave it out. |
% must be one of % | INVALID_OPTION | A card code (entry_mode, card_presence, card_txn_type, authorization_mode, terminal_capability, three_ds_result, cvv_result, pin_result) is not one of its values after upper-casing. The answer names the field and its values, for example cvv_result must be one of MATCH, NO_MATCH, NOT_PROVIDED: the value FAIL is refused. The values are in the API reference. | Send one of the values, or leave the field out. |
card_token is required | MISSING_CARD_TOKEN | card_token is missing or blank. | Send the card's token. |
references beginning EXAMPLE- come from the documentation and are refused: send your own references | EXAMPLE_ROW | card_token begins EXAMPLE-, in any case: a token copied from the examples of this documentation. Nothing is stored. | Send the token of one of your cards. |
event_time must be a date YYYY-MM-DD or a date-time YYYY-MM-DDThh:mm[:ss[.ffffff]] with an optional zone Z, +hh:mm or -hh:mm (no zone = UTC), such as 2026-09-01T14:30:00Z | INVALID_DATE_TIME | event_time is not in that grammar. | Send ISO 8601 as described, or leave it out. |
unknown card_token | UNKNOWN_CARD | No card with this token is registered for your institution under this data_classification. | Register the card first (POST /v1/cards, section 4b, or the card file), then send the event again. |
card_txn_type of a refund must be REFUND | INVALID_REFUND_TXN_TYPE | A CARD_REFUND was sent with another card_txn_type. A refund's type is REFUND, the type the refund rules read. | Leave card_txn_type out, or send REFUND. |
original_event_ref is required for a reversal: send the event_ref of the authorisation or withdrawal it reverses | MISSING_ORIGINAL_EVENT | A CARD_REVERSAL without original_event_ref. | Send the event_ref Underlayer answered for the authorisation or withdrawal you reverse. |
original_event_ref must name an approved authorisation or withdrawal of this card | INVALID_ORIGINAL_EVENT | original_event_ref names no event of this card that was approved: an unknown reference, another card's or another institution's event, a declined event, or a refund or reversal. | Send the event_ref of the approved authorisation or withdrawal of the same card. |
currency must be the currency of the original event | ORIGINAL_CURRENCY_MISMATCH | The refund or reversal is in another currency than the event it names. | Send it in the original's currency. |
event_time cannot be before the original event | EVENT_BEFORE_ORIGINAL | Its event_time is earlier than the event it names. | Correct event_time, or leave it out. |
amount exceeds what is left of the original event to refund or reverse | AMOUNT_EXCEEDS_ORIGINAL | Together with what was already refunded and reversed against the named event, the amount would exceed that event's amount. | Send at most what is left. |
billing_amount is required when billing_currency is not the billing currency of the original event | MISSING_BILLING_AMOUNT | A refund or reversal names an event and sends a billing_currency that is neither the original's billing currency nor the transaction currency, without billing_amount: there is nothing to derive the billing amount from. | Send billing_amount, or leave billing_currency out to keep the original's. |
Card declines (a 200 answer, not an error)
A declined event answers 200 with authorization_result: DECLINED and one of these decline_reasons. They are checked in this order: the card's status, then cvv_result, then pin_result; a rule declines only an event those checks approved, and a rule that could not be evaluated declines only an event nothing else declined. A refund (REFUNDED) or a reversal (REVERSED) is never declined.
decline_reason | Meaning |
|---|---|
CARD_TERMINATED | The card is terminated. |
CARD_SUSPENDED | The card is suspended. |
INVALID_CVV | You sent cvv_result: NO_MATCH (in any case). MATCH and NOT_PROVIDED do not decline. |
INVALID_PIN | You sent pin_result: NO_MATCH (in any case). MATCH and NOT_PROVIDED do not decline. |
RULE_DECLINE | One of your institution's real-time card rules has the action REJECT and fired. |
RULE_EVALUATION_ERROR | One of your institution's real-time card rules could not be evaluated for the event (also a rule that compares EUR when the event's amount or balance, or that of an earlier event in the rule's window, has no reference rate: error_code NO_FX_RATE), and your decision policy declines the event for it (its setting "When a card rule cannot be evaluated" is to decline, or no decision policy is in force). The answer's rule_errors names the rule; a person reviews the event. With the platform's default setting the event is not declined for it. |
4a. Customer events: POST /v1/customer-events
| Status | error | error_code | Meaning | What to do |
|---|---|---|---|---|
| 403 | This API key may not submit <classification> events | CLASSIFICATION_NOT_ALLOWED_FOR_KEY | The key does not allow the data_classification you sent (default PRODUCTION). | Use a key issued for that classification. |
| 400 | a database refusal, below | per refusal, below | The database refused the event; nothing was stored. | Correct the request. |
| 409 | this source_system and external_event_id were already used for a customer event with a different %: retry with the same body, or send a new event with a new external_event_id | IDEMPOTENCY_CONFLICT | The request repeats an earlier event's source_system and external_event_id, but its customer_ref or event_type differs. % names the fields that differ, never a value. Nothing was stored. | A retry sends the same body. A new event needs a new external_event_id. |
| 500 | Customer event engine error (with code) | ENGINE_ERROR | The database refused the event with something other than a validation message: a fault on our side. | Retry once with the same source_system and external_event_id (a repeat stores nothing more); contact Underlayer with the code if it comes back. |
| 503 | Service busy | SERVICE_BUSY | Every customer event this server instance records at once is taken (a pool of its own: never a payment's or a card event's), or your institution holds its share of them. Answered at once; nothing was stored. Carries Retry-After: 1. | Wait Retry-After seconds, then retry the same event with back-off. |
A repeat of a recorded event (source_system and external_event_id) with the same customer_ref and event_type answers 200 with duplicate: true and the first answer's references and warnings: it is not an error, and its other fields are not read again.
Customer event refusals (400)
error | error_code | When | What to do |
|---|---|---|---|
the body must be a JSON object | BODY_NOT_OBJECT | The body is not a JSON object (the route says so first: Body must be a JSON object). | Send one object. |
institution is not active | INSTITUTION_NOT_ACTIVE | Your institution is not active. | Contact Underlayer. |
external_event_id is required | MISSING_EXTERNAL_EVENT_ID | external_event_id is missing or blank. | Send your reference of the event. |
external_event_id must be at most 128 characters | EXTERNAL_EVENT_ID_TOO_LONG | external_event_id is longer than 128 characters. | Send a shorter reference. |
source_system must be at most 64 characters | SOURCE_SYSTEM_TOO_LONG | source_system is longer than 64 characters. | Send a shorter name, or leave it out (default API). |
customer_ref is required | MISSING_CUSTOMER_REF | customer_ref is missing or blank. | Send the customer's reference. |
references beginning EXAMPLE- come from the documentation and are refused: send your own references | EXAMPLE_ROW | external_event_id or customer_ref begins EXAMPLE-, in any case: a reference copied from the examples. Nothing is stored. | Send your own references. |
event_type is required | MISSING_EVENT_TYPE | event_type is missing or blank. | Send one of the event types. |
event_type must be one of % | INVALID_EVENT_TYPE | event_type is not one of the 14 event types after upper-casing; the answer lists them. | Send one of them (API reference). |
data_classification must be PRODUCTION, TEST, SCALE_TEST or DEMO | INVALID_DATA_CLASSIFICATION | data_classification is not one of the four labels (compared exactly as sent). | Send one of the four, in upper case. |
event_time must be a date YYYY-MM-DD or a date-time YYYY-MM-DDThh:mm[:ss[.ffffff]] with an optional zone Z, +hh:mm or -hh:mm (no zone = UTC), such as 2026-09-01T14:30:00Z | INVALID_DATE_TIME | event_time is not in that grammar. | Send ISO 8601 as described, or leave it out (the time of receipt). |
event_time cannot be later than the time the event is sent | EVENT_TIME_IN_FUTURE | event_time is more than five minutes after the time the event reaches us. | Check your system's clock. |
event_time is more than 400 days in the past: older events are not accepted | EVENT_TIME_TOO_OLD | event_time is more than 400 days before the time the event reaches us. Up to 400 days back is accepted, so past sign-ins can be sent at go-live. | Send only the last 400 days. |
% applies only to CARD_PAYMENT_CONFIRMATION | FIELD_NOT_FOR_EVENT_TYPE | outcome, confirmation_method, merchant_country or card_event_ref was sent with another event type. | Leave the field out of this event. |
card_token applies only to CARD_ADDED and CARD_PAYMENT_CONFIRMATION | FIELD_NOT_FOR_EVENT_TYPE | card_token was sent with another event type. | Leave it out of this event. |
% applies only to PAYEE_ADDED and PAYEE_CHANGED | FIELD_NOT_FOR_EVENT_TYPE | A payee field (payee_name, payee_account, payee_country, payee_type) was sent with another event type. | Leave it out of this event. |
changed_by applies only to a change (%) | FIELD_NOT_FOR_EVENT_TYPE | changed_by was sent with a sign-in, a failed sign-in or a card payment confirmation; the answer lists the change events. | Leave it out of this event. |
changed_by must be CUSTOMER, STAFF or SYSTEM | INVALID_CHANGED_BY | changed_by is another value after upper-casing. | Send one of the three. |
outcome is required for CARD_PAYMENT_CONFIRMATION: APPROVED or DECLINED | MISSING_OUTCOME | A card payment confirmation without outcome. | Send what the customer answered: APPROVED or DECLINED. |
outcome must be APPROVED or DECLINED | INVALID_OUTCOME | outcome is another value after upper-casing. | Send APPROVED or DECLINED. |
confirmation_method must be THREE_DS_CHALLENGE, IN_APP_APPROVAL or OTHER | INVALID_CONFIRMATION_METHOD | confirmation_method is another value after upper-casing. | Send one of the three, or leave it out. |
% must be a two-letter ISO 3166-1 alpha-2 country code such as LT | INVALID_COUNTRY | merchant_country or payee_country is not a code of the platform's country list after upper-casing. | Send the two-letter code, or leave it out. |
payee_name must be a text of at most 200 characters | INVALID_PAYEE_NAME | payee_name is not a text, or is longer than 200 characters. | Send the name as text. |
% must be 1 to 34 letters and digits (spaces are taken out) | INVALID_ACCOUNT | payee_account holds other characters, or is longer than 34 after the spaces are taken out. | Send the account as letters and digits. |
% looks like an IBAN but does not begin with a known country code | INVALID_IBAN_COUNTRY | payee_account is shaped as an IBAN, but its first two letters are no country of the platform's list. | Correct the account. |
% looks like an IBAN but its check digits are wrong | INVALID_IBAN_CHECK_DIGITS | payee_account is shaped as an IBAN and fails the IBAN check (ISO 13616, mod 97). | Correct the account. |
payee_type must be INDIVIDUAL, LEGAL_ENTITY, FINANCIAL_INSTITUTION, GOVERNMENT, MERCHANT or OTHER | INVALID_PAYEE_TYPE | payee_type is another value after upper-casing. | Send one of the six, or leave it out. |
correlation_id must be a text of at most 128 characters | INVALID_CORRELATION_ID | correlation_id is not a text, or is longer than 128 characters. | Send a shorter trace id. |
data_classification % is accepted only by a sandbox institution: a production institution takes PRODUCTION data only | CLASSIFICATION_NOT_ACCEPTED | Your institution is a production institution and the event is TEST, SCALE_TEST or DEMO. Checked after the look-up of a repeat. | Send PRODUCTION, or send test data to your sandbox institution. |
unknown customer_ref % | UNKNOWN_CUSTOMER | No customer of your institution has this reference. An event never creates a customer (a payment may open a provisional one; an event does not). | Send the customer's CDD record first (POST /v1/cdd-ingest), then the event. |
Customer event warnings (in a 200 or 202 answer, not an error)
The session and device fields of an event are read as a payment's (above, "Session and device warnings", the same words; an event has no initiation, which is not read). A card or card event that is not the customer's is not linked, and the answer says so; the event is recorded all the same.
field | message |
|---|---|
card_token | card_token names no card of this customer on file: the event is not linked to a card |
card_event_ref | card_event_ref names no card event of this customer: the event is not linked to a card event |
4b. Card registration: POST /v1/cards
| Status | error | error_code | Meaning | What to do |
|---|---|---|---|---|
| 403 | This API key may not submit <classification> cards | CLASSIFICATION_NOT_ALLOWED_FOR_KEY | The key does not allow the data_classification you sent (default PRODUCTION). | Use a key issued for that classification. |
| 400 | a database refusal, below | per refusal, below | The database refused the card; nothing was stored. | Correct the request. |
| 500 | Card registration error (with code) | ENGINE_ERROR | The database refused the card with something other than a validation message: a fault on our side. | Retry once with the same body (the same card_token never makes a second card); contact Underlayer with the code if it comes back. |
| 503 | Service busy | SERVICE_BUSY | Every customer event or card registration this server instance records at once is taken (they share a pool of their own: never a payment's or a card event's), or your institution holds its share of them. Answered at once; nothing was stored. Carries Retry-After: 1. | Wait Retry-After seconds, then retry the same card with back-off. |
The same card_token with the same values answers 200 with changed: false: it is not an error.
Card registration refusals (400)
The card file on the Data imports screen gives the same refusals (but institution is not active, which only the API answers), with the row's reason code equal to the error_code below.
error | error_code | When | What to do |
|---|---|---|---|
a card must be a JSON object | NOT_AN_OBJECT | The card is not a JSON object (the route says so first: Body must be a JSON object). | Send one object. |
institution is not active | INSTITUTION_NOT_ACTIVE | Your institution is not active. | Contact Underlayer. |
a card takes only card_token, customer_ref, masked_pan, card_type, status and data_classification | UNKNOWN_FIELD | The card holds another field. Nothing is stored, so a card number sent in a field of its own never reaches us. | Send only the six fields. |
% must be text | INVALID_FIELD_TYPE | One of the six fields is a number, a list or an object. | Send it as text. |
card_token is required | MISSING_CARD_TOKEN | card_token is missing or blank. | Send your processor's token for the card. |
card_token holds a full card number: send your processor's token for the card, never its number | FULL_PAN | card_token holds a run of 13 or more digits (a space or a hyphen between two digits does not end the run) in which 13 to 19 digits in a row pass the Luhn check. Nothing is stored. A token with no run of 13 digits is never refused this way: keep long numbers, such as a date and time, apart with a letter or an underscore. | Send the token, never the number. |
card_token must be 1 to 128 letters, digits or . _ : + / = - | INVALID_CARD_TOKEN | card_token is longer than 128 characters or holds other characters. | Send the token as your processor gives it. |
references beginning EXAMPLE- come from the documentation and are refused: send your own references | EXAMPLE_ROW | card_token or customer_ref begins EXAMPLE-, in any case. Nothing is stored. | Send your own references. |
masked_pan holds a full card number: send at most the first six or eight digits and the last four, the rest masked | FULL_PAN | masked_pan holds more than 12 digits, or 13 to 19 digits that pass the Luhn check. Nothing is stored. | Mask the middle digits. |
masked_pan must be digits with the middle masked by *, • or X, such as 411111******1111 | INVALID_MASKED_PAN | masked_pan holds other characters, no masking character, fewer than four digits or more than 32 characters. | Send the masked number, or leave it out. |
card_type must be PHYSICAL_CARD or VIRTUAL_CARD | INVALID_CARD_TYPE | card_type is another value after upper-casing. | Send one of the two, or leave it out. |
status must be ACTIVE, SUSPENDED or TERMINATED | INVALID_STATUS | status is another value after upper-casing. | Send one of the three, or leave it out. |
data_classification must be PRODUCTION, TEST, SCALE_TEST or DEMO | INVALID_DATA_CLASSIFICATION | data_classification is another value after upper-casing. | Send one of the four. |
data_classification % is not accepted by this institution: a production institution takes PRODUCTION data only | CLASSIFICATION_NOT_ACCEPTED | A new card in a production institution with a label other than PRODUCTION. | Send PRODUCTION, or register test cards in your sandbox institution. |
customer_ref is required for a new card | MISSING_CUSTOMER_REF | A new card_token without customer_ref. | Send the customer's reference. |
customer_ref names no customer of this institution: register the customer first | UNKNOWN_CUSTOMER | No customer of your institution has this reference. A card never creates a customer. | Send the customer's CDD record first (POST /v1/cdd-ingest), then the card. |
a card keeps the data_classification it was registered with | CLASSIFICATION_CHANGED | An existing card with another data_classification. | Leave it out, or send the card's own label. |
a card keeps the customer it was registered for: register a new card for another customer | CUSTOMER_CHANGED | An existing card with another customer_ref. | Register the other customer's card under its own token. |
a terminated card stays terminated: register the replacement card under its own card_token | CARD_TERMINATED | A terminated card sent with ACTIVE or SUSPENDED. | Register the replacement card. |
A row of the card file that the database refuses for any other reason is ROW_REFUSED, named by its line, never quoted.
Card registration warnings (in a 200 answer, not an error)
code | message |
|---|---|
OPEN_ALERT_SUSPENDED_CARD | A monitoring alert that suspended this card is still open: the card is active again by your decision |
5. CDD intake: POST /v1/cdd-ingest
| Status | error | error_code | Meaning | What to do |
|---|---|---|---|---|
| 400 | source_system is required | MISSING_SOURCE_SYSTEM | source_system is missing or blank. | Name the system the data comes from. |
| 400 | rows must be a non-empty array | MISSING_ROWS | rows is missing, not an array, or empty. | Send at least one row. |
| 400 | rows may not exceed 50000 per request | TOO_MANY_ROWS | More than 50 000 rows. | Split the file. |
| 400 | classification must be PRODUCTION, TEST or DEMO | INVALID_DATA_CLASSIFICATION | Your key allows the classification you sent, but the CDD intake does not take it (SCALE_TEST). No row was read. | Send TEST instead. |
| 400 | classification % is accepted only by a sandbox institution: a production institution takes PRODUCTION data only | CLASSIFICATION_NOT_ACCEPTED | Your institution is a production institution and the classification you sent is TEST or DEMO. No row was read. | Send PRODUCTION, or send test data to your sandbox institution with its own key. |
| 403 | This API key may not submit <classification> customer data | CLASSIFICATION_NOT_ALLOWED_FOR_KEY | The key does not allow the classification you sent (default PRODUCTION). | Use a key issued for that classification. |
| 500 | Could not start the CDD import (with code) | IMPORT_START_FAILED | The import was refused before any row was read. For example: 42501, the institution cannot receive a CDD import (not an active client institution). | Contact Underlayer. |
| 500 | The CDD import failed (with code) | IMPORT_FAILED | The import failed part-way (for example 57014, the database's time limit). The rows of earlier chunks of 500 are stored. | Send the whole file again: stored rows come back unchanged. |
| 500 | Could not finish the CDD import (with code) | IMPORT_FINISH_FAILED | Every row was processed, but the import could not be closed. | Send the file again; rows come back unchanged. |
CDD row reasons (in a 200 answer)
A refused row does not stop the file. The answer counts it in rejected and lists the first 100 in errors, each with row (its position), customer_ref, reason and detail (which field and what is wrong; never the value you sent, except an account number). A refused row changes no customer; the import keeps the row's accepted fields with its reason, as your institution's record of the import (shown on the CDD import screen).
reason | Meaning (detail) | What to do |
|---|---|---|
UNKNOWN_FIELD | The row has fields outside the CDD format, at any depth (detail names them). Their values are not stored. | Remove or rename the fields (API reference). |
MISSING_CUSTOMER_REF | customer_ref is missing or blank. | Send it. |
EXAMPLE_ROW | customer_ref begins EXAMPLE-: the row comes from a sample. | Replace the sample with your own data. |
MISSING_NAME | A new customer without full_name. | Send it. |
MISSING_COUNTRY_OF_RESIDENCE | A new customer without country_of_residence. | Send it. |
MISSING_ACCOUNT_OPENING_DATE | A new customer without account_opening_date. | Send it. |
INVALID_CUSTOMER_TYPE | customer_type is not Business or Individual. | Correct it. |
INVALID_RISK_RATING | risk_rating is not Low, Medium, High or Critical. | Correct it. |
INVALID_PEP_STATUS | pep_determination is not NOT_PEP, PEP, PEP_FAMILY_OR_CLOSE_ASSOCIATE, FORMER_PEP or NOT_ASSESSED (any case; spaces or hyphens may stand for the underscores), or pep_status disagrees with it. | Send one of the five, and pep_determination alone. |
INVALID_PEP_DETAILS | pep_category, pep_country, pep_since or pep_until sent for a customer who is not PEP, PEP_FAMILY_OR_CLOSE_ASSOCIATE or FORMER_PEP; a category not on the list; pep_until for anything but FORMER_PEP, or before pep_since; pep_source with NOT_ASSESSED or over 100 characters. | Correct the details or the determination. |
INVALID_SANCTIONS_STATUS | sanctions_status is not CLEAR, POTENTIAL_MATCH, CONFIRMED_MATCH or NOT_SCREENED (any case; spaces or hyphens may stand for the underscores). | Send one of the four. |
INVALID_COUNTRY | registration_country, country_of_residence, nationality, id_document_country or pep_country is not a code on the platform's country list (every ISO 3166-1 alpha-2 code and XK, in any case; XX, ZZ and other placeholders are not on it). | Send ISO 3166-1 alpha-2, such as LT. |
INVALID_VALUE | A date (pep_since and pep_until included), number, whole number or pep_status that cannot be read, a negative count or amount, or a date not written YYYY-MM-DD (detail names the field, for example annual_income is not a number). | Correct the field. |
INVALID_NACE_CODE | nace_code is not NACE Rev.2 (G, G46, G46.19). | Correct it or leave it out. |
INVALID_COUNTRIES_OF_OPERATION | countries_of_operation is not an array, or one of its codes is not on the platform's country list. | Send an array such as ["LT","LV"]. |
INVALID_RELATED_PARTIES | related_parties is not an array, or a party lacks full_name, has another role or type, an ownership_pct outside 0..100 or not a number, a date_of_birth / verified_at not in the date grammar, or a country / nationality not on the platform's country list. | Correct the party. |
INVALID_ACCOUNTS | accounts is not an array, an account lacks account_number, its currency is not a code of the platform's ISO 4217 list (three letters that name no currency, such as QZQ, included), or its opened_date or balance cannot be read. | Correct the account. |
ACCOUNT_BELONGS_TO_ANOTHER_CUSTOMER | The account number is already held by another of your customers. | Check the customer or the account number. |
NEW_ACCOUNT_NEEDS_OPENED_DATE | A new account without opened_date. | Send it. |
NEW_ACCOUNT_NEEDS_CURRENCY | A new account without currency. | Send it. |
ROW_REFUSED | The checks above passed but the database still refused the row; its changes were undone. detail names the field or the rule in our words and ends with the database's code, for example the database refused this row: country_of_residence is required (database error 23502) when a field that cannot be cleared was sent empty (country_of_residence, account_opening_date, expected_monthly_turnover, actual_monthly_turnover, pep_determination, pep_status, sanctions_status). It never quotes the database's own message or a value you sent. | Correct the row; contact Underlayer with the code if the reason is unclear. |
6. Database codes you may see in code
Any SQLSTATE can appear in principle; these are the ones the paths described above can raise. A value of the wrong type is not one of them: payments and card events refuse it with a 400 that names the field.
code | Meaning | Where |
|---|---|---|
23502 | A required value is missing (in a CDD row's detail). | CDD rows (ROW_REFUSED). |
23514 | A value the database's rules refuse. | CDD rows (ROW_REFUSED). |
42501 | Not allowed for this institution. | CDD import start. |
57014 | The database's time limit was reached. | Any; retry. |
P0001 | A refusal of ours without a code of its own. | Payments (no decision policy), card events. |
7. The health route
GET /v1/health answers 200 {"status":"ok"} and nothing else. It never answers an error of its own: no answer, or an answer from our hosting provider, means the application server is not serving.
© 2026 Underlayer, Lithuania. info@underlayer.eu System status Privacy notice