# The Underlayer client API's specification as the public documents site serves it: # docs/api/openapi.yaml without its list of internal routes; its server is the client API's own address. openapi: 3.1.0 info: title: Underlayer client API version: '2026-11-17' summary: Real-time payment and card decisioning, decision look-up and CDD intake for e-money and payment institutions. description: | The public API an e-money or payment institution (EMI) calls to have its payments and card events monitored and to send its customer due diligence (CDD) data. Start with the Getting started page (an API key, the sandbox, the first payment end to end, and the topic guides); read this specification as the API reference page, which is generated from it, with the Errors page (every error answer and what to do). Each is checked against the code by an automated test. **A 2xx answer is never an approval.** Only a payment whose `status` is `RELEASED` may be settled. Every other status (`HOLD`, `AI_INVESTIGATION`, `HUMAN_REVIEW`, `ESCALATED`, `BLOCKED`, ...) means: do not settle; wait for the decision webhook or poll the decision. A replayed duplicate answers 200 whatever its status. **Examples use references that begin `EXAMPLE-`, and every endpoint refuses them: an example sent unchanged never creates data.** The payment endpoint refuses an `external_transaction_id` or `customer_ref`, and the card endpoint a `card_token`, that begins `EXAMPLE-` in any case, with a 400 (`references beginning EXAMPLE- come from the documentation and are refused: send your own references`); nothing is stored. The CDD intake refuses a row whose `customer_ref` begins `EXAMPLE-` (row reason `EXAMPLE_ROW`, nothing is stored). **Values are checked before anything is stored.** On the payment and card endpoints every amount, currency, country, flag and card code is read by one set of rules: an amount is a JSON number or a decimal string with at most two decimals, a currency three letters, a country a code of the platform's country list, a card code one of the rule builder's values; codes are upper-cased. A value of the wrong type is refused with a 400 that names the field, never a 500. **Authentication.** Every client endpoint takes the header `X-API-Key: .` (issued once, on the API and webhooks screen, by an administrator of the institution: `ak_` and 16 hexadecimal characters, a dot, 48 hexadecimal characters). The key decides the institution: nothing in a request can choose another one. Each key lists the data classifications it may send (`PRODUCTION`, `TEST`, `DEMO`, `SCALE_TEST`). To rotate a key, switch every caller to the new key first, then revoke the old one: requests with a revoked key answer 401, and 20 failed authentications from one address within 10 minutes refuse that address for 10 minutes, the good key included. **Idempotency and retries.** See the Idempotency and retries guide. In short: a payment is identified by `source_system` + `external_transaction_id` (and by `Idempotency-Key` when you send one): sending it again returns the payment's current decision (its status may have moved on since you sent it) with `duplicate: true` and changes nothing. A card event is identified only by `Idempotency-Key`, so the card endpoint requires it (400 without it), and a repeat returns the card event's first decision. A CDD file can be sent again: unchanged customers are counted as `unchanged` and get no new version. **Error bodies.** Every error is JSON `{ "error": "", "error_code": "" }`: match on the status and `error_code`, a stable code listed on the Errors page (the words are for a person). A server-side refusal adds `code`, the database's error code (an SQLSTATE such as `P0001`, or a PostgREST code such as `PGRST116`), never the database's message. A `400` from the database carries the text of its `VALIDATION:` refusal, which names only what you sent. **Paths and methods not listed here.** A path that is not listed here answers `404` `{"error":"Not found","error_code":"NOT_FOUND"}`, whatever the method (`components.responses.NotFound`). A listed path called with a method not listed for it answers `405` `{"error":"Method not allowed","error_code":"METHOD_NOT_ALLOWED"}` with an `Allow` header naming the methods it takes (`components.responses.MethodNotAllowed`): `HEAD` wherever `GET` is listed, `OPTIONS` nowhere (the API is called from servers and answers no CORS preflight). Both are JSON, read no key and name nothing from the request. A path is matched exactly, in lower case and without a trailing slash: `/V1/HEALTH/` answers `404`. An answer that is not `application/json` comes from our hosting provider (a bare `502` or `504`): retry it with back-off. Rate limiting (`429`, `Retry-After`) is in force: see the Rate limits and back-pressure guide. **Back-pressure.** Each server instance decides at most a fixed number of payments and card events at once, and one institution at most its share of them. Over that, the next one answers at once `503 {"error":"Service busy","error_code":"SERVICE_BUSY"}` with `Retry-After: 1`, before anything is stored; so does a repeat (same key and `Idempotency-Key`) of a request still being decided. When the API key itself cannot be checked the answer is `503 {"error":"Service unavailable","error_code":"SERVICE_UNAVAILABLE"}` with `Retry-After: 5`, never a key error. Retry a `503` with back-off, starting from `Retry-After`: the payment's own reference and the `Idempotency-Key` make a retry safe, never a second payment or card event (a payment's repeat answers its current decision). contact: name: Underlayer servers: - url: https://api.underlayer.eu description: 'The client API''s address, for sandbox and production keys alike. Keep it in your configuration as `UNDERLAYER_BASE_URL`: every path is appended to it.' security: - ApiKey: [] tags: - name: Payments description: Real-time payment intake and the payment decision. - name: Cards description: Card registration, real-time card and ATM authorisation, and the card status webhook. - name: Customers description: CDD / KYC record intake. - name: Customer events description: The customer's sign-ins, credential, contact, payee and card changes, and card payments confirmed in the app. - name: Service description: Liveness of the service. paths: /v1/transactions: post: tags: - Payments operationId: submitPayment summary: Submit a payment for real-time monitoring and get its decision description: | Records the payment and its decision, then evaluates it with the institution's own monitoring rules and screens it against the sanctions lists in real time, within a budget of 12 seconds. A customer's PEP status is your own KYC determination, sent with the customer's record (`pep_determination`). If screening does not finish in time or fails, the payment is held for a person (`HUMAN_REVIEW`, `screening_timeout: true`): it is never released unscreened. When the server has no capacity left to hold it at once, the answer is `202` with `status: SCREENING` and `screening_timeout: true`, and the scheduled sweep holds it within minutes; poll the decision. A payment held this way is screened again in the background within minutes of its arrival: if that screening finds nothing it is released (`decision.released` to the webhook), otherwise it stays held with its alerts. A payment no person has acted on and that arrived less than an hour ago is the only one screened this way; any other stays with a person. - `200` with `status: RELEASED`: screened, nothing found, the payment may settle. - `202` with `status: BLOCKED`: **rejected, and final**: do not settle, and do with the funds what `rejection_action` says (`REJECT` or `FREEZE`); the decision does not change, except that a `FREEZE` can later be lifted to `REJECT` (`decision.freeze_lifted`). - `202` with any other status: **accepted for screening only; do not settle.** The decision changes later (a person, or your decision policy on the AI triage's recommendation); you are told by the decision webhook, or poll `GET /v1/transactions/{id}/decision`. - `200` with `duplicate: true`: this payment was already received (same `source_system` and `external_transaction_id`, or same `Idempotency-Key`); the answer is its current decision. Check `status`: a duplicate answers 200 whatever its status. A repeat must be the same payment: one whose `customer_ref`, `amount`, `currency`, `direction`, `channel` or `instant` differs from the first is refused `409`, and so is one whose `Idempotency-Key` names one payment and whose reference another; nothing is stored. - `202` with `status: POST_EVENT` and `post_event: true`: a payment your system **already executed** while Underlayer could not be reached, sent afterwards with `executed_during_outage: true` and the time it was executed in `transaction_timestamp`. It has no decision: Underlayer never holds, releases or rejects it. It is screened against the sanctions lists and evaluated by your monitoring rules after the event, as of the time it was executed, and any alert goes to your team. Accepted only when your institution's policy for payments while Underlayer cannot be reached is `SKIP_AND_CHECK_LATER` (Settings, Decision policies); not chosen, or `HOLD`, answers 400. A repeat answers `200` with `duplicate: true` and `status: POST_EVENT`. Fields not listed in the schema are ignored. Which fields are required depends on the channel (see `PaymentRequest`). parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: true description: A JSON object, at most 64 000 characters. content: application/json: schema: $ref: '#/components/schemas/PaymentRequest' examples: sepaOutgoing: summary: An outgoing SEPA transfer (example references; never send them with a production key) value: external_transaction_id: EXAMPLE-TX-0001 source_system: CORE-BANKING customer_ref: EXAMPLE-C-0001 account_number: EXAMPLE-ACC-0001 channel: SEPA direction: OUTGOING amount: 1250 currency: EUR transaction_timestamp: '2026-09-01T09:15:00Z' counterparty: Example Supplier GmbH counterparty_country: DE counterparty_type: LEGAL_ENTITY origin_country: LT destination_country: DE payment_reference: Invoice 2026-118 data_classification: TEST withSessionAndPayee: summary: The same transfer with the optional session, device and payee fields (see the Session and device data guide) value: external_transaction_id: EXAMPLE-TX-0002 source_system: CORE-BANKING customer_ref: EXAMPLE-C-0001 channel: SEPA direction: OUTGOING amount: 1250 currency: EUR transaction_timestamp: '2026-09-01T09:15:00Z' counterparty: Example Supplier GmbH counterparty_country: DE counterparty_account: DE89370400440532013000 counterparty_relationship: UNRELATED payee_verification: MATCH available_balance: 4800 balance_currency: EUR ip_address: 203.0.113.10 ip_country: LT device_id: dev-7f3a9c21 device_timezone: Europe/Vilnius session_id: sess-5d1e0b initiation_channel: MOBILE_APP initiation: CUSTOMER_INITIATED device_os: IOS vpn_or_proxy: false remote_access_detected: false data_classification: TEST responses: '200': description: 'Released (`status: RELEASED`), or a replayed duplicate (`duplicate: true`, any status; `status: POST_EVENT` for a payment sent after an outage).' content: application/json: schema: oneOf: - $ref: '#/components/schemas/PaymentDecision' - $ref: '#/components/schemas/PostEventPayment' examples: released: value: duplicate: false transaction_id: 00000000-0000-4000-8000-000000000001 decision_id: 00000000-0000-4000-8000-000000000002 decision_ref: DEC-2026-000123 status: RELEASED rejection_action: null decision_reason: No monitoring rule triggered and no restriction requires review correlation_id: 6f1c2f9e-0000-4000-8000-000000000003 received_at: '2026-09-01T09:15:01.102345+00:00' policy_version: decision-policy-v1.6 alert_id: null triggered_rules: [] rules_evaluated: 9 rules_deferred: 0 tm_latency_ms: 41 total_latency_ms: 63 estimated_next_state: final releasedWithWarning: summary: Released; one session field was malformed and not stored (the payment is never refused for it) value: duplicate: false transaction_id: 00000000-0000-4000-8000-000000000041 decision_id: 00000000-0000-4000-8000-000000000042 decision_ref: DEC-2026-000126 status: RELEASED rejection_action: null decision_reason: No monitoring rule triggered and no restriction requires review correlation_id: 6f1c2f9e-0000-4000-8000-000000000043 received_at: '2026-09-01T09:30:01.102345+00:00' policy_version: decision-policy-v1.6 alert_id: null triggered_rules: [] rules_evaluated: 9 rules_deferred: 0 tm_latency_ms: 40 total_latency_ms: 61 estimated_next_state: final warnings: - field: device_timezone message: 'device_timezone is not an IANA time zone name such as Europe/Vilnius: not stored' duplicate: value: duplicate: true transaction_id: 00000000-0000-4000-8000-000000000001 decision_id: 00000000-0000-4000-8000-000000000002 decision_ref: DEC-2026-000123 status: HUMAN_REVIEW rejection_action: null correlation_id: 6f1c2f9e-0000-4000-8000-000000000003 received_at: '2026-09-01T09:15:01.102345+00:00' policy_version: decision-policy-v1.6 '202': description: 'Accepted for screening only. The payment must not be settled: `status` is not `RELEASED`. With `status: BLOCKED` the payment is rejected and the decision is final: act on `rejection_action`. Or, with `status: POST_EVENT`, a payment your system already executed during an outage: checked after the event, never decided.' content: application/json: schema: oneOf: - $ref: '#/components/schemas/PaymentDecision' - $ref: '#/components/schemas/PostEventPayment' examples: sentAfterOutage: summary: A payment sent with executed_during_outage true value: duplicate: false post_event: true status: POST_EVENT transaction_id: 00000000-0000-4000-8000-000000000031 transaction_ref: RTX-2026-000321 correlation_id: 6f1c2f9e-0000-4000-8000-000000000033 received_at: '2026-09-01T11:40:00.000000+00:00' executed_at: '2026-09-01T09:15:00+00:00' outage_payment_policy: SKIP_AND_CHECK_LATER checks: sanctions_screening: QUEUED monitoring_rules_queued: 9 message: 'Executed by your system before Underlayer checked it: Underlayer does not hold, release or reject it. It is screened and evaluated by your monitoring rules after the event, and any alert goes to your team.' aiTriage: value: duplicate: false transaction_id: 00000000-0000-4000-8000-000000000011 decision_id: 00000000-0000-4000-8000-000000000012 decision_ref: DEC-2026-000124 status: AI_INVESTIGATION rejection_action: null decision_reason: AI triage AIJ-2026-000045 queued correlation_id: 6f1c2f9e-0000-4000-8000-000000000013 received_at: '2026-09-01T09:20:00.000000+00:00' policy_version: decision-policy-v1.6 alert_id: 00000000-0000-4000-8000-000000000014 triggered_rules: - TM-003 v4 rules_evaluated: 9 rules_deferred: 0 tm_latency_ms: 55 total_latency_ms: null estimated_next_state: RELEASED, HUMAN_REVIEW, HOLD or ESCALATED once the AI triage completes screeningDidNotFinish: value: duplicate: false transaction_id: 00000000-0000-4000-8000-000000000021 decision_id: 00000000-0000-4000-8000-000000000022 decision_ref: DEC-2026-000125 status: HUMAN_REVIEW rejection_action: null decision_reason: Real-time screening could not complete - human review required correlation_id: 6f1c2f9e-0000-4000-8000-000000000023 received_at: '2026-09-01T09:25:00.000000+00:00' policy_version: decision-policy-v1.6 alert_id: null triggered_rules: [] rules_evaluated: 0 rules_deferred: 0 tm_latency_ms: null total_latency_ms: null estimated_next_state: HUMAN_REVIEW screening_timeout: true '400': description: | The body is not a JSON object, or the database refused the payment with a `VALIDATION:` message, answered without its prefix. A value of the wrong type is refused this way, with the field's name. The messages are listed on the Errors page, "Payment refusals (400)"; `%` stands for the field or the value you sent: - institution is not active - 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 - data_classification % is not accepted by the decisioning engine - data_classification % is accepted only by a sandbox institution: a production institution takes PRODUCTION data only - external_transaction_id is required - references beginning EXAMPLE- come from the documentation and are refused: send your own references - unknown channel % - channel % is disabled - direction % is not supported on % - % is required - % must be a number - % must be a decimal number such as 125.50 (no exponent, NaN or Infinity) - % may have at most two decimals - % exceeds the largest supported amount, 999999999999.99 - % must be greater than zero - % must be a three-letter ISO 4217 currency code such as EUR - % must be a two-letter ISO 3166-1 alpha-2 country code such as LT - % must be true or false - % must be one of % - % must be 1 to 34 letters and digits (spaces are taken out) - % looks like an IBAN but does not begin with a known country code - % looks like an IBAN but its check digits are wrong - % is required for % payments - instant is only for SEPA payments - unsupported counterparty_type % - counterparty_sector_code % is unknown or retired - unknown customer_ref % - transaction_timestamp is required when executed_during_outage is true: 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 - 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 - 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 Correct the request; do not send it again unchanged. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: notJson: value: error: Body must be valid JSON error_code: BODY_NOT_JSON notObject: value: error: Body must be a JSON object error_code: BODY_NOT_OBJECT validation: summary: The message % is required for % payments, as the caller receives it value: error: counterparty is required for SEPA payments error_code: MISSING_CHANNEL_FIELD amountDecimals: summary: The message % may have at most two decimals, for an amount of 10.123 value: error: amount may have at most two decimals error_code: TOO_MANY_DECIMALS country: summary: The message % must be a two-letter ISO 3166-1 alpha-2 country code such as LT, for origin_country XX value: error: origin_country must be a two-letter ISO 3166-1 alpha-2 country code such as LT error_code: INVALID_COUNTRY exampleReference: summary: An external_transaction_id or customer_ref beginning EXAMPLE- value: error: 'references beginning EXAMPLE- come from the documentation and are refused: send your own references' error_code: EXAMPLE_ROW '401': $ref: '#/components/responses/Unauthorized' '403': description: The key is limited to allowed addresses and the request came from another one, the institution is not active, or this key may not send this data classification. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: addressNotAllowed: value: error: API key not allowed from this address error_code: API_KEY_ADDRESS_NOT_ALLOWED description: The key is limited to allowed addresses and the request came from another one (or from no address the platform recorded). institutionInactive: value: error: Institution is not active error_code: INSTITUTION_NOT_ACTIVE classification: value: error: This API key may not submit TEST payments error_code: CLASSIFICATION_NOT_ALLOWED_FOR_KEY description: The text names the data_classification you sent (default PRODUCTION). '409': description: | The request repeats an earlier payment's reference or key but is not the same payment; nothing was stored. `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` (`%` names the fields that differ: `customer_ref`, `amount`, `currency`, `direction`, `channel`; never a value), or `the Idempotency-Key and the external_transaction_id name two different payments: retry with the key and the reference you sent the first time`. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: differentBody: value: error: 'this external_transaction_id or Idempotency-Key was already used for a payment with a different amount: retry with the same body, or send a new payment with a new external_transaction_id and a new Idempotency-Key' error_code: IDEMPOTENCY_CONFLICT twoPayments: value: error: 'the Idempotency-Key and the external_transaction_id name two different payments: retry with the key and the reference you sent the first time' error_code: REFERENCE_KEY_MISMATCH '413': $ref: '#/components/responses/PayloadTooLarge' '429': $ref: '#/components/responses/TooManyRequests' '500': description: | The database refused the payment with something other than a validation message. `code` is the database's error code: for example `P0001`, no decision policy is in force for your institution. A value of the wrong type is never answered here: it is a 400, and a concurrent repeat waits for the first request and answers its decision. Retry the same request once (it is idempotent); if it fails again with the same code, contact Underlayer. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: engine: value: error: Decisioning engine error error_code: ENGINE_ERROR code: P0001 '503': $ref: '#/components/responses/DecisionServiceUnavailable' /v1/transactions/{id}/decision: get: tags: - Payments operationId: readDecision summary: Read the current decision for one of your payments description: | The authoritative, server-held decision. Poll it after a `202` if you do not use the decision webhook (every few seconds at first, then less often; a person may take hours). Every look-up is your institution's own: a payment of another institution answers 404 and is never read. The answer is never cached (`Cache-Control: no-store`). parameters: - name: id in: path required: true description: | The `transaction_id` or `decision_id` (a UUID) from the payment's answer, the `decision_ref` (`DEC--`), or your own `external_transaction_id`. Your own reference is looked up only when it is not a UUID; when two of your payments from different source systems share it, the answer is 409: use the transaction id or the decision reference. schema: type: string examples: decisionRef: value: DEC-2026-000123 responses: '200': description: 'The decision, or, for a payment sent after an outage, what it is (`status: POST_EVENT`, no decision).' headers: Cache-Control: schema: type: string const: no-store content: application/json: schema: oneOf: - $ref: '#/components/schemas/DecisionView' - $ref: '#/components/schemas/PostEventView' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/InstitutionInactive' '404': description: No decision of your institution has this id or reference. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: notFound: value: error: Decision not found error_code: DECISION_NOT_FOUND '409': description: More than one of your payments has this reference (from different source systems). content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: ambiguous: value: error: 'More than one of your payments has this reference: use the transaction id or the decision reference' error_code: AMBIGUOUS_REFERENCE '429': $ref: '#/components/responses/TooManyRequests' '500': description: The look-up failed on the server. Retry once; if it fails again, contact Underlayer with the `code`. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: lookup: value: error: Lookup failed error_code: LOOKUP_FAILED '503': $ref: '#/components/responses/ServiceUnavailable' /v1/cards: post: tags: - Cards operationId: registerCard summary: Register one of your cards, or update it description: | Registers a card your institution issued, or updates it, by its `card_token` (your card processor's token for the card). A card event (`POST /v1/card-authorizations`) is accepted only for a registered card, so register each card when it is issued, and send its status when you change it (see the Cards guide). A card belongs to one of your customers (`customer_ref`, required for a new card): a card never creates a customer, and a card keeps its customer and its `data_classification` for good. Never send a full card number: a `card_token` or `masked_pan` that holds one (13 to 19 digits that pass the Luhn check, with or without spaces or hyphens) is refused and nothing is stored. `masked_pan` carries at most the first six or eight digits and the last four, the rest masked with `*`, `•` or `X`. `status` is `ACTIVE`, `SUSPENDED` or `TERMINATED`; a terminated card stays terminated. A status you set is yours: it is recorded and audited, and Underlayer sends you no webhook for it. A status Underlayer sets (a rule suspends or terminates the card; a person or an AI closure reinstates it) is sent to your webhook (`cardStatusChanged`). Making active a card that a monitoring alert still open suspended is your decision: it is done, and the answer warns you (`OPEN_ALERT_SUSPENDED_CARD`). The same `card_token` with the same values changes nothing and answers `changed: false`, so no `Idempotency-Key` is needed. A `card_token` or `customer_ref` beginning `EXAMPLE-` is refused. Card registrations share the customer events' back-pressure, never the decisions' capacity. requestBody: required: true description: A JSON object, at most 64 000 characters. content: application/json: schema: $ref: '#/components/schemas/CardRequest' examples: newCard: summary: A new virtual card (example references are refused) value: card_token: EXAMPLE-CARD-0001 customer_ref: EXAMPLE-CUST-0001 masked_pan: 411111******1111 card_type: VIRTUAL_CARD status: ACTIVE data_classification: TEST suspendedByYou: summary: You suspended the card in your own system value: card_token: EXAMPLE-CARD-0001 status: SUSPENDED data_classification: TEST responses: '200': description: 'The card existed: it was updated (`changed: true`), or nothing differed (`changed: false`).' content: application/json: schema: $ref: '#/components/schemas/CardResult' '201': description: 'The card was registered (`created: true`).' content: application/json: schema: $ref: '#/components/schemas/CardResult' examples: registered: value: created: true changed: true warnings: [] card: card_id: 00000000-0000-4000-8000-000000000051 card_token: tok_7Hf2kQ9 customer_ref: C-1001 masked_pan: 411111******1111 card_type: VIRTUAL_CARD status: ACTIVE data_classification: TEST updated_at: '2026-10-29T12:40:25.118402+00:00' '400': description: | The body is not a JSON object, or the database refused the card with a `VALIDATION:` message, answered without its prefix. The messages are listed on the Errors page, "Card registration refusals (400)"; `%` stands for the field or its value: - a card must be a JSON object - institution is not active - a card takes only card_token, customer_ref, masked_pan, card_type, status and data_classification - % must be text - card_token is required - card_token holds a full card number: send your processor's token for the card, never its number - card_token must be 1 to 128 letters, digits or . _ : + / = - - references beginning EXAMPLE- come from the documentation and are refused: 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 - masked_pan must be digits with the middle masked by *, • or X, such as 411111******1111 - card_type must be PHYSICAL_CARD or VIRTUAL_CARD - status must be ACTIVE, SUSPENDED or TERMINATED - data_classification must be PRODUCTION, TEST, SCALE_TEST or DEMO - data_classification % is not accepted by this institution: a production institution takes PRODUCTION data only - customer_ref is required for a new card - customer_ref names no customer of this institution: register the customer first - a card keeps the data_classification it was registered with - a card keeps the customer it was registered for: register a new card for another customer - a terminated card stays terminated: register the replacement card under its own card_token Correct the request; do not send it again unchanged. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: notJson: value: error: Body must be valid JSON error_code: BODY_NOT_JSON notObject: value: error: Body must be a JSON object error_code: BODY_NOT_OBJECT fullCardNumber: value: error: 'masked_pan holds a full card number: send at most the first six or eight digits and the last four, the rest masked' error_code: FULL_PAN unknownCustomer: value: error: 'customer_ref names no customer of this institution: register the customer first' error_code: UNKNOWN_CUSTOMER exampleReference: summary: An EXAMPLE- reference, as in the request examples above value: error: 'references beginning EXAMPLE- come from the documentation and are refused: send your own references' error_code: EXAMPLE_ROW '401': $ref: '#/components/responses/Unauthorized' '403': description: The key is limited to allowed addresses and the request came from another one, the institution is not active, or this key may not send this data classification. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: addressNotAllowed: value: error: API key not allowed from this address error_code: API_KEY_ADDRESS_NOT_ALLOWED description: The key is limited to allowed addresses and the request came from another one (or from no address the platform recorded). institutionInactive: value: error: Institution is not active error_code: INSTITUTION_NOT_ACTIVE classification: value: error: This API key may not submit TEST cards error_code: CLASSIFICATION_NOT_ALLOWED_FOR_KEY '413': $ref: '#/components/responses/PayloadTooLarge' '429': $ref: '#/components/responses/TooManyRequests' '500': description: | The database refused the card with something other than a validation message, a fault on our side; `code` is its error code. Retry once with the same body: the same `card_token` never makes a second card. Contact Underlayer with the `code` if it comes back. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: engine: value: error: Card registration error error_code: ENGINE_ERROR code: P0001 '503': $ref: '#/components/responses/EventServiceUnavailable' /v1/card-authorizations: post: tags: - Cards operationId: authorizeCard summary: Decide a card or ATM authorisation in real time description: | Records the card event, evaluates the institution's active real-time card rules and answers `APPROVED` or `DECLINED` at once; alerts, card actions (suspend, terminate) and the AI triage follow in the background and the answer never waits for them. A refund (`CARD_REFUND`) or a reversal (`CARD_REVERSAL`) is recorded and evaluated by the same rules, and answered `REFUNDED` or `REVERSED`: it is never declined. A reversal names the approved authorisation or withdrawal of the same card it undoes (`original_event_ref`, the `event_ref` answered for it); a refund may. What is refunded and reversed against one event never exceeds its amount. The card must already be registered for your institution under the same data classification (`POST /v1/cards`, or the card file on the Data imports screen); otherwise the event is refused with `unknown card_token`. A card a rule suspends or terminates on this event is reported to your webhook (`card.suspended`, `card.terminated`; the `cardStatusChanged` webhook), seconds after the answer. The `Idempotency-Key` header is required: a card event is recognised only by it. Without it the event is refused (400) before anything else is read. Send a unique key for each event and the same key when you retry: a repeated key answers the card event's first decision with `duplicate: true`, and two requests with the same key wait for each other, so a concurrent repeat answers the card event's first decision too. A repeat must be the same event: one whose `card_token`, `event_type`, `amount` or `currency` differs from the first is refused `409` and nothing is stored. Currencies, `merchant_country` and the card codes are upper-cased on arrival and checked before anything is stored (see `CardAuthorizationRequest`): a value of the wrong type or outside its values is a 400 naming the field. `event_type` and `data_classification` are compared exactly as sent. `cvv_result` or `pin_result` `NO_MATCH` declines the event. A `card_token` beginning `EXAMPLE-` is refused. parameters: - $ref: '#/components/parameters/CardIdempotencyKey' requestBody: required: true description: A JSON object, at most 64 000 characters. content: application/json: schema: $ref: '#/components/schemas/CardAuthorizationRequest' examples: ecommerce: summary: An e-commerce card payment (example references; an EXAMPLE- card token is refused) value: event_type: CARD_AUTHORIZATION card_token: EXAMPLE-CARD-0001 amount: 49.9 currency: EUR event_time: '2026-09-02T18:04:11Z' merchant_name: Example Shop UAB merchant_id: EXAMPLE-MERCHANT-01 mcc: '5732' merchant_country: LT entry_mode: ECOMMERCE three_ds_result: AUTHENTICATED data_classification: TEST reversal: summary: A reversal of an approved authorisation (original_event_ref is the event_ref answered for it) value: event_type: CARD_REVERSAL card_token: EXAMPLE-CARD-0001 amount: 49.9 currency: EUR original_event_ref: CAE-2026-000321 data_classification: TEST responses: '200': description: 'The decision (`APPROVED` or `DECLINED`; `REFUNDED` or `REVERSED` for a refund or reversal), or a replayed duplicate (`duplicate: true`).' content: application/json: schema: $ref: '#/components/schemas/CardAuthorizationResult' examples: approved: value: duplicate: false event_id: 00000000-0000-4000-8000-000000000031 event_ref: CAE-2026-000321 authorization_result: APPROVED decline_reason: null flagged: false rules_fired: [] alerts_generated: 0 correlation_id: 6f1c2f9e-0000-4000-8000-000000000033 latency_ms: 18 '400': description: | The body is not a JSON object, or the database refused the event with a `VALIDATION:` message, answered without its prefix. A missing `Idempotency-Key` and a value of the wrong type are refused this way. The messages are listed on the Errors page, "Card refusals (400)"; `%` stands for the field or its values: - the Idempotency-Key header is required for card events: send a unique key for each event and the same key when you retry it - the Idempotency-Key may be at most 255 characters - data_classification % is not accepted by the decisioning engine - data_classification % is accepted only by a sandbox institution: a production institution takes PRODUCTION data only - event_type must be CARD_AUTHORIZATION, ATM_WITHDRAWAL, CARD_REFUND or CARD_REVERSAL - % is required - % must be a number - % must be a decimal number such as 125.50 (no exponent, NaN or Infinity) - % may have at most two decimals - % exceeds the largest supported amount, 999999999999.99 - % must be greater than zero - % must be a three-letter ISO 4217 currency code such as EUR - % must be a two-letter ISO 3166-1 alpha-2 country code such as LT - % must be one of % - card_token is required - references beginning EXAMPLE- come from the documentation and are refused: send your own references - 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 - unknown card_token - card_txn_type of a refund must be REFUND - original_event_ref is required for a reversal: send the event_ref of the authorisation or withdrawal it reverses - original_event_ref must name an approved authorisation or withdrawal of this card - currency must be the currency of the original event - event_time cannot be before the original event - amount exceeds what is left of the original event to refund or reverse - billing_amount is required when billing_currency is not the billing currency of the original event Correct the request; do not send it again unchanged. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: notJson: value: error: Body must be valid JSON error_code: BODY_NOT_JSON notObject: value: error: Body must be a JSON object error_code: BODY_NOT_OBJECT validation: value: error: unknown card_token error_code: UNKNOWN_CARD noIdempotencyKey: summary: No Idempotency-Key header value: error: 'the Idempotency-Key header is required for card events: send a unique key for each event and the same key when you retry it' error_code: MISSING_IDEMPOTENCY_KEY cvvFail: summary: cvv_result FAIL is refused with the message % must be one of % value: error: cvv_result must be one of MATCH, NO_MATCH, NOT_PROVIDED error_code: INVALID_OPTION exampleToken: summary: A card_token beginning EXAMPLE-, as in the request example above value: error: 'references beginning EXAMPLE- come from the documentation and are refused: send your own references' error_code: EXAMPLE_ROW '401': $ref: '#/components/responses/Unauthorized' '403': description: The key is limited to allowed addresses and the request came from another one, the institution is not active, or this key may not send this data classification. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: addressNotAllowed: value: error: API key not allowed from this address error_code: API_KEY_ADDRESS_NOT_ALLOWED description: The key is limited to allowed addresses and the request came from another one (or from no address the platform recorded). institutionInactive: value: error: Institution is not active error_code: INSTITUTION_NOT_ACTIVE classification: value: error: This API key may not submit TEST events error_code: CLASSIFICATION_NOT_ALLOWED_FOR_KEY '409': description: | The request repeats an earlier card event's `Idempotency-Key` but is not the same event; nothing was stored. `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` (`%` names the fields that differ: `card_token`, `event_type`, `amount`, `currency`; never a value). content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: differentBody: value: error: 'this Idempotency-Key was already used for a card event with a different amount: retry with the same body, or send a new event with a new Idempotency-Key' error_code: IDEMPOTENCY_CONFLICT '413': $ref: '#/components/responses/PayloadTooLarge' '429': $ref: '#/components/responses/TooManyRequests' '500': description: | The database refused the event with something other than a validation message, a fault on our side; `code` is its error code. A value of the wrong type is never answered here (it is a 400), and neither is a concurrent request with the same `Idempotency-Key` (it waits for the first). Retry once with the same `Idempotency-Key`; contact Underlayer with the `code` if it comes back. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: engine: value: error: Authorization engine error error_code: ENGINE_ERROR code: P0001 '503': $ref: '#/components/responses/DecisionServiceUnavailable' /v1/customer-events: post: tags: - Customer events operationId: submitCustomerEvent summary: Record something the customer did that is not a payment description: | Records one customer event: a sign-in, a failed sign-in, a new device, a changed password, two-step sign-in, e-mail, phone, address or limit, an added or changed payee, an added card, or a card payment the customer confirmed in your app (`CARD_PAYMENT_CONFIRMATION`: a 3-D Secure challenge or an approval in the app, with the session and device data your app saw; a card event itself carries none). Nothing is decided and no rule runs on an event: it keeps the customer's device ledger and is shown on the customer's Digital activity tab (see the Customer events guide). The customer must already be yours (`customer_ref`): an event never creates a customer. An event is identified by `source_system` + `external_event_id`: sending it again answers the first answer with `duplicate: true` and stores nothing more, so no `Idempotency-Key` is needed. A repeat must be the same event: one whose `customer_ref` or `event_type` differs from the first is refused `409` and nothing is stored. `event_time` may be up to 400 days in the past, so you can send your customers' past sign-ins at go-live; it may not be later than the time it is sent. The session and device fields are read as on a payment: a malformed one is not stored and the answer carries `warnings` (it never refuses the event), a field left out says nothing. An `external_event_id` or `customer_ref` beginning `EXAMPLE-` is refused. The events take their own back-pressure, separate from payments and card events: a burst of sign-ins never takes the decisions' capacity. requestBody: required: true description: A JSON object, at most 64 000 characters. content: application/json: schema: $ref: '#/components/schemas/CustomerEventRequest' examples: signIn: summary: A sign-in from the customer's phone (example references are refused) value: external_event_id: EXAMPLE-EVENT-0001 source_system: MOBILE-APP customer_ref: EXAMPLE-CUST-0001 event_type: LOGIN_SUCCESS event_time: '2026-09-02T18:01:07Z' ip_address: 203.0.113.10 device_id: EXAMPLE-DEVICE-7F3A9C21 device_timezone: Europe/Vilnius session_id: EXAMPLE-SESSION-0001 initiation_channel: MOBILE_APP device_os: IOS data_classification: TEST cardConfirmation: summary: A card payment the customer approved in the app (3-D Secure challenge) value: external_event_id: EXAMPLE-EVENT-0002 customer_ref: EXAMPLE-CUST-0001 event_type: CARD_PAYMENT_CONFIRMATION outcome: APPROVED confirmation_method: THREE_DS_CHALLENGE card_token: EXAMPLE-CARD-0001 merchant_country: DE ip_address: 203.0.113.10 device_id: EXAMPLE-DEVICE-7F3A9C21 data_classification: TEST responses: '200': description: 'A repeat of a recorded event (`duplicate: true`): the first answer''s references and warnings; nothing more is stored.' content: application/json: schema: $ref: '#/components/schemas/CustomerEventResult' '202': description: The event was recorded. Nothing is decided; `warnings` is present only when a session, device or card field was not used. content: application/json: schema: $ref: '#/components/schemas/CustomerEventResult' examples: recorded: value: duplicate: false event_id: 00000000-0000-4000-8000-000000000041 event_ref: CEV-2026-000123 event_type: LOGIN_SUCCESS received_at: '2026-09-02T18:01:08.204719+00:00' '400': description: | The body is not a JSON object, or the database refused the event with a `VALIDATION:` message, answered without its prefix. The messages are listed on the Errors page, "Customer event refusals (400)"; `%` stands for the field or its values: - the body must be a JSON object - institution is not active - external_event_id is required - external_event_id must be at most 128 characters - source_system must be at most 64 characters - customer_ref is required - references beginning EXAMPLE- come from the documentation and are refused: send your own references - event_type is required - event_type must be one of % - data_classification must be PRODUCTION, TEST, SCALE_TEST or DEMO - 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 - event_time cannot be later than the time the event is sent - event_time is more than 400 days in the past: older events are not accepted - % applies only to CARD_PAYMENT_CONFIRMATION - card_token applies only to CARD_ADDED and CARD_PAYMENT_CONFIRMATION - % applies only to PAYEE_ADDED and PAYEE_CHANGED - changed_by applies only to a change (%) - changed_by must be CUSTOMER, STAFF or SYSTEM - outcome is required for CARD_PAYMENT_CONFIRMATION: APPROVED or DECLINED - outcome must be APPROVED or DECLINED - confirmation_method must be THREE_DS_CHALLENGE, IN_APP_APPROVAL or OTHER - % must be a two-letter ISO 3166-1 alpha-2 country code such as LT - payee_name must be a text of at most 200 characters - % must be 1 to 34 letters and digits (spaces are taken out) - % looks like an IBAN but does not begin with a known country code - % looks like an IBAN but its check digits are wrong - payee_type must be INDIVIDUAL, LEGAL_ENTITY, FINANCIAL_INSTITUTION, GOVERNMENT, MERCHANT or OTHER - correlation_id must be a text of at most 128 characters - data_classification % is accepted only by a sandbox institution: a production institution takes PRODUCTION data only - unknown customer_ref % Correct the request; do not send it again unchanged. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: notJson: value: error: Body must be valid JSON error_code: BODY_NOT_JSON notObject: value: error: Body must be a JSON object error_code: BODY_NOT_OBJECT unknownCustomer: value: error: unknown customer_ref C-0042 error_code: UNKNOWN_CUSTOMER exampleReference: summary: An EXAMPLE- reference, as in the request examples above value: error: 'references beginning EXAMPLE- come from the documentation and are refused: send your own references' error_code: EXAMPLE_ROW '401': $ref: '#/components/responses/Unauthorized' '403': description: The key is limited to allowed addresses and the request came from another one, the institution is not active, or this key may not send this data classification. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: addressNotAllowed: value: error: API key not allowed from this address error_code: API_KEY_ADDRESS_NOT_ALLOWED description: The key is limited to allowed addresses and the request came from another one (or from no address the platform recorded). institutionInactive: value: error: Institution is not active error_code: INSTITUTION_NOT_ACTIVE classification: value: error: This API key may not submit TEST events error_code: CLASSIFICATION_NOT_ALLOWED_FOR_KEY '409': description: | The request repeats an earlier event's `source_system` and `external_event_id` but is not the same event; nothing was stored. `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` (`%` names the fields that differ: `customer_ref`, `event_type`; never a value). content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: differentBody: value: error: 'this source_system and external_event_id were already used for a customer event with a different event_type: retry with the same body, or send a new event with a new external_event_id' error_code: IDEMPOTENCY_CONFLICT '413': $ref: '#/components/responses/PayloadTooLarge' '429': $ref: '#/components/responses/TooManyRequests' '500': description: | The database refused the event with something other than a validation message, a fault on our side; `code` is its error code. Retry once with the same `source_system` and `external_event_id`: a repeat never stores a second event. Contact Underlayer with the `code` if it comes back. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: engine: value: error: Customer event engine error error_code: ENGINE_ERROR code: P0001 '503': $ref: '#/components/responses/EventServiceUnavailable' /v1/cdd-ingest: post: tags: - Customers operationId: ingestCdd summary: Send customer due diligence (CDD / KYC) records description: | Creates or updates customers, their related parties and accounts, one row per customer. Each row is accepted or refused on its own: a refused row never stops the rest (its reason is in `errors`). An accepted row that changes the customer's CDD record creates a new CDD version; a row that changes nothing is counted as `unchanged`. The rows are processed in chunks of 500, each committed on its own. If the import fails half-way (500), the rows of the chunks before are already stored: send the whole file again, the stored rows come back as `unchanged`. In a row, a field you leave out keeps the stored value; a field you send empty or null clears it, except `full_name`, `customer_type` and `risk_rating`, which keep the stored value, and `country_of_residence`, `account_opening_date`, `expected_monthly_turnover`, `actual_monthly_turnover`, `pep_determination`, `pep_status` and `sanctions_status`, which cannot be cleared (the row is refused, `ROW_REFUSED`, database error 23502). A row whose `customer_ref` begins `EXAMPLE-` is refused (`EXAMPLE_ROW`): the examples here can never create a customer. requestBody: required: true description: A JSON object, at most 2 000 000 characters and 50 000 rows. content: application/json: schema: $ref: '#/components/schemas/CddIngestRequest' examples: onboarding: summary: One business customer with its owners and account (example references, refused as EXAMPLE_ROW) value: source_system: CRM source_file: onboarding-2026-09-01.json classification: TEST rows: - customer_ref: EXAMPLE-C-0003 full_name: Example Logistics UAB customer_type: Business country_of_residence: LT account_opening_date: '2024-03-01' risk_rating: Medium pep_determination: NOT_PEP registration_number: '304999999' nace_code: H49.41 countries_of_operation: - LT - LV - PL expected_monthly_turnover: 250000 related_parties: - full_name: Example Owner role: UBO type: NATURAL ownership_pct: 60 nationality: LT accounts: - account_number: EXAMPLE-ACC-0003 currency: EUR opened_date: '2024-03-01' responses: '200': description: The import ran. Check `rejected` and `errors`; an import whose every row was refused still answers 200. content: application/json: schema: $ref: '#/components/schemas/CddIngestResult' examples: sampleRowRefused: value: ok: true batch_ref: CDD-2026-000042 inserted: 0 updated: 0 unchanged: 0 rejected: 1 errors: - row: 1 customer_ref: EXAMPLE-C-0003 reason: EXAMPLE_ROW detail: 'this row comes from the sample file: replace it with your own data' '400': description: | The body is not a JSON object, the envelope is incomplete, or the database refused the import before any row was read with a `VALIDATION:` message, answered without its prefix: - classification must be PRODUCTION, TEST or DEMO - classification % is accepted only by a sandbox institution: a production institution takes PRODUCTION data only The first answers a `classification` your key allows but the CDD intake does not take (`SCALE_TEST`); the second a `TEST` or `DEMO` classification sent to a production institution, which takes production data only. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: notJson: value: error: Body must be valid JSON error_code: BODY_NOT_JSON notObject: value: error: Body must be a JSON object error_code: BODY_NOT_OBJECT noSource: value: error: source_system is required error_code: MISSING_SOURCE_SYSTEM noRows: value: error: rows must be a non-empty array error_code: MISSING_ROWS tooManyRows: value: error: rows may not exceed 50000 per request error_code: TOO_MANY_ROWS classification: summary: classification SCALE_TEST, which the key allows value: error: classification must be PRODUCTION, TEST or DEMO error_code: INVALID_DATA_CLASSIFICATION '401': $ref: '#/components/responses/Unauthorized' '403': description: The key is limited to allowed addresses and the request came from another one, the institution is not active, or this key may not send this classification. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: addressNotAllowed: value: error: API key not allowed from this address error_code: API_KEY_ADDRESS_NOT_ALLOWED description: The key is limited to allowed addresses and the request came from another one (or from no address the platform recorded). institutionInactive: value: error: Institution is not active error_code: INSTITUTION_NOT_ACTIVE classification: value: error: This API key may not submit TEST customer data error_code: CLASSIFICATION_NOT_ALLOWED_FOR_KEY '413': $ref: '#/components/responses/PayloadTooLarge' '429': $ref: '#/components/responses/TooManyRequests' '500': description: | The import could not start, failed part-way or could not finish; `code` is the database's error code (at the start, for example `42501`: the institution cannot receive a CDD import). After a failure part-way, send the whole file again (rows already stored come back `unchanged`). content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: start: value: error: Could not start the CDD import error_code: IMPORT_START_FAILED code: '42501' failed: value: error: The CDD import failed error_code: IMPORT_FAILED code: '57014' finish: value: error: Could not finish the CDD import error_code: IMPORT_FINISH_FAILED code: null '503': $ref: '#/components/responses/ServiceUnavailable' /v1/health: get: tags: - Service operationId: health summary: Liveness description: | Answers `200 {"status":"ok"}` when the application server is up and serving its API routes. It needs no key, reads nothing from the request, makes no database call and is not rate limited. It does **not** say whether the database is reachable: a payment can still fail while this answers ok. security: [] responses: '200': description: The application server is up. headers: Cache-Control: schema: type: string const: no-store content: application/json: schema: $ref: '#/components/schemas/Health' examples: ok: value: status: ok webhooks: decisionStatusChanged: post: operationId: decisionStatusChanged summary: A payment decision changed status description: | Sent to the institution's webhook URL (set on the API and webhooks screen) on every status change of a payment decision after it was received: `decision.screening`, `decision.released`, `decision.hold`, `decision.ai_investigation`, `decision.human_review`, `decision.blocked`, `decision.escalated`, `decision.expired`, `decision.failed`; and `decision.freeze_lifted` when a rejected payment's freeze is lifted (below). A card's status change has a webhook of its own (`cardStatusChanged`). **A freeze lifted.** A payment rejected with `rejection_action` `FREEZE` stays rejected. When every sanctions alert of the payment is later cleared as a false positive, its `rejection_action` becomes `REJECT` and `decision.freeze_lifted` is sent once, with `status` `BLOCKED` and `rejection_action` `REJECT`: the funds may now be handled as for any rejected payment (money that came in goes back under your own procedure). It is sent only for a payment that was rejected with `FREEZE`, never twice, and never while another of its sanctions alerts is confirmed or still awaiting a decision. The decision's `freeze_lifted_at` says when. **Verify every delivery.** `X-Underlayer-Signature` is `sha256=` and the hexadecimal HMAC-SHA256, keyed with the webhook secret, of `.` (the timestamp in Unix seconds, a dot, the body exactly as received). Refuse a delivery whose signature does not match or whose timestamp is too old. Nothing is sent unsigned: without a secret the delivery is skipped. **Delivery.** The webhook URL's host name must resolve to public internet addresses only: a delivery is not sent to a name that resolves to a private, loopback, link-local or other reserved address, and the connection goes to the address that was checked. A redirect is not followed. Answer any 2xx within 10 seconds. Otherwise (a 3xx included) the delivery is retried after 1 minute, 5 minutes, 15 minutes, 1 hour, 4 hours, 12 hours and 24 hours, and marked failed after 8 attempts. A delivery can arrive more than once and out of order: de-duplicate by `X-Underlayer-Idempotency-Key` and order by `occurred_at`; when in doubt, read the decision. parameters: - name: X-Underlayer-Event in: header required: true schema: type: string description: decision., or decision.freeze_lifted - name: X-Underlayer-Delivery in: header required: true schema: type: string format: uuid description: The delivery's id (the same on every attempt). - name: X-Underlayer-Idempotency-Key in: header required: true schema: type: string description: :, the same on every attempt. - name: X-Underlayer-Timestamp in: header required: true schema: type: string description: Unix seconds when this attempt was signed. - name: X-Underlayer-Signature in: header required: true schema: type: string description: sha256= requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DecisionWebhookEvent' responses: 2XX: description: Received. Any other answer, or none within 10 seconds, is retried. cardStatusChanged: post: operationId: cardStatusChanged summary: Underlayer changed the status of one of your cards description: | Sent to the institution's webhook URL, signed and delivered exactly as `decisionStatusChanged` (the same secret, headers, retries and verification), each time Underlayer changes the status of one of your cards: `card.suspended` and `card.terminated` (a monitoring rule acted on a card event; `reason_code` `RULE`) and `card.reinstated` (the card is active again: `PERSON`, a person reinstated it; `PERSON_CLEARING`, a person cleared the last alert that suspended it; `AI_CLOSURE`, the AI triage closed that alert and your decision policy lets such a closure reinstate a card). Apply the status in your card processor; when in doubt, keep the card suspended and ask your team. A change that changes nothing, and a status you set yourself (`POST /v1/cards`), send nothing. The payload never carries a card number: the card is named by your `card_token`. `X-Underlayer-Idempotency-Key` is `card:`, the same on every attempt. De-duplicate by it and order by `occurred_at`. parameters: - name: X-Underlayer-Event in: header required: true schema: type: string enum: - card.suspended - card.terminated - card.reinstated description: The event type. - name: X-Underlayer-Delivery in: header required: true schema: type: string format: uuid description: The delivery's id (the same on every attempt). - name: X-Underlayer-Idempotency-Key in: header required: true schema: type: string description: card:, the same on every attempt. - name: X-Underlayer-Timestamp in: header required: true schema: type: string description: Unix seconds when this attempt was signed. - name: X-Underlayer-Signature in: header required: true schema: type: string description: sha256= requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CardWebhookEvent' responses: 2XX: description: Received. Any other answer, or none within 10 seconds, is retried. components: securitySchemes: ApiKey: type: apiKey in: header name: X-API-Key description: '`.`, for example `ak_0123456789abcdef.<48 hexadecimal characters>`. Only a hash of the secret is stored; a lost key cannot be shown again, issue a new one. A key may be limited to allowed IP addresses and ranges: from any other address it answers `403` (`API key not allowed from this address`).' parameters: IdempotencyKey: name: Idempotency-Key in: header required: false description: | Your unique key for this payment, unique within your institution (for example a UUID). Optional: a payment is also recognised by `source_system` + `external_transaction_id` without it. A repeated key creates nothing new and answers `duplicate: true` with the payment's current decision, which may have moved on since you sent it (from AI_INVESTIGATION to RELEASED or BLOCKED, for example). A repeat must be the same payment: one whose compared fields differ from the earlier one's is refused `409` and nothing is stored. Requests with the same key wait for each other, so a concurrent repeat answers the first request's decision. (A card event's `Idempotency-Key` is required, and a repeat there answers the card event's first decision: see `POST /v1/card-authorizations`.) schema: type: string CardIdempotencyKey: name: Idempotency-Key in: header required: true description: | Required for card events: a card event is recognised only by this key. Send a unique key for each event (for example a UUID), at most 255 characters, and the same key when you retry it. Without it, or with a blank one, the event is refused (400) before anything else is read. A repeated key with the same `card_token`, `event_type`, `amount` and `currency` answers the card event's first decision with `duplicate: true`; with another of them it is refused `409`. Requests with the same key wait for each other, so a concurrent repeat answers the card event's first decision too. schema: type: string minLength: 1 maxLength: 255 example: 3f0c7d2e-5b1a-4c8e-9d2f-000000000041 headers: RetryAfter: description: Whole seconds to wait before the next request (on a 429, and on a 503 `Service busy` or `Service unavailable`). schema: type: integer minimum: 1 Allow: description: The methods the path takes, comma-separated, for example `POST` or `GET, HEAD`. schema: type: string responses: NotFound: description: | Not an endpoint of this API: the answer to any method on a path that is not listed in `paths` (a misspelt path, a segment too many or too few, a path in other letter case or with a trailing slash). It reads no key and names nothing from the request. Check the path; do not retry unchanged. headers: Cache-Control: schema: type: string const: no-store content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: notFound: value: error: Not found error_code: NOT_FOUND MethodNotAllowed: description: | The answer to a listed path called with a method not listed for it, for example `GET /v1/transactions`. `Allow` names the methods the path takes: `HEAD` wherever `GET` is listed, `OPTIONS` nowhere (no CORS preflight). It reads no key and names nothing from the request. Use a method from `Allow`; do not retry unchanged. headers: Allow: $ref: '#/components/headers/Allow' Cache-Control: schema: type: string const: no-store content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: methodNotAllowed: value: error: Method not allowed error_code: METHOD_NOT_ALLOWED Unauthorized: description: The key is missing, malformed (not `.`), unknown, revoked or wrong. Check the key; do not retry the same request. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: missing: value: error: Missing or malformed API key error_code: API_KEY_MISSING invalid: value: error: Invalid or revoked API key error_code: API_KEY_INVALID InstitutionInactive: description: The key is limited to allowed addresses and the request came from another one (or from no address the platform recorded), or the key belongs to an institution that is not active. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: addressNotAllowed: value: error: API key not allowed from this address error_code: API_KEY_ADDRESS_NOT_ALLOWED institutionInactive: value: error: Institution is not active error_code: INSTITUTION_NOT_ACTIVE PayloadTooLarge: description: The body is larger than the limit (64 000 bytes for payments, card events and customer events, 2 000 000 for a CDD import); a larger Content-Length is refused before the body is read and before the key is checked. Split it. content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: tooLarge: value: error: Request body too large error_code: BODY_TOO_LARGE TooManyRequests: description: | Rate limited. Wait the seconds in `Retry-After`, then retry the same request. Limits are per server instance: 3 000 requests a minute per key (bursts of 1 000), 120 a minute per address for keys not yet seen, and 20 failed authentications per address within 10 minutes, after which the address is refused for 10 minutes, the right key included. headers: Retry-After: $ref: '#/components/headers/RetryAfter' content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: failedAuthentications: value: error: Too many failed authentication attempts from this address; retry after the number of seconds in Retry-After error_code: TOO_MANY_FAILED_AUTHENTICATIONS perKey: value: error: Too many requests for this API key; retry after the number of seconds in Retry-After error_code: RATE_LIMITED_KEY perAddress: value: error: Too many requests from this address; retry after the number of seconds in Retry-After error_code: RATE_LIMITED_ADDRESS ServiceUnavailable: description: | The service cannot take the request now; your key was not judged. `Service unavailable`: the key could not be checked (the database did not answer three tries); wait the seconds in `Retry-After` (5). `Service temporarily unavailable`: the service's rate-limit settings are unusable (no `Retry-After`). Retry with back-off (for example 1 s, 2 s, 4 s ... up to a minute); a retry with the same request is safe. headers: Retry-After: $ref: '#/components/headers/RetryAfter' content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: keyCheck: value: error: Service unavailable error_code: SERVICE_UNAVAILABLE settings: value: error: Service temporarily unavailable error_code: SERVICE_SETTINGS_UNUSABLE DecisionServiceUnavailable: description: | The service cannot take the payment or card event now; nothing was stored and your key was not judged. `Service busy`: every decision this server instance runs at once is taken, your institution already holds its share of them (known once the key is checked), or a request with the same API key and `Idempotency-Key` is still being decided here. It is answered at once, before anything is stored; wait the seconds in `Retry-After` (1). `Service unavailable`: the key could not be checked (the database did not answer three tries); wait `Retry-After` (5). `Service temporarily unavailable`: a setting of the service is unusable (no `Retry-After`). Retry the same request with back-off (for example 1 s, 2 s, 4 s ... up to a minute): a payment's `source_system` + `external_transaction_id` (and `Idempotency-Key`), and a card event's `Idempotency-Key`, make the retry safe: it never creates a second payment or card event (what a repeat answers is in the Idempotency and retries guide). headers: Retry-After: $ref: '#/components/headers/RetryAfter' content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: busy: value: error: Service busy error_code: SERVICE_BUSY keyCheck: value: error: Service unavailable error_code: SERVICE_UNAVAILABLE settings: value: error: Service temporarily unavailable error_code: SERVICE_SETTINGS_UNUSABLE EventServiceUnavailable: description: | The service cannot take the customer event or the card registration now; nothing was stored and your key was not judged. `Service busy`: every customer event and card registration this server instance records at once is taken (a pool of their own, never a payment's or a card event's), or your institution already holds its share of them (known once the key is checked). It is answered at once, before anything is stored; wait the seconds in `Retry-After` (1). `Service unavailable`: the key could not be checked (the database did not answer three tries); wait `Retry-After` (5). `Service temporarily unavailable`: a setting of the service is unusable (no `Retry-After`). Retry the same request with back-off: a customer event's `source_system` + `external_event_id` never make a second event, and a card's `card_token` never makes a second card. headers: Retry-After: $ref: '#/components/headers/RetryAfter' content: application/json: schema: $ref: '#/components/schemas/ErrorBody' examples: busy: value: error: Service busy error_code: SERVICE_BUSY keyCheck: value: error: Service unavailable error_code: SERVICE_UNAVAILABLE settings: value: error: Service temporarily unavailable error_code: SERVICE_SETTINGS_UNUSABLE schemas: ErrorBody: type: object required: - error - error_code properties: error: type: string description: Words for a person (listed on the Errors page), or the text of a database `VALIDATION:` refusal without its prefix. error_code: type: string description: | The kind of refusal, for your program to match on together with the HTTP status (the `error_code` column of the Errors page). It keeps its meaning within v1; a new one may be added (treat one you do not know by its status). pattern: ^[A-Z][A-Z0-9_]{2,63}$ code: type: - string - 'null' description: The database's error code for a server-side refusal (an SQLSTATE or a PostgREST code); never its message. pattern: ^(?:[0-9A-Z]{5}|PGRST[0-9]{3})$ IsoDate: type: string description: A calendar date written YYYY-MM-DD. Other shapes are refused (01.09.2026 would otherwise be read as 9 January). pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$ IsoDateTime: type: string description: | 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 means UTC. Refused: a space instead of T, a lower-case t or z, 24:00, second 60, +0300 or +03, an impossible day. pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(T([01][0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9]([.][0-9]{1,6})?)?(Z|[+-](0[0-9]|1[0-4]):[0-5][0-9])?)?$ Amount: type: - number - string description: | A JSON number (1250.00), or a string of digits with a dot as the decimal separator ("1250.00"), at most 40 characters. At most two decimals (more are refused, never rounded); below 1000000000000 (the largest is 999999999999.99). In a string: no exponent, comma, NaN or Infinity. Greater than zero, except where the field may be zero or negative (available_balance). Anything else is refused with a 400 naming the field: "% is required", "% must be a number", "% must be a decimal number such as 125.50 (no exponent, NaN or Infinity)", "% may have at most two decimals", "% exceeds the largest supported amount, 999999999999.99" or "% must be greater than zero". Currency: type: string pattern: ^[A-Za-z]{3}$ description: | An ISO 4217 code such as EUR: three letters, upper-cased on arrival, that name a currency on the platform's ISO 4217 list. Anything else, three letters that name no currency (QZQ) included, is refused with a 400, "% must be a three-letter ISO 4217 currency code such as EUR". Country: type: string pattern: ^[A-Za-z]{2}$ description: | An ISO 3166-1 alpha-2 code such as LT, upper-cased on arrival. It must be on the platform's country list (every ISO 3166-1 alpha-2 code and XK; XX is not), otherwise the answer is a 400, "% must be a two-letter ISO 3166-1 alpha-2 country code such as LT". An empty value counts as absent. DataClassification: type: string description: What kind of data this is. Your key must allow it (403 otherwise), and a production institution takes PRODUCTION only (400 CLASSIFICATION_NOT_ACCEPTED). Only PRODUCTION data is triaged by the AI. TEST and DEMO, which only a sandbox takes, call no AI model, so a held payment goes to a person (HUMAN_REVIEW) and never waits in AI_INVESTIGATION; SCALE_TEST has no AI triage. enum: - PRODUCTION - TEST - SCALE_TEST - DEMO default: PRODUCTION DecisionStatus: type: string description: | Only RELEASED means the payment may settle. RELEASED and BLOCKED are final; every other status changes later. A BLOCKED payment always carries rejection_action, which says what to do with its funds (a rejected payment is never stored without one). RECEIVED: recorded, not yet screened; it normally changes within the same request. SCREENING: being screened; it normally changes within the same request, and when screening did not finish (screening_timeout) the sweep holds it within minutes. HOLD: held until what stopped it (a rule, a screening match, a country restriction) is decided. AI_INVESTIGATION: the AI triage is queued; your decision policy acts on its recommendation, or a person decides. HUMAN_REVIEW: with a person. ESCALATED: taken into a case; a person decides it there. EXPIRED: the hold period of your decision policy ran out while a person had the payment; it stays with a person. FAILED: no path sets it today; treat it as not released and quote the decision_ref to Underlayer. enum: - RECEIVED - SCREENING - RELEASED - HOLD - AI_INVESTIGATION - HUMAN_REVIEW - BLOCKED - ESCALATED - FAILED - EXPIRED RejectionAction: type: - string - 'null' description: | What to do with the funds of a rejected payment, set when status is BLOCKED and only then (null otherwise): a BLOCKED payment always has one. REJECT: do not execute it; money that came in goes back under your own procedure. FREEZE: the payment had a sanctions match that was confirmed, or not yet cleared as a false positive, when it was rejected; do not execute it and do not return the money: keep the funds where they are and handle them under your sanctions procedure, which reports a confirmed match. A FREEZE becomes REJECT once every sanctions alert of the payment is cleared as a false positive: the payment stays BLOCKED, decision.freeze_lifted is sent once and the decision's freeze_lifted_at says when. enum: - REJECT - FREEZE - null PaymentRequest: type: object description: | Required for every payment: external_transaction_id, customer_ref, channel, direction, amount, currency. Required by channel: SEPA also counterparty; SWIFT also origin_country and destination_country. Every amount, currency, country and card_present is checked before anything is stored, and a value of the wrong type is refused with a 400 naming the field. Codes are upper-cased: a currency must be three letters (Currency), a country a code of the platform's country list (Country). An external_transaction_id or customer_ref beginning EXAMPLE- (in any case) is refused. The session and device fields (ip_address, ip_country, device_id, device_timezone, device_utc_offset, session_id, initiation_channel, initiation, device_os, vpn_or_proxy, remote_access_detected) are optional and never refuse the payment: a malformed one is stored as nothing and named in the answer's warnings, a field left out says nothing. The payee fields (counterparty_account, counterparty_relationship, payee_verification, available_balance, balance_currency) are optional and refused (400) when malformed, like every other field. required: - external_transaction_id - customer_ref - channel - direction - amount - currency properties: external_transaction_id: type: string minLength: 1 description: Your unique id for this payment within source_system. Sending it again returns the payment's current decision (duplicate). One beginning EXAMPLE- is refused (400). source_system: type: string default: API description: Which of your systems sent the payment. Part of the payment's identity together with external_transaction_id. customer_ref: type: string description: Your customer reference, as in the CDD intake. An unknown one opens a provisional customer (KYC incomplete, risk High) unless your decision policy forbids it or today's limit is reached; then the answer is 400 unknown customer_ref. One beginning EXAMPLE- is refused (400). customer_name: type: string description: Used only when the payment opens a provisional customer. customer_type: type: string enum: - Business - Individual description: Used only when the payment opens a provisional customer (default Individual; another value counts as Individual). customer_country: $ref: '#/components/schemas/Country' description: Used only when the payment opens a provisional customer (default XX, unknown). A code you send must be on the platform's country list, so XX itself is refused. account_number: type: string description: The customer's account the payment was booked on; linked when it belongs to that customer, otherwise ignored. channel: type: string enum: - SEPA - SWIFT - CARD - ATM description: The payment rail (case-insensitive). Decides which fields are required. direction: type: string enum: - INCOMING - OUTGOING description: Incoming or outgoing for your customer (case-insensitive). amount: $ref: '#/components/schemas/Amount' description: 'Greater than zero, in currency, at most two decimals. Missing: 400 amount is required. Zero or negative: 400 amount must be greater than zero. Not a decimal number: 400 amount must be a decimal number such as 125.50 (no exponent, NaN or Infinity).' currency: $ref: '#/components/schemas/Currency' description: ISO 4217 code, for example EUR. Missing or not three letters - 400 currency must be a three-letter ISO 4217 currency code such as EUR. transaction_timestamp: $ref: '#/components/schemas/IsoDateTime' description: When the payment happened. Default the time of receipt. payment_type: type: string description: Your own payment type label. Default " ", for example "SEPA Outgoing". origin_country: $ref: '#/components/schemas/Country' description: The country the money comes from. Required for SWIFT. destination_country: $ref: '#/components/schemas/Country' description: The country the money goes to. Required for SWIFT. counterparty: type: string description: Name of the other party. Required for SEPA. Screened against the sanctions lists. counterparty_country: $ref: '#/components/schemas/Country' description: The other party's country. counterparty_type: type: string enum: - INDIVIDUAL - LEGAL_ENTITY - FINANCIAL_INSTITUTION - GOVERNMENT - MERCHANT - OTHER description: Case-insensitive. counterparty_sector_code: type: string description: A sector code from the platform's list (active codes only). Leave it out unless you were given the list. payment_reference: type: string description: Free text of the payment (purpose). Rules can compare and group by it. originator: type: string description: Sender's name (wires). Screened. originator_bic: type: string beneficiary: type: string description: Recipient's name (wires). Screened. beneficiary_bic: type: string intermediary_bank: type: string card_reference: type: string description: Your card reference for a card payment. card_present: type: - boolean - string description: true or false (or the strings "true" / "false" in any case); anything else, yes, no, 1 and 0 included, answers 400 card_present must be true or false. instant: type: - boolean - string description: | true for a SEPA Instant credit transfer (SCT Inst), which must be executed within ten seconds of the order; default false. Read like card_present (anything else answers 400 instant must be true or false). Only a SEPA payment can be one: true with another channel answers 400 instant is only for SEPA payments. merchant_name: type: string merchant_country: $ref: '#/components/schemas/Country' mcc: type: string description: Four-digit merchant category code. atm_id: type: string atm_location: type: string correlation_id: type: string description: Your own trace id, echoed in answers and webhooks. Default a random UUID. data_classification: $ref: '#/components/schemas/DataClassification' executed_during_outage: type: - boolean - string description: | true for a payment your system already executed while Underlayer could not be reached and sends afterwards; read like card_present (true, false, "true", "false"; anything else 400 executed_during_outage must be true or false). It then needs transaction_timestamp, the time it was executed (not later than five minutes after it is sent), and your institution's policy SKIP_AND_CHECK_LATER; the answer is 202 POST_EVENT, with no decision. Leave it out, or false, for every payment you send before it moves. counterparty_account: type: string maxLength: 64 description: | The other party's account: the payee's on an outgoing payment, the payer's on an incoming one. Spaces are taken out and letters upper-cased; 1 to 34 letters and digits. A value shaped as an IBAN must begin with a known country code and pass the IBAN check (ISO 13616, mod 97). Anything else is refused (400 "% must be 1 to 34 letters and digits (spaces are taken out)", "% looks like an IBAN but does not begin with a known country code" or "% looks like an IBAN but its check digits are wrong"). counterparty_relationship: type: string enum: - SELF - RELATED_PARTY - UNRELATED description: The other party's relationship to your customer, as you know it (SELF, the customer's own account elsewhere). Upper-cased on arrival; another value is refused (400 "% must be one of %"). payee_verification: type: string enum: - MATCH - CLOSE_MATCH - NO_MATCH - NOT_POSSIBLE description: The Verification of Payee result your system got for this payment (Regulation (EU) 2024/886). Upper-cased on arrival; another value is refused (400 "% must be one of %"). available_balance: $ref: '#/components/schemas/Amount' description: The customer's available balance before this payment, in balance_currency. May be zero or negative. Stamped in EUR at the reference rate. balance_currency: $ref: '#/components/schemas/Currency' description: The currency of available_balance (default the payment's currency); not stored without available_balance. ip_address: type: string description: 'The IP address the customer used, one IPv4 or IPv6 host address (203.0.113.10, 2001:db8::10; no prefix). Never refuses the payment: a malformed one is a warning. Our own IP-to-country lookup (DB-IP Lite) checks ip_country and fills it in when you send none.' ip_country: type: string description: The IP's country as your own geolocation found it, a code of the platform's country list. Yours wins; when ours disagrees the payment is marked ("IP country sent differs from our lookup"). Never refuses the payment. device_id: type: string description: 'Your stable identifier of the customer''s device (your device SDK''s): 8 to 128 letters, digits or . _ : + / = -. Never refuses the payment.' device_timezone: type: string description: The device's IANA time zone, such as Europe/Vilnius. Its UTC offset at the payment's time is stored with it. Never refuses the payment. device_utc_offset: type: string description: The device's UTC offset, +hh:mm or -hh:mm, -12:00 to +14:00 in quarter hours. With device_timezone, the zone's own offset is stored and a different one is a warning. Never refuses the payment. session_id: type: string description: Your session id, 1 to 128 printable characters without spaces. Only its SHA-256 (with your institution) is stored, so rules can tell payments of one session apart from others. Never refuses the payment. initiation_channel: type: string enum: - MOBILE_APP - WEB_BROWSER - API - BRANCH - PHONE - OTHER description: How the customer initiated the payment. Upper-cased on arrival. Never refuses the payment. initiation: type: string enum: - CUSTOMER_INITIATED - STANDING_ORDER - SCHEDULED - DIRECT_DEBIT - MERCHANT_INITIATED - BULK_UPLOAD - STAFF_INITIATED - OTHER description: Who or what started the payment. Upper-cased on arrival. Never refuses the payment. device_os: type: string enum: - ANDROID - IOS - WINDOWS - MACOS - LINUX - OTHER description: The device's operating system. No user agent is taken. Never refuses the payment. vpn_or_proxy: type: - boolean - string description: true when your tools saw a VPN, proxy or anonymiser (true, false, "true", "false"). Never refuses the payment. remote_access_detected: type: - boolean - string description: true when your tools saw remote-access software on the device during the session. Never refuses the payment. PostEventPayment: type: object description: | The answer to a payment sent with executed_during_outage true, and to its repeat. It has no decision: nothing holds, releases or rejects it. It is screened and evaluated by your monitoring rules after the event; any alert goes to your team. A repeat carries duplicate, post_event, status, transaction_id, transaction_ref, correlation_id, received_at, executed_at and, when the first request had any, warnings. required: - duplicate - post_event - status - transaction_id properties: duplicate: type: boolean post_event: type: boolean const: true status: type: string const: POST_EVENT description: 'Not a decision status: the payment is checked after the event, never decided.' transaction_id: type: string format: uuid transaction_ref: type: string description: RTX--. correlation_id: type: string received_at: type: string format: date-time executed_at: type: string format: date-time description: The time your system executed it (transaction_timestamp). outage_payment_policy: type: string enum: - SKIP_AND_CHECK_LATER description: Your institution's policy it was accepted under. checks: type: object description: 'What was queued: sanctions_screening QUEUED, and monitoring_rules_queued, the number of your rules it is evaluated by after the event (batch-only rules read it in their nightly run).' properties: sanctions_screening: type: string enum: - QUEUED monitoring_rules_queued: type: integer message: type: string description: The same in words. warnings: type: array description: 'Present only when a session or device field was malformed and not stored: which field and why, in fixed words that never quote your value. The payment is decided as if the field had not been sent.' items: $ref: '#/components/schemas/ContextWarning' PostEventView: type: object description: The look-up of a payment sent after an outage; it has no decision. properties: post_event: type: boolean const: true status: type: string const: POST_EVENT transaction_id: type: string format: uuid transaction_ref: type: string executed_at: type: string format: date-time received_at: type: string format: date-time PaymentDecision: type: object description: The answer to a payment. A duplicate replay carries only duplicate, transaction_id, decision_id, decision_ref, status, rejection_action, correlation_id, received_at, policy_version and, when the first request had any, warnings. required: - duplicate - decision_id - decision_ref - status properties: duplicate: type: boolean description: true when this payment had already been received. transaction_id: type: string format: uuid decision_id: type: string format: uuid decision_ref: type: string description: DEC--; quote it to the institution's analysts. status: $ref: '#/components/schemas/DecisionStatus' rejection_action: $ref: '#/components/schemas/RejectionAction' decision_reason: type: - string - 'null' description: Why the decision is in this status, in fixed words of the engine. correlation_id: type: string received_at: type: string format: date-time policy_version: type: string description: 'The label of your institution''s decision policy that applies to this payment, as the policy was named when it was put in force (for example decision-policy-v1.6; a policy changed later may carry a note after its label). Free text: show or log it, never parse it.' alert_id: type: - string - 'null' format: uuid description: The alert a rule hit raised, if any. triggered_rules: type: array items: type: string description: The monitoring rule versions that fired. rules_evaluated: type: integer rules_deferred: type: integer description: 'Rules evaluated later by batch monitoring, not in real time: rules that need a longer history than the real-time check reads. On a payment already RELEASED (or otherwise final) what they find is an alert for your team; it never changes the payment''s decision.' tm_latency_ms: type: - integer - 'null' total_latency_ms: type: - integer - 'null' description: Set once the decision is final. estimated_next_state: type: string description: What can happen next, in words. screening_timeout: type: boolean description: 'Present and true when screening did not finish within its budget or failed; the payment is held for a person (with status SCREENING when the server had no capacity left to hold it at once: the scheduled sweep holds it within minutes). Never settle it until its decision is RELEASED: it is screened again in the background and released if nothing is found.' warnings: type: array description: 'Present only when a session or device field was malformed and not stored: which field and why, in fixed words that never quote your value. The payment is decided as if the field had not been sent.' items: $ref: '#/components/schemas/ContextWarning' ContextWarning: type: object required: - field - message properties: field: type: string enum: - ip_address - ip_country - device_id - device_timezone - device_utc_offset - session_id - initiation_channel - initiation - device_os - vpn_or_proxy - remote_access_detected message: type: string description: 'Our own words, ending '': not stored'' (or, for an offset that disagrees with the time zone, saying the zone''s own offset is stored). Listed on the Errors page, ''Session and device warnings''.' DecisionView: type: object properties: decision_id: type: string format: uuid decision_ref: type: string transaction_id: type: string format: uuid status: $ref: '#/components/schemas/DecisionStatus' rejection_action: $ref: '#/components/schemas/RejectionAction' freeze_lifted_at: type: - string - 'null' format: date-time description: When the freeze of a payment rejected with FREEZE was lifted (every sanctions alert of the payment cleared as a false positive; rejection_action is then REJECT and decision.freeze_lifted was sent). null otherwise. decision_reason: type: - string - 'null' channel: type: - string - 'null' description: SEPA, SWIFT, CARD or ATM, as received. direction: type: - string - 'null' description: INCOMING or OUTGOING, as received. instant: type: boolean description: true when the payment was sent as an instant transfer (instant true). correlation_id: type: string triggered_rules: type: array items: type: string ai_decision: type: - string - 'null' enum: - LOW_RISK - UNCERTAIN - HIGH_RISK - AI_FAILURE - AI_TIMEOUT - AI_CANCELLED - AI_INVALID_RESULT - AI_MAX_RETRIES_EXCEEDED - null description: The AI triage's recommendation, as a risk view. Never a decision by itself. ai_confidence: type: - integer - 'null' description: 0..100. mandatory_review: type: boolean description: true when a person must decide; such a payment is never released automatically. mandatory_review_reasons: type: array items: type: string policy_version: type: string description: 'The label of your institution''s decision policy that applies to this payment (see PaymentDecision). Free text: never parse it.' decision_engine_version: type: string received_at: type: string format: date-time held_at: type: - string - 'null' format: date-time ai_started_at: type: - string - 'null' format: date-time ai_completed_at: type: - string - 'null' format: date-time decided_at: type: - string - 'null' format: date-time released_at: type: - string - 'null' format: date-time expires_at: type: - string - 'null' format: date-time description: 'When a hold expires under your decision policy (the payment then goes to a person, EXPIRED then HUMAN_REVIEW). It is set from the policy''s hold period when the payment is received, whatever its status, and acts only while the payment is HOLD or HUMAN_REVIEW and no open case holds it: on any other status ignore it.' tm_latency_ms: type: - integer - 'null' total_latency_ms: type: - integer - 'null' CardAuthorizationRequest: type: object description: | Checked before anything is stored. The currencies (currency, billing_currency, card_currency, balance_currency), merchant_country and the card codes (entry_mode, card_presence, card_txn_type, authorization_mode, terminal_capability, three_ds_result, cvv_result, pin_result) are upper-cased on arrival and stored upper-cased: a currency must be three letters (Currency), merchant_country a code of the platform's country list (Country), and a card code one of the values of its enum, the rule builder's values for the field (otherwise 400 "% must be one of %", naming the field and its values). event_type and data_classification are compared exactly as sent: send them in upper case. A card_token beginning EXAMPLE- (in any case) is refused. Fields not listed are ignored. required: - event_type - card_token - amount properties: event_type: type: string enum: - CARD_AUTHORIZATION - ATM_WITHDRAWAL - CARD_REFUND - CARD_REVERSAL description: Compared exactly as sent, so card_authorization is refused. A CARD_REFUND is answered REFUNDED and a CARD_REVERSAL REVERSED; neither is ever declined, and the institution's real-time card rules are evaluated on both. card_token: type: string minLength: 1 description: The card's token as Underlayer holds it for your institution and this data classification. Missing or blank - 400 card_token is required. One beginning EXAMPLE- is refused (400). amount: $ref: '#/components/schemas/Amount' description: 'The transaction amount in currency, greater than zero, at most two decimals. Missing: 400 amount is required. Zero or negative: 400 amount must be greater than zero. Not a decimal number: 400 amount must be a decimal number such as 125.50 (no exponent, NaN or Infinity).' currency: $ref: '#/components/schemas/Currency' default: EUR description: ISO 4217 code of the transaction; upper-cased. Left out or empty - EUR. event_time: $ref: '#/components/schemas/IsoDateTime' description: When the event happened. Default the time of receipt. billing_amount: $ref: '#/components/schemas/Amount' description: The amount in the billing currency (what the card is charged), greater than zero. Default amount when the billing currency is the transaction currency, else amount converted at the euro reference rates of the event date (none without a rate). Stored with its EUR value at the reference rate, which the card rule templates compare. billing_currency: $ref: '#/components/schemas/Currency' description: Upper-cased. Default card_currency, else EUR. A transaction currency other than the billing currency is a foreign-currency transaction. card_currency: $ref: '#/components/schemas/Currency' default: EUR description: The card's own currency; upper-cased. merchant_name: type: string merchant_id: type: string mcc: type: string description: Four-digit merchant category code. Default 6011 for an ATM withdrawal; what you send is kept. merchant_country: $ref: '#/components/schemas/Country' description: Upper-cased; must be on the platform's country list. terminal_id: type: string atm_id: type: string entry_mode: type: string enum: - CHIP - MAGSTRIPE - CONTACTLESS - ECOMMERCE - MANUAL - TOKEN - MOTO - UNKNOWN description: Upper-cased on arrival. CHIP, MAGSTRIPE or CONTACTLESS make the card present; ECOMMERCE, MANUAL, TOKEN or MOTO not present. card_presence: type: string enum: - CARD_PRESENT - CARD_NOT_PRESENT - UNKNOWN description: Upper-cased on arrival. Default derived from entry_mode; with no entry_mode that says otherwise an ATM withdrawal is CARD_PRESENT, anything else UNKNOWN. What you send is kept. card_txn_type: type: string enum: - POS - ATM - REFUND - CREDIT - ECOMMERCE - QUASI_CASH description: Upper-cased on arrival. Default REFUND for a refund (any other value is refused for a refund), the original's for a reversal, ATM for an ATM withdrawal, ECOMMERCE for entry_mode ECOMMERCE, else POS. A CREDIT event is money in (stored Incoming, as a refund); a reversal takes the opposite direction of the event it reverses. authorization_mode: type: string enum: - ONLINE - OFFLINE default: ONLINE description: Upper-cased on arrival. terminal_capability: type: string enum: - CHIP_AND_PIN - MAGSTRIPE_ONLY - CONTACTLESS - UNKNOWN default: UNKNOWN description: Upper-cased on arrival. cvv_result: type: string enum: - MATCH - NO_MATCH - NOT_PROVIDED description: Upper-cased on arrival. NO_MATCH declines the event (INVALID_CVV); MATCH and NOT_PROVIDED do not. Any other value, FAIL included, is refused (400 cvv_result must be one of MATCH, NO_MATCH, NOT_PROVIDED). pin_result: type: string enum: - MATCH - NO_MATCH - NOT_PROVIDED description: Upper-cased on arrival. NO_MATCH declines the event (INVALID_PIN); MATCH and NOT_PROVIDED do not. Any other value, FAIL included, is refused (400 pin_result must be one of MATCH, NO_MATCH, NOT_PROVIDED). three_ds_result: type: string enum: - AUTHENTICATED - NOT_AUTHENTICATED - ATTEMPTED - NOT_APPLICABLE description: Upper-cased on arrival. acquirer: type: string issuer_response: type: string available_balance: $ref: '#/components/schemas/Amount' description: The card's available balance at authorisation, in balance_currency. May be zero or negative (-12.50). The balance rule templates compare it in EUR at the reference rate of the event's date. balance_currency: $ref: '#/components/schemas/Currency' description: The currency of available_balance (ISO 4217); upper-cased. Default card_currency. Not stored without available_balance. correlation_id: type: string description: Default a random UUID. original_event_ref: type: string description: The event_ref answered for an approved authorisation or withdrawal of the same card that this refund or reversal undoes. Required for a CARD_REVERSAL, optional for a CARD_REFUND. Same currency, not dated before it; what is refunded and reversed against one event never exceeds its amount. Fields left out (merchant, terminal, entry_mode, card_presence, authorization_mode, terminal_capability, card_currency, billing_currency; for a reversal card_txn_type) are taken from it. Without billing_amount the billing amount is the original's in proportion to the amount, when the billing currency is the original's. data_classification: type: string default: PRODUCTION description: PRODUCTION, TEST, SCALE_TEST or DEMO, allowed by your key; compared exactly as sent. The card must have the same classification. RuleFired: type: object properties: rule_code: type: string version_id: type: string format: uuid transaction_action: type: string description: ALERT_ONLY or REJECT. REJECT declines the event (RULE_DECLINE). card_action: type: - string - 'null' description: NONE, SUSPEND_CARD or TERMINATE_CARD; carried out in the background. CardAuthorizationResult: type: object description: A duplicate replay carries only duplicate, event_id, event_ref, authorization_result, decline_reason and correlation_id. required: - duplicate - event_id - event_ref - authorization_result properties: duplicate: type: boolean event_id: type: string format: uuid event_ref: type: string description: CAE--. authorization_result: type: string enum: - APPROVED - DECLINED - REFUNDED - REVERSED description: REFUNDED for a refund and REVERSED for a reversal; neither is ever declined. decline_reason: type: - string - 'null' enum: - CARD_TERMINATED - CARD_SUSPENDED - INVALID_CVV - INVALID_PIN - RULE_DECLINE - RULE_EVALUATION_ERROR - null description: 'RULE_EVALUATION_ERROR: a real-time card rule could not be evaluated and your decision policy declines the event for it (card_rule_error_action DECLINE, or no decision policy in force). The order: a refund or a reversal is never declined; then the card''s status, cvv_result, pin_result, a REJECT rule; then a rule error.' flagged: type: boolean description: 'Always false: no card rule approves an event and flags it. Read rules_fired and alerts_generated.' rules_fired: type: array items: $ref: '#/components/schemas/RuleFired' alerts_generated: type: integer description: The alerts the rules that fired raised for the event. The alert raised for a rule that could not be evaluated is not counted here; rule_errors names that rule. rule_errors: type: array description: Every real-time card rule that could not be evaluated for the event, or that fired but whose alert could not be recorded. Empty when every rule ran. The event is answered all the same, and an alert for a person is raised on it. items: type: object required: - rule_code - rule_version - error_code properties: rule_code: type: string rule_version: type: integer error_code: type: - string - 'null' description: 'The database''s five-character error class (SQLSTATE), never its message; or NO_FX_RATE: the rule compares EUR and the event''s amount or balance has no reference rate within 10 days, or an earlier event in the rule''s window does.' rule_error_handling: type: - string - 'null' enum: - APPROVE_AND_ALERT - DECLINE - ALERT_ONLY - null description: 'What a rule error did to the event; null when rule_errors is empty. APPROVE_AND_ALERT: your decision policy does not decline the event for it (the platform''s default). DECLINE: your decision policy declines an approved authorisation or withdrawal for it (RULE_EVALUATION_ERROR), or no decision policy is in force. ALERT_ONLY: a refund or a reversal, never declined. A person reviews the event in every case.' correlation_id: type: string latency_ms: type: integer CustomerEventRequest: type: object description: | One customer event. Codes are upper-cased on arrival. A field that belongs to one kind of event only (the payee fields, the card confirmation's fields, card_token, changed_by) is refused on another (400). The session and device fields are those of a payment, read the same way: a malformed one is not stored and named in `warnings`, never a refusal. required: - external_event_id - customer_ref - event_type properties: external_event_id: type: string maxLength: 128 description: 'Your reference of the event, unique with source_system: a repeat answers the first answer. Not blank; one beginning EXAMPLE- (in any case) is refused.' source_system: type: string maxLength: 64 description: Your system that recorded the event. Default API. customer_ref: type: string description: Your customer's reference, a customer of your institution already on file (an event never creates one). One beginning EXAMPLE- is refused. event_type: type: string enum: - LOGIN_SUCCESS - LOGIN_FAILED - DEVICE_ADDED - PASSWORD_CHANGED - PASSWORD_RESET - MFA_CHANGED - EMAIL_CHANGED - PHONE_CHANGED - ADDRESS_CHANGED - PAYEE_ADDED - PAYEE_CHANGED - CARD_ADDED - LIMIT_CHANGED - CARD_PAYMENT_CONFIRMATION description: What happened. Upper-cased on arrival. event_time: $ref: '#/components/schemas/IsoDateTime' description: When the customer did it. Default the time of receipt. Not later than five minutes after it is sent, and not more than 400 days before. changed_by: type: string enum: - CUSTOMER - STAFF - SYSTEM description: 'Who made a change (a change event only: not a sign-in or a card payment confirmation). A change your staff made is not a sign of account takeover.' outcome: type: string enum: - APPROVED - DECLINED description: 'CARD_PAYMENT_CONFIRMATION only, and required there: what the customer answered in your app.' confirmation_method: type: string enum: - THREE_DS_CHALLENGE - IN_APP_APPROVAL - OTHER description: CARD_PAYMENT_CONFIRMATION only. How the customer confirmed the card payment. merchant_country: type: string description: CARD_PAYMENT_CONFIRMATION only. The merchant's country, a code of the platform's country list. card_event_ref: type: string description: CARD_PAYMENT_CONFIRMATION only. The event_ref Underlayer answered for the card event this confirmation belongs to, when it was already sent. One the customer does not hold is not linked (a warning). card_token: type: string description: CARD_ADDED and CARD_PAYMENT_CONFIRMATION only. The card on file the event is about. A token of no card of this customer is not linked (a warning); the token itself is not stored. payee_name: type: string maxLength: 200 description: PAYEE_ADDED and PAYEE_CHANGED only. The payee's name as the customer entered it. payee_account: type: string maxLength: 64 description: PAYEE_ADDED and PAYEE_CHANGED only. The payee's account, read as a payment's counterparty_account (an IBAN must pass its check; anything else is refused, 400). payee_country: type: string description: PAYEE_ADDED and PAYEE_CHANGED only. The payee's country, a code of the platform's country list. payee_type: type: string enum: - INDIVIDUAL - LEGAL_ENTITY - FINANCIAL_INSTITUTION - GOVERNMENT - MERCHANT - OTHER description: PAYEE_ADDED and PAYEE_CHANGED only. ip_address: type: string description: The IP address of the customer's session, one IPv4 or IPv6 host address. Our own IP-to-country lookup fills ip_country in when you send none. Never refuses the event. ip_country: type: string description: The IP's country as your own geolocation found it. Yours wins. Never refuses the event. device_id: type: string description: 'Your stable identifier of the customer''s device: 8 to 128 letters, digits or . _ : + / = -. Keeps the customer''s device ledger. Never refuses the event.' device_timezone: type: string description: The device's IANA time zone, such as Europe/Vilnius. Never refuses the event. device_utc_offset: type: string description: The device's UTC offset, +hh:mm or -hh:mm, -12:00 to +14:00 in quarter hours (with a time zone they must agree). Never refuses the event. session_id: type: string description: Your session id; only its SHA-256 (with your institution) is stored, so a later payment can be tied to its sign-in. Never refuses the event. initiation_channel: type: string enum: - MOBILE_APP - WEB_BROWSER - API - BRANCH - PHONE - OTHER description: Where the event happened. Never refuses the event. device_os: type: string enum: - ANDROID - IOS - WINDOWS - MACOS - LINUX - OTHER description: The device's operating system. Never refuses the event. vpn_or_proxy: type: - boolean - string description: true when your tools saw a VPN, proxy or anonymiser. Never refuses the event. remote_access_detected: type: - boolean - string description: true when your tools saw remote-access software on the device. Never refuses the event. correlation_id: type: string maxLength: 128 description: Your own trace id. data_classification: $ref: '#/components/schemas/DataClassification' CustomerEventResult: type: object required: - duplicate - event_id - event_ref - event_type - received_at properties: duplicate: type: boolean description: 'true for a repeat of a recorded event: the first answer, nothing more stored.' event_id: type: string format: uuid event_ref: type: string description: CEV--. event_type: type: string received_at: type: string format: date-time description: When Underlayer recorded the event (the first time, for a repeat). warnings: type: array description: Present only when a session, device or card field was not used; a field left out says nothing. items: $ref: '#/components/schemas/CustomerEventWarning' CustomerEventWarning: type: object required: - field - message properties: field: type: string enum: - ip_address - ip_country - device_id - device_timezone - device_utc_offset - session_id - initiation_channel - device_os - vpn_or_proxy - remote_access_detected - card_token - card_event_ref message: type: string description: Our own words. Listed on the Errors page, 'Customer event warnings'. CddIngestRequest: type: object required: - source_system - rows properties: source_system: type: string minLength: 1 description: Which of your systems the data comes from; recorded on every version. source_file: type: - string - 'null' description: A file name to show with the import. classification: type: string enum: - PRODUCTION - TEST - DEMO default: PRODUCTION description: Note the name (not data_classification). Your key must allow it (403); SCALE_TEST is allowed on keys but refused by the CDD intake (400 classification must be PRODUCTION, TEST or DEMO). rows: type: array minItems: 1 maxItems: 50000 items: $ref: '#/components/schemas/CddRow' CddRow: type: object description: | One customer. A field outside this list (at any depth) refuses the row (UNKNOWN_FIELD). Required for a new customer: full_name, country_of_residence, account_opening_date. required: - customer_ref properties: customer_ref: type: string description: Your unique customer reference. One beginning EXAMPLE- is refused (EXAMPLE_ROW). full_name: type: string customer_type: type: string enum: - Business - Individual description: Case-insensitive. A new customer without it is Business. country_of_residence: type: string pattern: ^[A-Za-z]{2}$ description: A code of the platform's country list (every ISO 3166-1 alpha-2 code and XK; XX is not), any case, upper-cased on arrival. Any other value rejects the row (INVALID_COUNTRY). account_opening_date: $ref: '#/components/schemas/IsoDate' risk_rating: type: string enum: - Low - Medium - High - Critical description: Case-insensitive. Any other value rejects the row (INVALID_RISK_RATING). A new customer without it is Not assessed, never Medium; a later row without it keeps the rating in force; a customer the payment feed created (High until its CDD record) becomes Not assessed when that record names none. Every monitoring alert of a Critical customer goes to an L2 case; your institution may send every AI result of a High customer to a person (its own review gate). pep_determination: type: string enum: - NOT_PEP - PEP - PEP_FAMILY_OR_CLOSE_ASSOCIATE - FORMER_PEP - NOT_ASSESSED description: 'Your own KYC determination of whether the customer is a politically exposed person. Case-insensitive; spaces or hyphens may stand for the underscores. Any other value rejects the row (INVALID_PEP_STATUS). A new customer without it is NOT_ASSESSED, never NOT_PEP. PEP, PEP_FAMILY_OR_CLOSE_ASSOCIATE and FORMER_PEP are treated as a PEP: an EDD signal (your PEP review gate sends the AI''s closure of the customer''s alerts to a person); it never holds a payment. Each change is a CDD version.' pep_category: type: string enum: - HEAD_OF_STATE_OR_GOVERNMENT - MINISTER - PARLIAMENT - POLITICAL_PARTY - SUPREME_COURT - AUDIT_OR_CENTRAL_BANK - AMBASSADOR - ARMED_FORCES - STATE_OWNED_ENTERPRISE - INTERNATIONAL_ORGANISATION - REGIONAL_OR_LOCAL_GOVERNMENT - OTHER description: 'Only with PEP, PEP_FAMILY_OR_CLOSE_ASSOCIATE or FORMER_PEP: the public function. Case-insensitive. Otherwise, or another value, rejects the row (INVALID_PEP_DETAILS).' pep_country: type: string pattern: ^[A-Za-z]{2}$ description: 'Only with PEP, PEP_FAMILY_OR_CLOSE_ASSOCIATE or FORMER_PEP (else INVALID_PEP_DETAILS): the country of the public function, a code of the platform''s country list, any case. Any other value rejects the row (INVALID_COUNTRY).' pep_since: $ref: '#/components/schemas/IsoDate' pep_until: $ref: '#/components/schemas/IsoDate' pep_source: type: string maxLength: 100 description: Where the determination came from (INVALID_PEP_DETAILS over 100 characters or with NOT_ASSESSED). Left out, the import's source_system is recorded whenever the row states a determination. pep_status: type: - boolean - string description: 'Older form of pep_determination: true is PEP, false is NOT_PEP. Sent with pep_determination, the two must agree (else INVALID_PEP_STATUS).' sanctions_status: type: string enum: - CLEAR - POTENTIAL_MATCH - CONFIRMED_MATCH - NOT_SCREENED description: 'The result of your own sanctions screening. Case-insensitive; spaces or hyphens may stand for the underscores. Any other value rejects the row (INVALID_SANCTIONS_STATUS). A new customer without it is NOT_SCREENED. Only CLEAR clears the customer: the other three are a sanctions concern for the AI review gates and QC sampling.' legal_form: type: string registration_number: type: string registration_country: type: string pattern: ^[A-Za-z]{2}$ description: A code of the platform's country list (every ISO 3166-1 alpha-2 code and XK; XX is not), any case, upper-cased on arrival. Any other value rejects the row (INVALID_COUNTRY). registration_date: $ref: '#/components/schemas/IsoDate' tax_number: type: string national_id: type: string date_of_birth: $ref: '#/components/schemas/IsoDate' place_of_birth: type: string nationality: type: string pattern: ^[A-Za-z]{2}$ description: A code of the platform's country list (every ISO 3166-1 alpha-2 code and XK; XX is not), any case, upper-cased on arrival. Any other value rejects the row (INVALID_COUNTRY). id_document_type: type: string id_document_number: type: string id_document_country: type: string pattern: ^[A-Za-z]{2}$ description: A code of the platform's country list (every ISO 3166-1 alpha-2 code and XK; XX is not), any case, upper-cased on arrival. Any other value rejects the row (INVALID_COUNTRY). id_document_expiry: $ref: '#/components/schemas/IsoDate' address: oneOf: - type: string - $ref: '#/components/schemas/CddAddress' email: type: string phone: type: string website: type: string business_sector: type: string industry_category: type: string industry_subcategory: type: string nace_code: type: string pattern: ^[A-Ua-u]([0-9]{2}([.][0-9]{1,2})?)?$ sic_code: type: string occupation: type: string employer: type: string purpose_of_account: type: string source_of_funds: type: string source_of_wealth: type: string countries_of_operation: type: array items: type: string pattern: ^[A-Za-z]{2}$ description: Codes of the platform's country list, any case; stored once each, upper-cased. Any other code rejects the row (INVALID_COUNTRIES_OF_OPERATION). number_of_employees: type: - integer - string minimum: 0 annual_turnover: type: - number - string minimum: 0 annual_income: type: - number - string minimum: 0 expected_monthly_turnover: type: - number - string actual_monthly_turnover: type: - number - string expected_monthly_tx_count: type: - integer - string minimum: 0 max_single_payment: type: - number - string minimum: 0 relationship_status: type: string relationship_end_date: $ref: '#/components/schemas/IsoDate' effective_from: $ref: '#/components/schemas/IsoDateTime' note: type: string related_parties: type: array description: When present, the complete set of the customer's related parties (the earlier set is replaced). items: $ref: '#/components/schemas/CddRelatedParty' accounts: type: array description: Accounts added or updated (by account_number); an account left out is kept. items: $ref: '#/components/schemas/CddAccount' CddAddress: type: object properties: line: type: string line1: type: string line2: type: string street: type: string city: type: string postal_code: type: string postcode: type: string region: type: string state: type: string country: type: string CddRelatedParty: type: object required: - full_name - role properties: full_name: type: string role: type: string enum: - UBO - SHAREHOLDER - DIRECTOR - REPRESENTATIVE - AUTHORISED_SIGNATORY - OTHER type: type: string enum: - NATURAL - LEGAL default: NATURAL ownership_pct: type: - number - string minimum: 0 maximum: 100 date_of_birth: $ref: '#/components/schemas/IsoDate' nationality: type: string pattern: ^[A-Za-z]{2}$ description: A code of the platform's country list, any case; upper-cased. Any other value rejects the row (INVALID_RELATED_PARTIES). country: type: string pattern: ^[A-Za-z]{2}$ description: A code of the platform's country list, any case; upper-cased. Any other value rejects the row (INVALID_RELATED_PARTIES). national_id: type: string registration_number: type: string email: type: string phone: type: string address: oneOf: - type: string - $ref: '#/components/schemas/CddAddress' verified_at: $ref: '#/components/schemas/IsoDateTime' source: type: string description: Default the import's source_system. CddAccount: type: object required: - account_number description: A new account needs currency and opened_date. An account held by another of your customers refuses the row. properties: account_number: type: string currency: type: string pattern: ^[A-Za-z]{3}$ description: An ISO 4217 code, any case; upper-cased. A value that is not a code of the platform's ISO 4217 list (QZQ included) rejects the row (INVALID_ACCOUNTS). opened_date: $ref: '#/components/schemas/IsoDate' account_type: type: string default: Current status: type: string default: Active balance: type: - number - string CddRowError: type: object properties: row: type: integer description: 1-based position of the row in the request. customer_ref: type: - string - 'null' reason: type: string enum: - UNKNOWN_FIELD - MISSING_CUSTOMER_REF - EXAMPLE_ROW - MISSING_NAME - MISSING_COUNTRY_OF_RESIDENCE - MISSING_ACCOUNT_OPENING_DATE - INVALID_CUSTOMER_TYPE - INVALID_RISK_RATING - INVALID_SANCTIONS_STATUS - INVALID_PEP_STATUS - INVALID_PEP_DETAILS - INVALID_COUNTRY - INVALID_VALUE - INVALID_NACE_CODE - INVALID_COUNTRIES_OF_OPERATION - INVALID_RELATED_PARTIES - INVALID_ACCOUNTS - ACCOUNT_BELONGS_TO_ANOTHER_CUSTOMER - NEW_ACCOUNT_NEEDS_OPENED_DATE - NEW_ACCOUNT_NEEDS_CURRENCY - ROW_REFUSED description: See the Errors page, "CDD row reasons". detail: type: - string - 'null' description: Which field and what is wrong, in fixed words; never the value you sent (except an account number you sent). CddIngestResult: type: object required: - ok - batch_ref - inserted - updated - unchanged - rejected - errors properties: ok: type: boolean const: true batch_ref: type: - string - 'null' description: CDD--; the import as shown on the CDD import screen. inserted: type: integer description: New customers. updated: type: integer description: Existing customers whose CDD record changed (a new CDD version). unchanged: type: integer description: Rows that changed nothing. rejected: type: integer description: Rows refused. errors: type: array maxItems: 100 description: The first 100 refused rows (rejected counts them all). items: $ref: '#/components/schemas/CddRowError' Health: type: object required: - status properties: status: type: string const: ok CardRequest: type: object required: - card_token additionalProperties: false description: One of your cards. Only these six fields are taken; any other is refused. properties: card_token: type: string minLength: 1 maxLength: 128 pattern: ^[A-Za-z0-9._:+/=-]+$ description: Your card processor's token for the card; never the card number. The same token updates the same card. customer_ref: type: string description: 'Required for a new card: your reference of the customer it belongs to. A card keeps its customer.' masked_pan: type: string maxLength: 32 description: At most the first six or eight digits and the last four, the rest masked with *, • or X, for example 411111******1111. A full card number is refused. card_type: type: string enum: - PHYSICAL_CARD - VIRTUAL_CARD description: A new card without it is PHYSICAL_CARD. status: type: string enum: - ACTIVE - SUSPENDED - TERMINATED description: A new card without it is ACTIVE. A terminated card stays terminated. data_classification: type: string enum: - PRODUCTION - TEST - SCALE_TEST - DEMO default: PRODUCTION description: Your key must allow it (403); a production institution takes PRODUCTION only. A card keeps the label it was registered with. CardResult: type: object required: - created - changed - card - warnings properties: created: type: boolean description: true when this call registered the card. changed: type: boolean description: true when this call created or changed the card; false for a repeat. card: $ref: '#/components/schemas/Card' warnings: type: array items: $ref: '#/components/schemas/CardWarning' Card: type: object required: - card_id - card_token - customer_ref - card_type - status - data_classification - updated_at properties: card_id: type: string format: uuid description: Underlayer's id of the card. card_token: type: string customer_ref: type: string masked_pan: type: - string - 'null' card_type: type: string enum: - PHYSICAL_CARD - VIRTUAL_CARD status: type: string enum: - ACTIVE - SUSPENDED - TERMINATED data_classification: type: string enum: - PRODUCTION - TEST - SCALE_TEST - DEMO updated_at: type: string format: date-time CardWarning: type: object required: - code - message properties: code: type: string enum: - OPEN_ALERT_SUSPENDED_CARD message: type: string description: Our own words. Listed on the Errors page, 'Card registration warnings'. CardWebhookEvent: type: object required: - event_type - delivery_id - attempt - card_id - card_token - status - previous_status - action - reason_code - occurred_at properties: event_type: type: string enum: - card.suspended - card.terminated - card.reinstated delivery_id: type: string format: uuid attempt: type: integer minimum: 1 card_id: type: string format: uuid card_token: type: string description: Your token of the card. status: type: string enum: - ACTIVE - SUSPENDED - TERMINATED description: The card's new status. previous_status: type: string enum: - ACTIVE - SUSPENDED action: type: string enum: - SUSPEND_CARD - TERMINATE_CARD - UNSUSPEND_CARD reason_code: type: string enum: - RULE - PERSON - PERSON_CLEARING - AI_CLOSURE rule_code: type: string description: The rule that acted, when a rule did. alert_ref: type: string description: The alert that suspended the card, or whose clearing reinstated it. card_event_ref: type: string description: The card event the rule acted on (the event_ref answered for it). correlation_id: type: string occurred_at: type: string format: date-time DecisionWebhookEvent: type: object required: - event_type - delivery_id - attempt - decision_id - decision_ref - transaction_id - status - occurred_at properties: event_type: type: string description: 'decision., or decision.freeze_lifted (a rejected payment''s freeze lifted: status BLOCKED, rejection_action REJECT)' delivery_id: type: string format: uuid attempt: type: integer minimum: 1 decision_id: type: string format: uuid decision_ref: type: string transaction_id: type: string format: uuid status: $ref: '#/components/schemas/DecisionStatus' rejection_action: $ref: '#/components/schemas/RejectionAction' reason: type: - string - 'null' correlation_id: type: string occurred_at: type: string format: date-time