LimitRail - external integrator playbook
This playbook explains how an external system integrates LimitRail to evaluate pricing, limits, customer thresholds and runtime usage. LimitRail does not open accounts, execute payments, own the ledger or calculate accounting balances. The calling system executes the financial operation; LimitRail returns the policy decision.
1. Core concept
The integration revolves around three references.
| Reference | Owner | Use |
|---|---|---|
externalAccountRef |
Calling system | Opaque account reference. It must not contain IBAN, name, email, tax id or other personal data. |
productId / productCode |
LimitRail | The account is registered with the productId returned by catalog APIs. productCode remains the business reference used to align the core product. |
operationCode |
Agreement between integrator and LimitRail | Operational code sent in evaluate/commit. There is no mapping: if the core sends ATM_WITHDRAWAL, LimitRail configures ATM_WITHDRAWAL. |
externalOperationRef does not decide policy. It only correlates the LimitRail
decision with the external event.
2. Authentication and scopes
Use OAuth client credentials. The client gets a bearer token with
POST /connect/token, then calls v1 APIs.
| Scope | When it is needed |
|---|---|
limitrail.catalog.read |
Read products, operation catalog and policy inputs. |
limitrail.accounts.read |
Read accounts, applicable pricing, counters and customer thresholds. |
limitrail.accounts.write |
Register accounts, update status, attributes and customer thresholds. |
limitrail.evaluate |
Evaluate policy with POST /v1/policy/evaluate. |
limitrail.usage.write |
Confirm usage, cancel reservations or reverse usage. |
limitrail.audit.read |
Read runtime events for support, audit or reconciliation. |
3. Initial integrator setup
Before runtime requests, the integrator reads catalog data.
GET /v1/products?take=25ReturnsproductId,productCode, status and currency.productIdis the value currently required by account registration;productCodeis the business code to align in the calling system.GET /v1/operations?take=25Returns accepted operation codes. Thecodefield is the value sent asoperationCode.GET /v1/policy-dimensionsReturns data that can influence rules and counters. Dimensions with sourceREQUEST_METADATAgo in runtimemetadata; dimensions with sourceACCOUNT_ATTRIBUTEare stored on the account.
4. Account lifecycle
When an account enters the LimitRail scope, register the contract:
POST /v1/account-contracts
{
"externalAccountRef": "ACC_7F3A92_001",
"productId": "7b2d8b9f-1a4c-4f3b-9c10-35e4b7a98c21",
"segmentCode": null,
"openedAtUtc": "2026-07-05T10:00:00Z",
"attributes": {
"customer_tier": "STANDARD",
"residency_country": "ITA"
}
}
The integrator does not send the condition plan version. LimitRail resolves it from product, segment or account-level assignment. Account deals and policy overrides are backoffice functions, not public onboarding fields.
When product, segment, lifecycle status or operational block changes, update the contract:
PUT /v1/account-contracts/{id}
If status = BLOCKED, also send blockType and blockReasonCode. If
status = CLOSED, runtime evaluations are blocked and the contract is not
reopened.
5. Account attributes
Account attributes are stable facts reused by rules without sending them in
every request. Examples: customer_tier, residency_country,
regulatory_status.
PUT /v1/account-contracts/{id}/attributes
{
"code": "customer_tier",
"value": "PREMIUM"
}
LimitRail accepts only active attributes registered as ACCOUNT_ATTRIBUTE and
compatible with allowed values when configured.
6. Customer-selected thresholds
Some limits can be configurable by the end customer. The customer may only reduce the threshold within product boundaries; it cannot increase it above the product maximum.
Read available thresholds:
GET /v1/accounts/{externalAccountRef}/limit-settings
Set a threshold:
PUT /v1/accounts/{externalAccountRef}/limit-settings/{limitRuleCode}
{
"limitAmount": 200.00,
"source": "CUSTOMER",
"reason": "Customer-selected ATM daily amount limit"
}
For count limits, use limitCount. When the customer threshold is active, the
runtime response shows thresholdSource = CUSTOMER_SETTING.
Customer thresholds are not exceptions. An exception temporarily authorizes a bypass; a customer threshold makes the account stricter.
7. Runtime evaluation
The main call is:
POST /v1/policy/evaluate
{
"externalAccountRef": "ACC_7F3A92_001",
"operationCode": "ATM_WITHDRAWAL",
"amount": 120.00,
"currencyCode": "EUR",
"externalOperationRef": "OP_20260705_00001",
"occurredAtUtc": "2026-07-05T10:05:00Z",
"metadata": {
"terminal_country": "ITA"
},
"mode": "PREVIEW",
"idempotencyKey": null
}
metadata must contain facts only. Correct examples:
destination_country, terminal_country, resulting_balance_after_operation,
average_monthly_balance. Avoid: high_amount, discounted_fee,
domestic_fee, limit_exceeded.
Runtime modes
| Mode | Effect |
|---|---|
PREVIEW |
Evaluates policy and fees without writing usage. It is the default when mode is missing. |
RESERVE_CAPACITY |
Evaluates and reserves limit capacity for an asynchronous flow. Requires idempotencyKey. |
COMMIT_USAGE |
Evaluates and immediately records usage. Requires idempotencyKey. |
If the decision is DENIED_BY_POLICY, the calling system must not proceed. If
it is ALLOWED, WARNING or FEE_CALCULATED, the caller continues according
to its own operational process.
8. Reserve, commit, cancel and reverse
For asynchronous flows, use two phases.
POST /v1/policy/evaluatewithmode = RESERVE_CAPACITY. If policy allows the operation, LimitRail returnscapacityReservationId.When the external operation is confirmed:
POST /v1/usage/commit
{
"capacityReservationId": "2b7e4f0c-6f2a-4d34-a76e-9d91f9a53112",
"idempotencyKey": "COMMIT_OP_20260705_00001",
"externalAccountRef": "ACC_7F3A92_001",
"operationCode": "ATM_WITHDRAWAL",
"amount": 120.00,
"currencyCode": "EUR",
"externalOperationRef": "OP_20260705_00001",
"occurredAtUtc": "2026-07-05T10:05:00Z",
"metadata": {
"terminal_country": "ITA"
}
}
- If the operation is abandoned before commit:
POST /v1/capacity-reservations/{id}/cancel
- If already-applied usage must be compensated:
POST /v1/usage/{id}/reverse
with reversalIdempotencyKey.
The same idempotency key with the same payload must return the same outcome. The same key with a different payload is an integration error.
9. Reading the evaluate response
| Field | Meaning |
|---|---|
decision |
Outcome: ALLOWED, DENIED_BY_POLICY, WARNING, FEE_CALCULATED. |
reasonCode |
Short reason or rule code that decided. |
fees / totalFees |
Fees calculated by LimitRail. |
ruleResults |
Evaluated limit rules, product/customer thresholds and usage. |
limitImpacts |
Counter projection after the operation. |
policyExceptionTrace |
Exceptions considered or consumed. |
usedDimensions |
Data used in the decision, excluding sensitive values. |
missingDimensions |
Data required by rules but unavailable. |
unusedDimensions |
Metadata sent but not used by relevant rules. |
policyProvenance |
Policy source: product, segment or account-level. |
10. Useful reads
| Endpoint | Use |
|---|---|
GET /v1/account-contracts/by-account/{externalAccountRef} |
Verify product, segment, status and resolved policy. |
GET /v1/accounts/{externalAccountRef}/pricing |
Display or diagnose applicable pricing rules. |
GET /v1/accounts/{externalAccountRef}/usage-counters?take=100 |
Display current usage, remaining capacity and customer thresholds. |
GET /v1/usage?from={from}&to={to} |
Reconcile applied or reversed usage events. |
GET /v1/capacity-reservations?from={from}&to={to} |
Inspect open, confirmed, cancelled or expired reservations. |
Operational lists are paginated and must use time windows. Do not use them as bulk exports.
11. Enums the integrator must know
Use UPPER_SNAKE_CASE values.
| Field | Main values |
|---|---|
| Account status | PENDING, ACTIVE, BLOCKED, CLOSED |
| Account block type | NONE, OPERATIONAL_RISK, REGULATORY_JUDICIAL, TECHNICAL_CLOSURE |
| Evaluation mode | PREVIEW, RESERVE_CAPACITY, COMMIT_USAGE |
| Policy decision | ALLOWED, DENIED_BY_POLICY, WARNING, FEE_CALCULATED |
| Customer limit source | CUSTOMER, OPERATOR |
| Customer limit status | ACTIVE, CANCELLED |
| Reservation status | RESERVED, CONFIRMED, CANCELLED, EXPIRED |
| Usage event status | APPLIED, REVERSED |
Pricing and limit configuration enums belong to the configuration manual, not to the standard integrator payload.
12. Integration checklist
- Get a token with OAuth client credentials.
- Read products, operations and policy inputs before runtime.
- Register each account with an opaque reference.
- Update account status, block, segment and product when they change.
- Store only stable facts as account attributes.
- Send only current-operation facts in
metadata. - Use direct
operationCode. - Do not send
externalSystemCodeorexternalOperationCode. - Do not send
conditionPlanVersionId. - Use idempotency key for every call that writes state.
- Read decision, fees, rule results and limit impacts before proceeding.