Documentation

Documentation/API reference/Endpoints/

GET /v1/transactions/{id}/decision

Read the current decision for one of your payments

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

NameInDescription
id requiredpath

The transaction_id or decision_id (a UUID) from the payment's answer, the decision_ref (DEC-<year>-<number>), 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.

Request sample

curl "$UNDERLAYER_BASE_URL/v1/transactions/<transaction_id>/decision" \
  -H "X-API-Key: $UNDERLAYER_API_KEY"
import os
import requests

response = requests.get(
    os.environ["UNDERLAYER_BASE_URL"] + "/v1/transactions/<transaction_id>/decision",
    headers={"X-API-Key": os.environ["UNDERLAYER_API_KEY"]},
)
print(response.status_code, response.json())
const response = await fetch(process.env.UNDERLAYER_BASE_URL + "/v1/transactions/<transaction_id>/decision", {
  method: "GET",
  headers: {
    "X-API-Key": process.env.UNDERLAYER_API_KEY,
  },
});
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

StatusBodyDescription
200DecisionView or PostEventView

The decision, or, for a payment sent after an outage, what it is (status: POST_EVENT, no decision).

401ErrorBody

The key is missing, malformed (not <key_id>.<secret>), unknown, revoked or wrong. Check the key; do not retry the same request.

403ErrorBody

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.

404ErrorBody

No decision of your institution has this id or reference.

409ErrorBody

More than one of your payments has this reference (from different source systems).

429ErrorBody

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.

500ErrorBody

The look-up failed on the server. Retry once; if it fails again, contact Underlayer with the code.

503ErrorBody

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.

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"
}

Examples of 404

Example: notFound

{
  "error": "Decision not found",
  "error_code": "DECISION_NOT_FOUND"
}

Examples of 409

Example: ambiguous

{
  "error": "More than one of your payments has this reference: use the transaction id or the decision reference",
  "error_code": "AMBIGUOUS_REFERENCE"
}

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: lookup

{
  "error": "Lookup failed",
  "error_code": "LOOKUP_FAILED"
}

Examples of 503

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