The API allows a POS to accept Embedded Payments payments.
Embedded Payments API (1.0)
Overview
Languages
Servers
Production
https://api.tyro.com/connect
Request
When your App is first initialised, a request is sent to your server to establish a Tyro Embedded Payments connection. This is required to connect to the Embedded Payments reader. Upon receiving the client request, authenticate your user and send the request to Tyro with the readerId in the request body.
Security
JWT
- Productionhttps://api.tyro.com/connect/tap-to-pay/connections
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.tyro.com/connect/tap-to-pay/connections \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"readerId": "0f448ac1-862a-4c7b-bdb4-a3b7cdbf6149"
}'Created
The connectionSecret must be returned to your frontend to which is required for Embedded Payments transaction with the SDK. Do not cache or hardcode the connectionSecret. Tyro already manages the lifecycle of this secret.
Example: "$2a$10$OjXTE/Ul4UVVlW8RtKNtcuV3NdoP8sFc.5Lqov0N5wp6vU8Dmj8H3"
The time the connection was created. The format of the date time is the notation as defined by RFC 3339, section 5.6
Example: "2023-05-02T08:28:13+10:00"
The ID of the reader for this connection.
Example: "0f448ac1-862a-4c7b-bdb4-a3b7cdbf6149"
The name of the reader for this connection.
Example: "Reader 1 - Example Shop Sydney"
Response
application/json
{ "id": "2688fcf2-44dd-4c72-88ac-79d0910f2983", "connectionSecret": "$2a$10$OjXTE/Ul4UVVlW8RtKNtcuV3NdoP8sFc.5Lqov0N5wp6vU8Dmj8H3", "createdDate": "2023-05-02T08:28:13+10:00", "readerId": "0f448ac1-862a-4c7b-bdb4-a3b7cdbf6149", "readerName": "Reader 1 - Example Shop Sydney", "locationId": "tc-exampleshop-3000", "locationName": "Example Shop Melbourne" }