Home · Apps · rl-bank-mvp
Status: Draft, intended for the breadboard terminal slice.
For terminal/device traffic, prefer REST over GraphQL.
Why:
POST /api/terminals/payments/authorizeCreate and authorize a terminal payment attempt.
Request body:
terminalId: stringrequestId: string — idempotency key generated by terminal per attemptmerchantRef: string | nullamountMinor: numbercurrency: stringpaymentToken: string — fake-bank demo token/card id read from NFCcapturedAt: string — ISO timestampfirmwareVersion: string | nullResponse body:
result: APPROVED | DECLINED | ERRORreference: string | nulltransactionId: string | nullmessage: stringapprovedAmountMinor: number | nulldebugCorrelationId: string | nullBehavior:
terminalId + requestIdcard_payment transactionDECLINED, not server crash semanticsPOST /api/terminals/payments/cancelCancel an in-flight local session that has not been finalized.
Request body:
terminalId: stringrequestId: stringreason: stringResponse body:
result: CANCELLED | NOOPdebugCorrelationId: string | nullGET /api/terminals/:terminalId/bootstrapReturn minimal terminal bootstrap/config payload.
Response body:
terminalIdmerchantLabelcurrencystatusnfcModeuiTheme optionalpollIntervalsMs optionalamountMinor must be > 0SGD firstpaymentToken must map to a supported fake-bank card/token representationRecommended mapping into current backend concepts:
card_paymentterminalIdmerchantRefrequestIdpaymentTokenFingerprint or safe masked token referencechannel = terminal_nfcTerminal-friendly errors should be compact and deterministic:
DECLINED — business rule or token/card issueERROR — backend/server/integration problemTIMEOUT — local terminal UX state, usually not an API response enumAvoid verbose stack-trace style responses. Firmware needs short messages and stable codes.
Do not reuse customer bearer tokens.
Use one of:
For the breadboard phase, a per-device secret is good enough if: