rl-docs-hub

Home · Apps · rl-bank-mvp


Terminal API specs

Status: Draft, intended for the breadboard terminal slice.

API style recommendation

For terminal/device traffic, prefer REST over GraphQL.

Why:

Proposed endpoints

POST /api/terminals/payments/authorize

Create and authorize a terminal payment attempt.

Request body:

Response body:

Behavior:

POST /api/terminals/payments/cancel

Cancel an in-flight local session that has not been finalized.

Request body:

Response body:

GET /api/terminals/:terminalId/bootstrap

Return minimal terminal bootstrap/config payload.

Response body:

Validation rules

Transaction mapping

Recommended mapping into current backend concepts:

Error semantics

Terminal-friendly errors should be compact and deterministic:

Avoid verbose stack-trace style responses. Firmware needs short messages and stable codes.

Auth recommendation

Do not reuse customer bearer tokens.

Use one of:

For the breadboard phase, a per-device secret is good enough if: