Documentation

Documentation/Guides/

Authentication

Every client endpoint takes one header:

X-API-Key: <key_id>.<secret>

The key is ak_ and 16 hexadecimal characters, a dot, and 48 hexadecimal characters. The health route (GET /v1/health) is the only endpoint that needs no key.

Getting a key

An administrator of your institution issues keys on the API and webhooks screen of the application. Each key lists the data classifications it may send (PRODUCTION, TEST, DEMO, SCALE_TEST); a request with another classification answers 403 (This API key may not submit <classification> payments). The key is shown once: only a hash of its secret is kept, so a lost key cannot be shown again; issue a new one.

What a key decides

The key decides your institution. Nothing in a request can choose another one: every payment, card event, customer and decision look-up is your institution's own, and a payment of another institution answers 404 and is never read.

Allowed addresses

An administrator may limit each key to the IP addresses and ranges your systems send from, on the same screen (one address or range per line, at most 20, for example 203.0.113.10 or 203.0.113.0/24; IPv4 and IPv6). A key with an empty list, as every key is when issued, may be used from any address. A key with a list answers 403 (API key not allowed from this address) to a request from any other address, and that answer counts as a failed authentication of the address, as a wrong key does. The address checked is the one our hosting platform recorded for the connection, never a header your request sets. Only public addresses can be allowed: a private, loopback or link-local range never reaches us as your address.

When your systems move to new addresses, add the new ones first, switch over, then remove the old ones.

Rotating a key

  1. Issue the new key.
  2. Switch every caller to it.
  3. Revoke the old key. A request with a revoked key answers 401 (Invalid or revoked API key).

Revoke a key at once if it may have leaked. 20 failed authentications from one address within 10 minutes refuse that address for 10 minutes, a right key included (Rate limits and back-pressure).

Answers

StatuserrorWhat to do
401Missing or malformed API keySend the key as issued.
401Invalid or revoked API keyCheck which key the caller uses.
403API key not allowed from this addressSend from an address the key allows, or have it added.
403Institution is not activeContact Underlayer.
503Service unavailableThe key could not be checked (not a key error): retry after Retry-After.

The full list is in Errors, section 1.

© 2026 Underlayer, Lithuania. info@underlayer.eu System status Privacy notice