Pay Terminal API
Pay Terminal API (0.9)
Request
This endpoint is used for creating a Pay Request. Your server should create a Pay Request as soon as the total payment amount is known. Once the Pay Request is created, given the terminal is not busy, or offline, the process to pay will be initialised.
Contains information from the partner that created the Pay Request.
An identifier that has been generated by the origin. This can be used for reconciliation of orders in the app partner’s system.
A UUIDv4 provided by the partner to be used for preventing duplicate transactions, for us in reinitialisation of the terminal on an already attempted pending transaction.
The terminal amounts (in smallest currency unit)
This is the goods and services amount in smallest currency unit. e.g 12520 (in cents) is $125.20. It can be used in combination with cashoutAmount. It cannot be used in combination with refundAmount.
This is the requested cashout amount in smallest currency unit. e.g 5000 (in cents) is $50.00. It can be used in combination with goodsAndServicesAmount. It cannot be used in combination with refundAmount.
This is the refund amount in smallest currency unit. e.g 12520 (in cents) is $125.20. It cannot be used in combination with goodsAndServicesAmount or cashoutAmount.
- Productionhttps://api.tyro.com/connect/pay-terminal/requests
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.tyro.com/connect/pay-terminal/requests \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"mid": "123",
"tid": "456",
"origin": {
"orderId": "2e6174ae-ba4f-4a02-8072-9304d862e320",
"transactionId": "2e6174ae-ba4f-4a02-8072-9304d862e320"
},
"total": {
"goodsAndServicesAmount": 1000,
"cashoutAmount": 500,
"refundAmount": 0,
"currency": "AUD"
}
}'{ "id": "0f448ac1-862a-4c7b-bdb4-a3b7cdbf6149", "mid": "123", "tid": "456", "status": "AWAITING_INITIALISATION", "origin": { "orderId": "2e6174ae-ba4f-4a02-8072-9304d862e320", "transactionId": "2e6174ae-ba4f-4a02-8072-9304d862e320" }, "options": { "integratedReceipt": true, "receiptWidth": 60 }, "total": { "goodsAndServicesAmount": 1000, "cashoutAmount": 500, "refundAmount": 0, "currency": "AUD" } }
- Productionhttps://api.tyro.com/connect/pay-terminal/requests/{payRequestId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.tyro.com/connect/pay-terminal/requests/{payRequestId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "id": "a2be1eaf-b873-4aa9-9530-fc3007231572", "mid": "123", "tid": "456", "status": "SUCCESS", "total": { "currency": "AUD", "cashoutAmount": 1000, "goodsAndServicesAmount": 5000, "refundAmount": 0 }, "options": { "integratedReceipt": true, "receiptWidth": 60 }, "origin": { "name": "Example", "orderId": "Pay Terminal Example", "transactionId": "cffd6564-0023-44d8-996e-2932292277c2" }, "transactionProgress": { "id": "COMPLETE", "description": "The transaction is processed" }, "pendingDecision": { "decisionId": "0f448ac1-862a-4c7b-bdb4-a3b7cdbf6149", "question": "Would you like to print a receipt?", "options": [ … ] }, "receipts": { "customer": "<This will be a printable receipt for the customer>", "merchant": "<This will be a printable receipt for the merchant>", "signature": "<This will be a printable receipt for the merchant if signature is required>" }, "transactionOutcome": { "transactionResult": "Approved", "approvalCode": "00", "transactionReference": "xa29boybbo", "authorisationNumber": "674574564", "cardType": "visa", "elidedPan": "XXXXXXXXXXXX8635", "retrievalReferenceNumber": "63594680046125834000", "surchargeAmount": 300, "tipAmount": 500, "totalAmount": 6800 } }
Request
An async endpoint used for attempting to answer a pending decision prompt on a terminal. The decisionId & answer is returned by the payRequest in the pendingDecision object, and is required to differentiate prompt messages. There is no result to acknowledge that this decision was received by the terminal.
The corresponding decisionId as provided by the pendingDecision object of the payRequest
- Productionhttps://api.tyro.com/connect/pay-terminal/requests/{payRequestId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://api.tyro.com/connect/pay-terminal/requests/{payRequestId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"decisionId": "0f448ac1-862a-4c7b-bdb4-a3b7cdbf6149",
"answer": "YES"
}'- Productionhttps://api.tyro.com/connect/pay-terminal/requests/{payRequestId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://api.tyro.com/connect/pay-terminal/requests/{payRequestId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'