Pay API
Pay API (0.9)
Request
This endpoint is used to create a Refund Request.
Refunds can only be created for successful payments made via a Pay Request. If a Pay Request has not yet been captured, then void the Pay Request instead.
Refunds can be made for the total or partial amount of the Pay Request. Multiple refunds can be created for the same Pay Request as long as the total refunds amount does not exceed the original Pay Request total.
Refunds can only be sent back to the original payment method used.
The id of the Pay Request to be refunded
- Productionhttps://api.tyro.com/connect/pay/refunds
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.tyro.com/connect/pay/refunds \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"payRequestId": "0f448ac1-862a-4c7b-bdb4-a3b7cdbf6149",
"total": {
"amount": 10000,
"currency": "AUD"
}
}'Created
The id of the Pay Request to be refunded
The total amount to be refunded (in smallest currency unit). Defaults to the total of the Pay Request.
The timestamp when the Refund Request was created
{ "id": "2d448ac1-862a-4c7b-bdb4-a3b7cdbf6148", "payRequestId": "0f448ac1-862a-4c7b-bdb4-a3b7cdbf6149", "status": "PROCESSING", "total": { "amount": 10000, "currency": "AUD" }, "createdAt": "2022-11-23T22:39:54.765Z", "updatedAt": "2022-11-23T22:39:55.045Z" }
- Productionhttps://api.tyro.com/connect/pay/refunds
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://api.tyro.com/connect/pay/refunds \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json'{ "refunds": [ { … } ] }
- Productionhttps://api.tyro.com/connect/pay/refunds/{refundRequestId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.tyro.com/connect/pay/refunds/{refundRequestId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'The Refund Request response
The id of the Pay Request to be refunded
The total amount to be refunded (in smallest currency unit). Defaults to the total of the Pay Request.
The timestamp when the Refund Request was created
{ "id": "2d448ac1-862a-4c7b-bdb4-a3b7cdbf6143", "payRequestId": "0f448ac1-862a-4c7b-bdb4-a3b7cdbf6149", "total": { "amount": 12520, "currency": "AUD" }, "status": "SUCCESS", "createdAt": "2022-11-23T22:39:54.931Z", "updatedAt": "2022-11-23T22:40:48.237Z" }