v1

latestOpenAPI 3.0.02026-08-0696238481.7 KB
In-Person Terminals

Initiate a refund on a terminal

Initiate a refund on a specific terminal. The cardholder can present their card to complete the refund.

post/in-person/terminals/{id}/refund

Path parameters

idstring required
Example:tml_01FCTS1XMKH9FF43CAFA4CXT3P

the unique ID of the terminal

Headers

Accountstring
Example:ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327

The linked accountId (use this when you want to initiate the refund to an in person terminal under a linked account)

Request body

amountinteger nullable

The amount to refund in minor digits. Can be omitted, in which case a full refund will be issued.

refundPlatformFeeboolean nullable

A flag to indicate whether the platform fee should be refunded. If the payment amount is fully refunded, the platform fee will be too. If this is a partial refund then the platform fee will be refunded proportionally to the amount being refunded. By default this flag is false.

Example request

{
  "paymentSession": {
    "id": "ps_01FCTS1XMKH9FF43CAFA4CXT3P"
  },
  "amount": 500,
  "settings": {
    "receiptPrintingSource": "Terminal"
  }
}

Response

The refund was initiated on the terminal. Note that the result is asynchronous and will be available via webhook events.

idstring

The unique Id of the terminal

namestring

Your name for the terminal. This can be used for display purposes.

metadataobject

Your own custom key-value data for this object. These will be sent with any associated events on your webhooks. You can have a maximum of 10 pieces of metadata.

Keys must be between 1 and 30 characters in length.

Values must be between 1 and 250 characters in length.

createdTimestampinteger

The epoch timestamp (seconds) when the object was created

lastUpdatedTimestampinteger

The epoch timestamp (seconds) when the object was last updated

Example response

{
  "id": "tml_01FCTS1XMKH9FF43CAFA4CXT3P",
  "name": "Front of house",
  "location": {
    "id": "iploc_01FCTS1XMKH9FF43CAFA4CXT3P"
  },
  "device": {
    "type": "PAX A920 Pro",
    "serialNumber": "25050808291100"
  },
  "action": {
    "type": "Transaction",
    "status": "InProgress",
    "id": "tmlact_01K7HNYENCZF6A784V5T625108_01K7KHC9ESPB1VZ9APGF3R5X7W",
    "error": {
      "code": "TransactionDeclined",
      "settings": {
        "receiptPrintingSource": "Terminal"
      }
    },
    "transaction": {
      "type": "Payment",
      "paymentSessionId": "ps_01FCTS1XMKH9FF43CAFA4CXT3P",
      "amounts": {
        "requested": 500
      },
      "currency": "GBP",
      "settings": {
        "receiptPrintingSource": "Terminal"
      }
    },
    "createdTimestamp": 1470989538,
    "completedTimestamp": 1470989538
  },
  "metadata": {
    "internalID": "1"
  },
  "createdTimestamp": 1470989538,
  "lastUpdatedTimestamp": 1470989538
}