Documentation

Documentation/Guides/

Session and device data

A payment can carry what your systems know about the session it came from: the customer's IP address, device, time zone, how and by whom it was initiated, what your device-intelligence tools saw, and what you know about the payee. Monitoring rules read these fields, so your institution can write rules such as "a large payment from a device the customer has never used", "several customers on one IP address", "a payment while remote-access software runs" or "a payment sent although the payee check said no match".

Every field is optional. Send what you have; leave out what you do not. Card events take none of these: ip_address and device_id sent on a card event are ignored.

The same session and device fields can be sent with a customer event (a sign-in, a changed phone number, a payee added, a card payment confirmed in your app), read by the same rules: see Customer events.

Two kinds of field, two rules

KindFieldsA malformed value
Session and deviceip_address, ip_country, device_id, device_timezone, device_utc_offset, session_id, initiation_channel, initiation, device_os, vpn_or_proxy, remote_access_detectedNever refuses the payment. The value is not stored, the payment is decided as if the field had not been sent, and the answer carries warnings naming the field.
Payee and balancecounterparty_account, counterparty_relationship, payee_verification, available_balance, balance_currencyRefused with a 400, like every other field of the payment.

Why the difference: session data comes from SDKs and gateways you do not fully control, and a broken device header must never stop a customer's payment. The payee fields are the payment's own data, which your system controls.

A field you leave out never causes a warning, an alert or a count anywhere: missing context is normal.

The fields

FieldFormatWhat is stored
ip_addressOne IPv4 or IPv6 host address: 203.0.113.10, 2001:db8::10. No prefix (/24).The address in its canonical form (an IPv4-mapped IPv6 address as IPv4), its scope (PUBLIC, PRIVATE, RESERVED) and our own lookup of its country.
ip_countryA two-letter country code: your own geolocation of the address.Yours wins. When you send none, our lookup fills it in; when both are known and differ, the payment is marked ("IP country sent differs from our lookup").
device_id8 to 128 letters, digits or . _ : + / = -: your stable identifier of the device (your device SDK's).As sent.
device_timezoneAn IANA time zone name: Europe/Vilnius.The name, and its UTC offset at the payment's time (minutes east of UTC).
device_utc_offset+hh:mm or -hh:mm, from -12:00 to +14:00, in quarter hours: +03:00.The offset in minutes east of UTC. With device_timezone, the zone's own offset is kept and a different one is a warning.
session_id1 to 128 printable characters without spaces.Only a SHA-256 of your institution and the id: rules can tell payments of one session apart, and the id itself is never kept.
initiation_channelMOBILE_APP, WEB_BROWSER, API, BRANCH, PHONE, OTHER.As sent, upper-cased.
initiationCUSTOMER_INITIATED, STANDING_ORDER, SCHEDULED, DIRECT_DEBIT, MERCHANT_INITIATED, BULK_UPLOAD, STAFF_INITIATED, OTHER.As sent, upper-cased.
device_osANDROID, IOS, WINDOWS, MACOS, LINUX, OTHER.As sent, upper-cased.
vpn_or_proxytrue or false.As sent.
remote_access_detectedtrue or false.As sent.
counterparty_accountThe other party's account or IBAN: 1 to 34 letters and digits (spaces are taken out). An IBAN must pass its check.The payee's account on an outgoing payment, the payer's on an incoming one. Rules read it and the IBAN's country.
counterparty_relationshipSELF, RELATED_PARTY, UNRELATED.As sent.
payee_verificationMATCH, CLOSE_MATCH, NO_MATCH, NOT_POSSIBLE: your Verification of Payee result.As sent.
available_balanceAn amount; zero or negative allowed. The customer's balance before the payment.As sent, and in EUR at the reference rate.
balance_currencyA currency code; default the payment's currency.As sent; not stored without available_balance.

What is never taken: a browser user agent and a GPS position.

A payment with its context

{
  "external_transaction_id": "EXAMPLE-TX-0002",
  "source_system": "CORE-BANKING",
  "customer_ref": "EXAMPLE-C-0001",
  "channel": "SEPA",
  "direction": "OUTGOING",
  "amount": 1250.00,
  "currency": "EUR",
  "counterparty": "Example Supplier GmbH",
  "counterparty_account": "DE89370400440532013000",
  "counterparty_relationship": "UNRELATED",
  "payee_verification": "MATCH",
  "available_balance": 4800.00,
  "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"
}

The warnings answer

When a session or device field is malformed, the answer carries warnings, a list of { "field", "message" }. The message is our own words, ending : not stored, and never quotes your value. Here a time zone was sent as GMT+3:

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

The warnings are kept with the payment and answered again on a repeat. Every message is listed in Errors, "Session and device warnings". Log them and fix your integration; the payment itself needs nothing.

What Underlayer computes from it

When it stores the payment, Underlayer compares these fields with the customer's earlier payments and events and stamps the payment with facts your rules read. Which field feeds which fact:

You sendFacts
device_iddevice_is_new, device_age_hours, customer_device_history_days, customer_devices_24h (from the customer's device ledger, kept from payments and customer events).
device_timezone or device_utc_offsetdevice_local_hour; with the IP country device_tz_matches_ip_country; with the customer's residence device_tz_matches_residence; against the customer's previous clock device_region_changed_hours.
ip_address or ip_countryWith the customer's residence ip_country_matches_residence.
session_idsession_age_seconds, when you sent the session's sign-in as a customer event.
counterparty and counterparty_accountcounterparty_is_new, counterparty_age_days, counterparty_prior_payments, counterparty_account_is_new, and payee_added_minutes with a payee event.

A fact whose field you did not send is unknown, and a condition on an unknown value never matches; nothing is assumed. The location facts (the time zone and IP country against each other and the residence, a region change) are signals to combine with another risk factor: travel, roaming, VPNs and shared networks make them differ for honest customers. The rule builder says so on each of them and warns when a rule reads session and device data your institution has not sent with any payment in the last 30 days. The facts are stamped once, at the payment's own time, and never change. A rule that groups payments by device or IP address (one device used by several customers) leaves out a payment sent without one: an unknown device is no device.

Our IP-to-country lookup

The country of an IP address is looked up in DB-IP's "IP to Country Lite" database (CC BY 4.0, updated monthly; "IP Geolocation by DB-IP", https://db-ip.com). Your own ip_country wins; ours fills the gap and checks yours. No IP address is ever sent anywhere for the lookup: the whole database is loaded into Underlayer and refreshed every month.

Personal data

An IP address, a device identifier and a session are personal data of your customer. They are kept with the payment in your institution's own records; when the customer's file is erased under your retention policy, the IP address, the device identifier and the session hash are erased with it. The session id itself is never kept, only its hash.

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