1. Home
  2. Connect API
  3. POST sale.json (authenticated)

POST sale.json (authenticated)

Initiate a sale transaction on the device.

Request

POST: https://ip-10-0-1-196.devices.kineticsmart.com:44443/api/v1/sale.json

Request body

Must include an amount as an integer. For example, £1.00 would be represented as 100.

Can include a unique identifier (uuid) for this transaction, but if none present a new UUID will be assigned and returned.

{"amount":100}

{"amount":100,"uuid":"0600ee0b-69df-4b77-cbb5-8a20962a75ab"}

Response

{"success":true,"uuid":"0600ee0b-69df-4b77-cbb5-8a20962a75ab"}

This indicates that the transaction is now in process on the device.

If the uuid already exists, a transaction is already in progress or another error has occurred, a message indicating the issue will be returned. For example:

{"success":false,"description":"Invalid request parameters"}

{"success":false,"description":"Transaction in progress","status":"Prompting for payment"}

When a transaction has been initiated, use GET transaction.json to follow the progress and retrieve the result of a transaction when it is completed.

Updated on 31st August 2017

Was this article helpful?

Related Articles

Leave a Comment