The Loyalty Data API provides App partners with the ability to access data regarding members sales to help aggregate loyalty points. Currently the API allows apps to register their members and are notified on every transaction performed.
Loyalty Data API (1.0)
Request
This endpoint registers a member for a participating location with the loyalty API. This notifies you of all future payments performed by the members at locations you have access to. The payment should have taken place within a 60 minute window of the registration.
Payment Identifier generated from the payment source. It refers to the transaction.receipt (from Tyro eCommerce APIs) or otherwise referred to as the RRN.
- Productionhttps://api.tyro.com/connect/loyalty/members
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.tyro.com/connect/loyalty/members \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"origin": {
"memberId": "member-1"
},
"paymentId": "6940871887d8",
"paymentSource": "EFTPOS",
"locationId": "cafe-on-main-steet"
}'The request has been accepted. The member will be registered when a matching payment is found.
No contentRequest
This endpoint deregisters a member from all participating locations with the loyalty API. You will no longer receive notifications about the payments performed by the members at locations you have access to.
- Productionhttps://api.tyro.com/connect/loyalty/members
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://api.tyro.com/connect/loyalty/members \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"origin": {
"memberId": "string"
}
}'- Productionhttps://api.tyro.com/connect/loyalty/activities/{loyaltyActivityId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.tyro.com/connect/loyalty/activities/{loyaltyActivityId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'OK
The Id of the loyalty activitiy in the Tyro Connect system.
The identifier of the member who is associated with this activity. This value corresponds to the origin.memberId provided during member registration.
EFTPOS integration type. It will always be NOT_APPLICABLE for ONLINE payments.
- Without sale object
- With sale object
{ "id": "99fdaa02-4cb4-4948-a79e-4b69e4008feb", "locationId": "e429f245-4dcb-4961-9d27-c40538e990b2", "memberId": "foo@bar.com", "payment": { "origin": { … }, "type": "PURCHASE", "zonedDateTime": "2021-10-11T11:00:01+11:00", "breakdown": { … }, "total": { … } }, "sale": null }
Request
This endpoint is for creating fake payments that can be used to test your integration with our system. After registering a member, payments can be generated for that member by providing the memberId that you specified during registration.
The identifier of the member who should be associated with this payment. This value corresponds to the origin.memberId provided during member registration.
The type of payment being made
- Productionhttps://api.tyro.com/connect/payments/test
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.tyro.com/connect/payments/test \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "tc-testlocation-2000",
"memberId": "some-member-id",
"paymentType": "PURCHASE",
"paymentSource": "EFTPOS",
"goodsAndServicesAmount": 100
}'