Skip to main content
Subscribe to one transaction at a time and receive push updates as its status changes.

Connection

Authentication

Authenticate with the same client_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 polling GET /widget/transactions/{id} every 5–10 seconds.