Connection
Authentication
Authenticate with the sameclient_token you use for HTTP. Send it in the Authorization header on the upgrade request:
Open WebSocket connections from your backend server, not the browser. Browsers cannot send custom headers on the upgrade request, and
client_token must not be exposed to the frontend. Your backend subscribes and pushes status updates to the browser through your own channel (SSE, polling your API, or a WebSocket relay).Query parameters
One connection subscribes to one transaction. To watch multiple transactions, open multiple connections.
Events
tx.update
Fired on every status change for the subscribed transaction.
Code examples
Node.js
Reconnection
Always implement reconnection with exponential backoff and a cap:Fallback to polling
If your environment cannot use WebSocket (proxy, ad blocker, browser without backend support), fall back to pollingGET /widget/transactions/{id} every 5–10 seconds.