Ping Test

The Spice Payments Adaptor exposes an endpoint to provide information about its state. It is required that the POS use this endpoint prior to each transaction to ensure that the adaptor is running and ready to transact.

http://localhost:8282/v1/ping

{
"version": "1.0",
"status": "PairedConnected",
"flow": "Idle",
"pong": "2000-01-01T01:00:00.000Z"
}

The fields returned are outlined below:

Version: The version of Spice that is running.

Status: Returns the connection status between the adaptor and the EFTPOS terminal. The status will be one of three possible.

  1. Unpaired: The adaptor has no connection to an EFTPOS terminal and needs to be paired.
  2. PairedConnecting: The adaptor has been paired with a terminal but cannot make a connection. The terminal maybe turned off or the local network may be down.
  3. PairedConnected: Everything is OK and the adaptor is ready to accept a transaction.

Flow: Returns the current flow of the adaptor. This can be one of three flows.

  1. Idle: Ready for next request.
  2. Pairing: The adaptor is currently pairing with the EFTPOS terminal. The adaptor cannot start a transaction until this flow is complete.
  3. Transaction: Currently processing a transaction.

Pong: This will return the time and date of the successful Ping request.