Skip to content

Pay API (0.9)

Pay API

Overview
Languages
Servers
Production
https://api.tyro.com/connect

Pay Requests

Operations

Pay Methods

Operations

Pay Refunds

Operations

Create a Refund Request

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.

Security
JWT
Headers
Authorizationstringrequired
Default Bearer {$$.env.access_token}
Content-Typestringrequired
Value"application/json"
Bodyapplication/json
payRequestIdstringrequired

The id of the Pay Request to be refunded

Example: "0f448ac1-862a-4c7b-bdb4-a3b7cdbf6148"
totalobject(Money Positive Amount)

The total amount to be refunded (in smallest currency unit). Defaults to the total of the Pay Request.

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"
    }
  }'

Responses

Created

Bodyapplication/json
idstring

The id of the Refund Request

Example: "2d448ac1-862a-4c7b-bdb4-a3b7cdbf6143"
payRequestIdstring

The id of the Pay Request to be refunded

Example: "0f448ac1-862a-4c7b-bdb4-a3b7cdbf6149"
totalobject(Money Positive Amount)

The total amount to be refunded (in smallest currency unit). Defaults to the total of the Pay Request.

statusstring

The current status of the refund

Enum"SUCCESS""FAILED""PROCESSING"
createdAtstring

The timestamp when the Refund Request was created

Example: "2022-11-23T22:39:54.931Z"
updatedAtstring

The timestamp when the Refund Request was last updated

Example: "2022-11-23T22:40:48.237Z"
Response
application/json
{ "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" }

List all Refunds

Request

Returns a list of refunds.

Security
JWT
Headers
Authorizationstringrequired
Default Bearer {$$.env.access_token}
Content-Typestringrequired
Value"application/json"
curl -i -X GET \
  https://api.tyro.com/connect/pay/refunds \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json'

Responses

OK

Bodyapplication/json
refundsArray of objects(Refund Request Response)

List of refunds

Response
application/json
{ "refunds": [ {} ] }

Retrieve a Refund Request

Request

Retrieve a Refund Request.

Security
JWT
Path
refundRequestIdstringrequired
Headers
Authorizationstringrequired
Default Bearer {$$.env.access_token}
curl -i -X GET \
  'https://api.tyro.com/connect/pay/refunds/{refundRequestId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

The Refund Request response

Bodyapplication/json
idstring

The id of the Refund Request

Example: "2d448ac1-862a-4c7b-bdb4-a3b7cdbf6143"
payRequestIdstring

The id of the Pay Request to be refunded

Example: "0f448ac1-862a-4c7b-bdb4-a3b7cdbf6149"
totalobject(Money Positive Amount)

The total amount to be refunded (in smallest currency unit). Defaults to the total of the Pay Request.

statusstring

The current status of the refund

Enum"SUCCESS""FAILED""PROCESSING"
createdAtstring

The timestamp when the Refund Request was created

Example: "2022-11-23T22:39:54.931Z"
updatedAtstring

The timestamp when the Refund Request was last updated

Example: "2022-11-23T22:40:48.237Z"
Response
application/json
{ "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" }