Authorization engine
The authorization engine answers, in a few tens of milliseconds, the question: is this payment
approved? It receives the networks’ (or the API’s) requests, runs them through a series of checks, holds
the amount, answers, records the decision and opens the operation’s lifecycle. Module ubo-auth-engine.
Where requests come from
Section titled “Where requests come from”| Origin | Input | Particulars |
|---|---|---|
| Network (in production) | ISO 8583 message on a TCP station | Chip data, encrypted PIN block, cryptograms, 3-D Secure |
| Network, deferred | Stand-in advices, chip offline operations | Decision already taken by the network or the chip: applied, never declined |
| API | POST /authorize |
Tests, channels outside the networks; same path |
| Portal, simulator | Manual injection or simulated traffic | Same path |
All become the same neutral request: amount, currency, card, merchant (name, MCC, country), channel, entry mode, authentication data, message type (final-amount authorization or pre-authorization), parent operation if any.
The steps
Section titled “The steps”Reading and validating the message: mandatory fields, formats, consistency (amount, currency, date). An unreadable message is declined (30) without going further. The message as it travelled is kept, masked and encrypted, in the network journal.
The card is found by its number’s fingerprint (or its identifier), with its cardholder, account, product and version, organisation. Unknown card: decline 14.
The card and authentication checks: card status (78, 62…), expiry date (54), the product’s and card’s services and restrictions (channel, country, MCC: 62, 58), PIN (55, 75) and CVV (82, N7) verified by the HSM, chip cryptogram (ARQC), 3-D Secure and the bank’s strong authentication policy (1A), sanctions screening and asset freeze (93).
The bank’s active rules for this card (base, organisation, product, card), by priority, with their external calls: see Rule engine. A rule may decline (05, 59…), flag, ask for strong authentication, or change the response.
In one database call: checking and holding the amount on the account’s available balance (51) and on all the limits concerned — card, product, shared (61, 65) — then updating the counters. Partial approval (10) if the merchant accepts it. See Limits and balances.
The response code, the approval code, the chip’s response cryptogram (ARPC) and the fields changed by the rules if any. Then, in one transaction: the operation, its explained decision, its first event and its trace.
Each check leaves a trace (checks): step, kind, label, outcome (pass, fail, flag, skip, info),
detail and object concerned. The full trace shows in an operation’s Checks tab and in the API’s answer.
After the decision: the operation’s lifecycle
Section titled “After the decision: the operation’s lifecycle”An approved operation opens a lifecycle, driven by the issuer state machine (module ubo-visa): each
following message — presentment, total or partial reversal, incremental authorization, credit, refund,
dispute, expiry — is a transition of this machine, with its checks (amount tolerances, delays, late
presentment, multiple clearing) and its effects (account movements, limits, entries, events).
| Situation | Processing |
|---|---|
| Pre-authorization (hotel, rental, fuel) | Estimated amount held; completed by incremental authorizations; the final amount comes with the presentment |
| Expiry | A hold not presented is released at its deadline (per operation type) by a background job |
| Different presentment | Never refused: posted, flagged (higher amount, late presentment, declined authorization) with the matching dispute right |
| Merchant-initiated (subscription, no-show) | Decided on its own merits, linked to the original operation when known |
| Cash-back | The cash part is identified, checked by its own limits and never refunded |
| Stand-in | The network’s advice is applied as an authorization: hold, limits, account and events stay right |
| Duplicate | A message replayed by the network is recognised and has one effect only |
The explained decision
Section titled “The explained decision”Each authorization leaves a decision record: outcome (approved, declined, strong authentication), deciding step and element (a check, a limit, a rule and its version), rules evaluated with their conditions and the values read, data used, external calls, response fields changed, a sentence of explanation, and a SHA-256 fingerprint computed again at each read (a change in the database shows). It can be replayed as it was or with today’s rules, and exported as a JSON file.
Guarantees and performance
Section titled “Guarantees and performance”- Time: around 50 ms at the middle of the distribution (median), measured per step.
- Atomicity: the operation, its hold, its decision, its event and its trace are recorded together.
- Limit consistency under heavy concurrency (ordered locking, slices): never exceeded.
- Quotas per bank: beyond them, answer 91 (the network may answer in stand-in) without touching the other banks.
- Availability: two gateways; the network station is taken over by the other within seconds.

