Skip to content

v2.3.0 - Mini-PoS Support

Choose a tag to compare

@AxelHamburch AxelHamburch released this 11 Jun 19:26
· 60 commits to main since this release

Server-side support for the new ZapBox Touch 3.5" Mini-PoS mode (firmware v953139t): the device requests a Lightning invoice for a freely entered amount, the extension pushes the settlement back over the existing WebSocket.

Tag: v2.3.0 (db1d610) · Requires: LNbits ≥ 1.4.0 · Firmware: ZapBox Touch 3.5" v953139t for Mini-PoS (older firmware keeps working — fully backwards compatible)

✨ Features

Mini-PoS invoice endpoints

  • POST /zapbox/api/v1/pos/invoice (X-Api-Key = wallet invoice key): converts amount + currency to sats (fiat via fiat_amount_as_satoshis, sat/sats passthrough), creates the BOLT11 invoice and stores it in the new zapbox.minipos_payment table
  • GET /zapbox/api/v1/pos/invoice/last?device_id=...: amount/currency of the last settled Mini-PoS payment — used by the LAST PAY button on the device

Settlement push

  • Mini-PoS-tagged settlements mark the payment as paid and push the relay trigger 5-{duration} over the WebSocket — duration taken from the pin 5 switch config (fallback 3000 ms)

Bolt Card pays the pending invoice

  • /zapbox/api/v1/nfc/{device_id} accepts an optional minipos_hash: a Bolt Card tap then pays the pending Mini-PoS invoice (stored bolt11) instead of creating a new withdraw — the PIN-limit flow is unchanged

🐛 Fixes

  • pin_error WebSocket events carry a session_id, preventing stale events from interfering with a new PIN session
  • Device is forced into blocked state when the server reports the card as blocked
  • Import of get_minipos_payment in views_api.py — Bolt Card Mini-PoS payment threw a NameError (HTTP 500)

🗄️ Database

  • New migration m005: table zapbox.minipos_payment (runs automatically on first start after the update)

📜 Commits since v2.2.0

  • db1d610 fix: import get_minipos_payment in views_api - Bolt Card minipos payment threw NameError (HTTP 500)
  • c6f17ec feat: release v2.3.0 - Mini-PoS invoice endpoints and settlement push
  • f037ee7 feat(minipos): Mini-PoS invoice endpoints and settlement push
  • 15648b9 fix: add session_id to pin_error events to prevent stale event interference
  • 2b022a6 fix: force blocked state on device when server reports card blocked
  • f6f206f fix: update extensions.json hash for v2.2.0 (timeout WS event fix)

📦 Install / Update

Archive: https://github.com/AxelHamburch/zapbox_extension/archive/refs/tags/v2.3.0.zip
SHA256: 630759eb904e9c63b71a92c01ddda579e6ab026e7ae47634f68c00013f34b830 (verified against the tag archive, matches extensions.json on main)