Webhooks & Firehoses
PosGreen Implementation
Running PosGreen counters can accept WebSocket connections. They only accept WS:// protocol so cannot be connected from webpages running on https:// In general, you should not need to connect direct to counters so this does not impact. If you do nned to connect from HTTPS web pages, then install a SSL proxy such as Stunnel or Deno, etc
Connect URLs
PosGreen opens websockets on the following URLs
- /fd1/open_websocket
Opens a normal FD1 websocket talking to PosGreen
- /fd1/open_websocket?purpose=presell
Specifies that a presell connection is requested. This is a special mode that allows instore tablets to interact directly with the lanes POS database. You must use purpose=presell in the URL when connecting, as a seperate process will normally be created to manage the websocket.
fd1.session.login
The session login packet for PosGreen allows the following options
Parameter | Description |
---|---|
"purpose":"customerdisplay" |
Indicates this websocket is being used for a customer display to show progress on the current sale.
You must set this inside the session packet, not on the connecting URL |
"purpose":"debugscope" |
Sets this websocket to allow debugscope diagnostics. The debugscope endpoints are not for operational purposes and can change without warning.
You must set this inside the session packet, not on the connecting URL |
Available End Points
- fd1.firehose.open_firehose
- fd1.firehose.close_firehose
- fd1.firehose.set_firehose_option
- fd1.customerdisplay.get_info
Returns collection of useful information for customer displays. Mainly used on initial socket open to get store name and details