Terminal Agent works as a proxy to all SensePass cloud API describes in this docs.
In addition, Terminal agent allows you to use specific API's created for the Terminal Agent software.
Stroing and sending Device ID in the request body is not required for all API requests, Terminal Agent stores and will append this data to your requests automatically.
Instead of calling our cloud API (api.sensepass.com / api.sandbox.sensepass.com) - just change the base URL of your requests to http://localhost:8003/
Example: http://localhost:8003/api/transactions/init
The schema of this requets is identical to the cloud API.
Terminal Agent expose synchronous payment request call that reduce the integration time and logics.
Call POST request to: http://localhost:8003/api/transactions/init/sync Use the same schema as - Create a transaction
DeviceId field is not required - Terminal agent will append it automatically
Cancelling the payment request can be done using cancelling the HTTP request from #1
On final result (Approve, timeout or Cancel) - you will get response to this request
URL: http://localhost:8003/api/transactions/init/sync
Request Body:
Response body:
Terminal Agent expose an API to recover from network issue while using the Sync payment API,
in event of error or closed connection, you can use this API to fetch the current status of the last transaction created.
Call GET request to: http://localhost:8003/api/transactions/last Without any request payload
DeviceId field is not required - Terminal agent will append it automatically
Reponse will return immediately according to Transaction Status schema
URL: http://localhost:8003/api/transactions/last
Response body: