SwiftPower / Vending API gateway

From a vending request to a verified device result.

A request being accepted does not prove a meter has applied a top-up. This work connected application interfaces to device behaviour, with evidence of what happened at each stage.

My role
Technical Lead & protocol contributor
Practice
Solutions engineering · APIs · IoT
Scope
API design · pilot integration verified

The context

Prepaid vending needs a dependable connection between the application initiating a top-up and the physical device applying it. Communication alone is not enough: the workflow must distinguish a request entering the system from the result being confirmed.

The engineering problem crossed API design, service messaging and constrained device communication. It required both a clear interface for consumers and a way to validate what the meter actually did.

My contribution

  • Designed vending interfaces and worked on the integration between application workflows and device communication.
  • Contributed to the MQTT messaging and DLMS/COSEM protocol path used to deliver prepaid top-ups.
  • Investigated token encoding and session behaviour, and contributed to independent checks of the device-side outcome.
  • API design
  • MQTT
  • DLMS/COSEM
  • STS vending
  • Integration debugging

The system, in view

  1. RequestApplication intent
  2. Device actionProtocol integration
  3. VerificationIndependent evidence
Conceptual workflow: application intent leads to a device action, then confirmation. The broader gateway includes design work; the top-up path was verified in a pilot.

The important decision

Confirm the effect, not just the transport.

A message acknowledgement answers a different question from a successful top-up. I treated transport and device confirmation as separate stages. That distinction shaped the interface discussion and the validation work, rather than reporting an accepted message as a completed vending operation.

From design to implementation

The device path uses MQTT messaging alongside DLMS/COSEM, a protocol framework for communicating with meters, and STS prepaid vending. Integration work included resolving encoding behaviour and checking the effect against device readings.

Validation drew on independent evidence from messaging, service behaviour and the meter itself. That provided a stronger account of the result than relying on one successful service response.

The interface and gateway story includes architectural design. The verified delivery result is the pilot top-up integration; it is not a claim that every proposed gateway component is commercially deployed.

What the work established

End-to-end prepaid vending proven in a pilot, with confirmation from message transport, service evidence and device readings.

The lesson

Useful interfaces communicate what a system knows. Separating intent, execution and confirmation helps both application engineers and operational stakeholders understand the meaning of a result.