Called by a POS terminal after scanning the user’s QR code. Creates a payment intent with status=pending_approval targeted at the scanned user’s wallet and publishes a payment.approval_requested NATS event so the user’s mobile app can display the approval screen. Requires a merchant JWT (client credentials flow with the merchant’s client_id/client_secret). counter_id is passed in the request body and validated against the DB to confirm it belongs to the authenticated merchant.
Keycloak JWT. Roles: admin (platform admin — can register merchants, act on behalf of any merchant), merchant (dashboard user — scoped to their own merchant_id via user attribute mapper), POS terminals use client credentials flow with merchant_id injected via protocol mapper.
Request body for counter-initiated (reverse QR) payment. counter_id is required and validated server-side to confirm it belongs to the authenticated merchant.
Token read from the user's QR code (currently equals the user's wallet ID).
"8566959d-f366-45d9-9e6e-241ba189988f"
POS terminal identity — must belong to the authenticated merchant.
"c1d2e3f4-a5b6-7890-abcd-ef1234567890"
x >= 0.0135.5
"USD"
"Lunch combo"
Seconds until approval expires (default: 300 — 5 minutes)
x >= 30300
Merchant's own order or invoice ID.
"ORD-9001"
Per-intent webhook override URL.
"https://pos.example.com/webhooks/ORD-9001"
Arbitrary JSON metadata forwarded verbatim in the webhook payload.
{ "table": "T12", "cashier": "Jane" }