Documentation/API reference/Endpoints/
POST /v1/transactions
Submit a payment for real-time monitoring and get its decision
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.
200withstatus: RELEASED: screened, nothing found, the payment may settle.202withstatus: BLOCKED: rejected, and final: do not settle, and do with the funds whatrejection_actionsays (REJECTorFREEZE); the decision does not change, except that aFREEZEcan later be lifted toREJECT(decision.freeze_lifted).202with 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 pollGET /v1/transactions/{id}/decision.200withduplicate: true: this payment was already received (samesource_systemandexternal_transaction_id, or sameIdempotency-Key); the answer is its current decision. Checkstatus: a duplicate answers 200 whatever its status. A repeat must be the same payment: one whosecustomer_ref,amount,currency,direction,channelorinstantdiffers from the first is refused409, and so is one whoseIdempotency-Keynames one payment and whose reference another; nothing is stored.202withstatus: POST_EVENTandpost_event: true: a payment your system already executed while Underlayer could not be reached, sent afterwards withexecuted_during_outage: trueand the time it was executed intransaction_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 isSKIP_AND_CHECK_LATER(Settings, Decision policies); not chosen, orHOLD, answers 400. A repeat answers200withduplicate: trueandstatus: POST_EVENT.
Fields not listed in the schema are ignored. Which fields are required depends on the channel (see PaymentRequest).
Parameters
| Name | In | Description |
|---|---|---|
Idempotency-Key | header | Your unique key for this payment, unique within your institution (for example a UUID). Optional: a payment is also recognised by |
Request body
A JSON object, at most 64 000 characters.
Example: An outgoing SEPA transfer (example references; never send them with a production key)
{
"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"
}
Example: The same transfer with the optional session, device and payee fields (see the Session and device data guide)
{
"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"
}
Request sample
curl -X POST "$UNDERLAYER_BASE_URL/v1/transactions" \
-H "X-API-Key: $UNDERLAYER_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: <a unique key for this request>" \
--data-binary @- <<'JSON'
{
"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"
}
JSONimport os
import requests
response = requests.post(
os.environ["UNDERLAYER_BASE_URL"] + "/v1/transactions",
headers={"X-API-Key": os.environ["UNDERLAYER_API_KEY"], "Idempotency-Key": "<a unique key for this request>"},
json={
"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"
},
)
print(response.status_code, response.json())const response = await fetch(process.env.UNDERLAYER_BASE_URL + "/v1/transactions", {
method: "POST",
headers: {
"X-API-Key": process.env.UNDERLAYER_API_KEY,
"Content-Type": "application/json",
"Idempotency-Key": "<a unique key for this request>",
},
body: JSON.stringify({
"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"
}),
});
console.log(response.status, await response.json());Written from the example on this page. UNDERLAYER_BASE_URL is https://api.underlayer.eu; UNDERLAYER_API_KEY is yours, given at onboarding.
Responses
| Status | Body | Description |
|---|---|---|
200 | PaymentDecision or PostEventPayment | Released ( |
202 | PaymentDecision or PostEventPayment | Accepted for screening only. The payment must not be settled: |
400 | ErrorBody | The body is not a JSON object, or the database refused the payment with a
Correct the request; do not send it again unchanged. |
401 | ErrorBody | The key is missing, malformed (not |
403 | ErrorBody | 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. |
409 | ErrorBody | The request repeats an earlier payment's reference or key but is not the same payment; nothing was stored. |
413 | ErrorBody | 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. |
429 | ErrorBody | Rate limited. Wait the seconds in |
500 | ErrorBody | The database refused the payment with something other than a validation message. |
503 | ErrorBody | The service cannot take the payment or card event now; nothing was stored and your key was not judged. |
Examples of 200
Example: released
{
"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"
}
Example: Released; one session field was malformed and not stored (the payment is never refused for it)
{
"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"
}
]
}
Example: duplicate
{
"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"
}
Examples of 202
Example: A payment sent with executed_during_outage true
{
"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."
}
Example: aiTriage
{
"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"
}
Example: screeningDidNotFinish
{
"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
}
Examples of 400
Example: notJson
{
"error": "Body must be valid JSON",
"error_code": "BODY_NOT_JSON"
}
Example: notObject
{
"error": "Body must be a JSON object",
"error_code": "BODY_NOT_OBJECT"
}
Example: The message % is required for % payments, as the caller receives it
{
"error": "counterparty is required for SEPA payments",
"error_code": "MISSING_CHANNEL_FIELD"
}
Example: The message % may have at most two decimals, for an amount of 10.123
{
"error": "amount may have at most two decimals",
"error_code": "TOO_MANY_DECIMALS"
}
Example: The message % must be a two-letter ISO 3166-1 alpha-2 country code such as LT, for origin_country XX
{
"error": "origin_country must be a two-letter ISO 3166-1 alpha-2 country code such as LT",
"error_code": "INVALID_COUNTRY"
}
Example: An external_transaction_id or customer_ref beginning EXAMPLE-
{
"error": "references beginning EXAMPLE- come from the documentation and are refused: send your own references",
"error_code": "EXAMPLE_ROW"
}
Examples of 401
Example: missing
{
"error": "Missing or malformed API key",
"error_code": "API_KEY_MISSING"
}
Example: invalid
{
"error": "Invalid or revoked API key",
"error_code": "API_KEY_INVALID"
}
Examples of 403
Example: addressNotAllowed
{
"error": "API key not allowed from this address",
"error_code": "API_KEY_ADDRESS_NOT_ALLOWED"
}
Example: institutionInactive
{
"error": "Institution is not active",
"error_code": "INSTITUTION_NOT_ACTIVE"
}
Example: classification
{
"error": "This API key may not submit TEST payments",
"error_code": "CLASSIFICATION_NOT_ALLOWED_FOR_KEY"
}
Examples of 409
Example: differentBody
{
"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"
}
Example: twoPayments
{
"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"
}
Examples of 413
Example: tooLarge
{
"error": "Request body too large",
"error_code": "BODY_TOO_LARGE"
}
Examples of 429
Example: failedAuthentications
{
"error": "Too many failed authentication attempts from this address; retry after the number of seconds in Retry-After",
"error_code": "TOO_MANY_FAILED_AUTHENTICATIONS"
}
Example: perKey
{
"error": "Too many requests for this API key; retry after the number of seconds in Retry-After",
"error_code": "RATE_LIMITED_KEY"
}
Example: perAddress
{
"error": "Too many requests from this address; retry after the number of seconds in Retry-After",
"error_code": "RATE_LIMITED_ADDRESS"
}
Examples of 500
Example: engine
{
"error": "Decisioning engine error",
"error_code": "ENGINE_ERROR",
"code": "P0001"
}
Examples of 503
Example: busy
{
"error": "Service busy",
"error_code": "SERVICE_BUSY"
}
Example: keyCheck
{
"error": "Service unavailable",
"error_code": "SERVICE_UNAVAILABLE"
}
Example: settings
{
"error": "Service temporarily unavailable",
"error_code": "SERVICE_SETTINGS_UNUSABLE"
}
© 2026 Underlayer, Lithuania. info@underlayer.eu System status Privacy notice