# Initiate a refund on a terminal Initiate a refund on a specific terminal. The cardholder can present their card to complete the refund. Endpoint: POST /in-person/terminals/{id}/refund Version: 1.1.0 Security: secretApiKeyAuth ## Header parameters: - `Account` (string) The linked accountId (use this when you want to initiate the refund to an in person terminal under a linked account) Example: "ac_3fe8398f-8cdb-43a3-9be2-806c4f84c327" ## Path parameters: - `id` (string, required) the unique ID of the terminal Example: "tml_01FCTS1XMKH9FF43CAFA4CXT3P" ## Request fields (application/json): - `paymentSession` (object, required) - `paymentSession.id` (string) The ID of the corresponding payment session to be refunded Example: "ps_01FCTS1XMKH9FF43CAFA4CXT3P" - `amount` (integer,null) The amount to refund in minor digits. Can be omitted, in which case a full refund will be issued. Example: 500 - `refundPlatformFee` (boolean,null) 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. - `settings` (object,null) Allows for various customisation of terminal transactions. If not provided, 'receiptPrintingSource' will default to 'Terminal' - `settings.receiptPrintingSource` (string) Identifies the source responsible for receipt printing Enum: "Terminal", "PointOfSale" ## Response 200 fields (application/json): - `id` (string) The unique Id of the terminal Example: "tml_01FCTS1XMKH9FF43CAFA4CXT3P" - `name` (string) Your name for the terminal. This can be used for display purposes. Example: "Front of house" - `location` (object) The location where the terminal resides - `location.id` (string) The unique location ID Example: "iploc_01FCTS1XMKH9FF43CAFA4CXT3P" - `device` (object) - `device.type` (string) The type of the device Example: "PAX A920 Pro" - `device.serialNumber` (string) The serial number of the device Example: "25050808291100" - `action` (object,null) The most recent action initiated on the terminal. - `action.type` (string) The type of action in progress on the terminal. Enum: "Transaction" - `action.status` (string) The status of the action on the terminal Enum: "InProgress", "Cancelled", "Failed", "Succeeded" - `action.id` (string) The unique ID of the action Example: "tmlact_01K7HNYENCZF6A784V5T625108_01K7KHC9ESPB1VZ9APGF3R5X7W" - `action.error` (object,null) - `action.transaction` (object,null) - `action.createdTimestamp` (integer) The epoch timestamp (seconds) when the action was initiated on the terminal Example: 1470989538 - `action.completedTimestamp` (integer,null) The epoch timestamp (seconds) when the action was completed on the terminal. This field will be populated once the action reaches a status of Cancelled, Failed or Succeeded. Example: 1470989538 - `metadata` (object) 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. Example: {"internalID":"1"} - `createdTimestamp` (integer) The epoch timestamp (seconds) when the object was created Example: 1470989538 - `lastUpdatedTimestamp` (integer) The epoch timestamp (seconds) when the object was last updated Example: 1470989538 ## Response 400 fields (application/json): - `requestId` (string) Example: "b83f2653-06d7-44a9-a548-5825e8186004" - `code` (string) Example: "400" - `errors` (array) - `errors.message` (string) Example: "Required property 'amount' not found in JSON" ## Response 404 fields (application/json): - `requestId` (string) Example: "b83f2653-06d7-44a9-a548-5825e8186004" - `code` (string) Example: "400" - `errors` (array) - `errors.message` (string) Example: "Required property 'amount' not found in JSON" ## Response 500 fields (application/json): - `requestId` (string) Example: "b83f2653-06d7-44a9-a548-5825e8186004" - `code` (string) Example: "400" - `errors` (array) - `errors.message` (string) Example: "Required property 'amount' not found in JSON" ## Response 502 fields (application/json): - `requestId` (string) Example: "b83f2653-06d7-44a9-a548-5825e8186004" - `code` (string) Example: "400" - `errors` (array) - `errors.message` (string) Example: "Required property 'amount' not found in JSON"