kepa
WebSocket Stream/openSession

Open a Session

Planned
Planned. 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/session
Open 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.
POS sends salePOST /transaction/sale01Readywaiting_for_card02Tap detectedcard_detected03Authorizingprocessing04Approvedresult05

Request body

application/json

actionenumRequired

The action to initiate.

salepre_authcard_readcompletedisplayinputabort
amountinteger

Required for sale/pre_auth.

currencystring

Required for sale/pre_auth.

entryModeenum

Optional card entry mode.

CONTACTLESSCONTACTAUTO
referenceIdstring

POS-assigned reference identifier.

granularboolean

Set true to run in granular mode and receive online_authorization events.

transactionIdstring

Required for complete and abort.

responseCodestring

ISO 8583 response code (complete action).

authorizationCodestring

Issuer 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