Overview
ws_token is a short-lived JWT used to authenticate websocket streams from browser/mobile contexts without exposing long-lived API keys. It is not required for server-to-server connections that can send API key headers.
Note: ws_token is only for merchant/commerce streams. Payor streams use the payment session token.
Authentication
Minting requires server-to-server auth:x-api-key(merchant)x-commerce-api-key(commerce)
Request
Endpoint:POST /api/v1/ws/token
Response
Errors
401invalid API key400invalid scope/ttl
Examples
- Use the returned
data.tokenas?token=<ws_token>when connecting to/ws/merchant/eventsor/ws/commerce/eventsfrom browser/mobile clients.

