Create a new POS counter for the authenticated merchant. Returns Keycloak client credentials (client_id / client_secret) and a webhook_secret for HMAC signing — these are shown only once, store them securely. The counter’s client_id can be used to obtain a machine token via Keycloak client credentials flow.
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.
Counter created. Save client_secret and webhook_secret immediately — they cannot be retrieved again.
true
A POS terminal belonging to a merchant
Keycloak client ID for POS client_credentials flow
"counter-c1d2e3f4-a5b6-7890-abcd-ef1234567890"
Keycloak client secret — shown only on creation, store securely
"abc123secretvalue"
HMAC-SHA256 secret for verifying webhook signatures — shown only on creation, store securely
"a3f8c2e1d4b7a9f0e2c5b8d1a4f7c0e3d6b9a2f5c8e1d4b7a0f3c6e9d2b5a8f1"
"Store client_secret and webhook_secret securely — they are only shown once."