WebSocket Stream/openSession
Open a Session
PlannedPlanned. This contract is published ahead of the build. It is not callable yet — treat it as the shape to design against, not a live endpoint.
Stream transaction lifecycle events in real time.
WS
/v1/sessionOpen a WebSocket to drive transactions and stream their lifecycle. Send JSON actions — sale, pre_auth, card_read, complete, display, input, abort — and receive typed events discriminated on the event field, so one switch drives your UI from waiting_for_card to result. It survives flaky networks: the terminal keeps running if the POS drops, and a resume token replays the stream from where you left off.
Sale lifecycle
~5–15 seconds
What happens after a single POST /v1/transaction/sale. Each step is also emitted as a WebSocket event if you connect a session in parallel.
Request body
application/json
actionenumRequiredThe action to initiate.
salepre_authcard_readcompletedisplayinputabortamountintegerRequired for sale/pre_auth.
currencystringRequired for sale/pre_auth.
entryModeenumOptional card entry mode.
CONTACTLESSCONTACTAUTOreferenceIdstringPOS-assigned reference identifier.
granularbooleanSet true to run in granular mode and receive online_authorization events.
transactionIdstringRequired for complete and abort.
responseCodestringISO 8583 response code (complete action).
authorizationCodestringIssuer auth code (complete action).
Good to know
- Planned target-state contract only: the Go engine does not serve /v1/session today.
- No local terminal HTTP or WebSocket listener is part of the shipped Android rail.
- Never put an API key, device token, or other credential in a URL query string.
openSession