Skip to main content

4. Policy

The policy endpoint provides the current risk limits, blocked status codes, and clock drift allowance for the authenticated terminal. Terminals cache this at session grant time and use cached values when offline.

Financial limit values and enforcement rules: Tech Specs §9.


GET /api/policy

Fetch current risk limits and operational constraints for this terminal.

Request headers: Authorization: Bearer <terminal-token>

Response (200 OK):

{
"maxBalance": 5000000,
"singleTxLimit": 1000000,
"dailyLimit": 2000000,
"weeklyLimit": 5000000,
"blockedStatuses": [1, 2, 3, 4],
"clockDriftAllowanceSec": 3600
}
FieldTypeDescription
maxBalanceuint32Maximum balance a card may hold (IDR)
singleTxLimituint32Maximum single transaction amount (IDR)
dailyLimituint32Maximum cumulative daily debit (IDR); enforced at reconciliation
weeklyLimituint32Maximum cumulative weekly debit (IDR); triggers review on breach
blockedStatusesuint8[]Status codes the terminal must treat as blocked
clockDriftAllowanceSecuint32Maximum tolerated clock difference (seconds) between terminal and backend

Error responses:

CodeErrorCause
401 Unauthorizedinvalid_tokenBearer token missing or invalid

Caching

  • The terminal should fetch a fresh policy at each session grant renewal.
  • Cached policy values remain valid until the session grant expires.
  • If a cached policy is unavailable (first boot, cache cleared), the terminal must go online before processing any financial transaction.