---
title: "Refund"
source_url: https://docs.rapyd.net/en/refund-427483.html
lang: en
---

# Refund

Send a request to display a refund on a PAX POS device.

### Parameters

### Request Header Parameters

- - X-API-KEY (string, required)
  - Unique access key provided by Rapyd for each partner.

### Request Body Parameters

- - amount (number, required)
  - The amount represented with two minor units, e.g. 12 EUR is 1200.

- - disablePrinting (boolean)
  - Indicates if to print a receipt.

- - referenceId (string)
  - Optional reference from merchants

- - description (string)
  - Receipt description

- - language (string)
  - The language that the PAX POS will use to display information on the device. One of the following:

    - **en_GB**
    - **ar_EG**
    - **da_DK**
    - **de_DE**
    - **es_ES**
    - **fi_FI**
    - **fr_FR**
    - **hi_IN**
    - **is_IS**
    - **it_IT**
    - **nb_NO**
    - **nl_NL**
    - **pl_PL**
    - **pt_PT**
    - **ru_RU**
    - **sl_SI**
    - **sv_SE**
    - **zh_CN**

- - callbackUrl (string, required)
  - The URL that CloudLinkApi will use to return information to the caller.

- - deviceToken (string, required)
  - The token of a PAX POS device.

- - correlationId (string)
  - An ID provided by the caller. Returned in the callback for message matching. In a cancel request, use the value from the sale/refund that is being canceled.

- - terminalId (string)
  - If terminal has more than one merchant, this field is used to identify the merchant. To get a list of merchants, use the requestMerchantConfig request. Value can be null.

- - timeToLive (number)
  - The maximum time, in seconds, for a request to reach the physical terminal. The default value is 5 seconds.

### 202 Accepted Response

- - message (string)
  - Accepted

### 400 Error Response

- - type (string)
  - Example: https://tools.ietf.org/html/rfc7231#section-6.5.1

- - title (string)
  - Bad Request

- - status (integer)
  - 400

- - detail (string)
  - DeviceId not registered

### 401 Unauthorized Response

- - message (string)
  - Unauthorized

### 500 Error Response

- - 500 (string)
  - Server Error

- /refund

- 202 Accepted refund
- ```curl
  curl -X
  post https://cloudlink.valitor.com/CloudLinkApi/refund
  -H 'X-API-KEY: your-access-key-here'
  -d '
  {
    "amount": "100",
    "description": "Refund request",
    "disablePrinting": true,
    "referenceId": "merchant-ref-number-abc123",
    "language": "en_GB",
    "callbackUrl": "http://example.com/webhook-endpoint",
    "deviceToken": "b16526c3447ba6cea4818d",
    "correlationId": "5d1d4ea-8229-44d7-b517-26a5ae6c2fda",
    "timeToLive": 5,
    "terminalId": null
  }
  ' 
  ```
- ```json
  {
    "message": "Accepted"
  }
  ```

- 400 Bad Request
- ```curl
  curl -X
  post https://cloudlink.valitor.com/CloudLinkApi/refund
  -H 'X-API-KEY: your-access-key-here'
  -d '
  {
    "amount": "100",
    "description": "Refund request",
    "disablePrinting": true,
    "referenceId": "merchant-ref-number-abc123",
    "language": "en_GB",
    "callbackUrl": "http://example.com/webhook-endpoint",
    "deviceToken": "b16526c3447ba6cea4818d",
    "correlationId": "5d1d4ea-8229-44d7-b517-26a5ae6c2fda",
    "timeToLive": 5,
    "terminalId": null 
  }
  ' 
  ```
- ```json
   {
          "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
          "title": "Bad Request",
          "status": 400,
          "detail": "DeviceId not registered"
  }
  ```

- 401 Unauthorized
- ```curl
  curl -X
  post https://cloudlink.valitor.com/CloudLinkApi/refund
  -H 'X-API-KEY: your-access-key-here'
  -d '
  {
    "amount": "100",
    "description": "Refund request",
    "disablePrinting": true,
    "referenceId": "merchant-ref-number-abc123",
    "language": "en_GB",
    "callbackUrl": "http://example.com/webhook-endpoint",
    "deviceToken": "b16526c3447ba6cea4818d",
    "correlationId": "5d1d4ea-8229-44d7-b517-26a5ae6c2fda",
    "timeToLive": 5,
    "terminalId": null
  }
  '  
  ```
- ```json

  {
   "message": "Unauthorized" 
  }   
    
  ```

- 500 Server Error
- ```curl
  curl -X
  post https://cloudlink.valitor.com/CloudLinkApi/refund
  -H 'X-API-KEY: your-access-key-here'
  -d '
  {
    "amount": "100",
    "description": "Refund request",
    "disablePrinting": true,
    "referenceId": "merchant-ref-number-abc123",
    "language": "en_GB",
    "callbackUrl": "http://example.com/webhook-endpoint",
    "deviceToken": "b16526c3447ba6cea4818d",
    "correlationId": "5d1d4ea-8229-44d7-b517-26a5ae6c2fda",
    "timeToLive": 5,
    "terminalId": null
  }
  '  
  ```
- ```json

  {
   "message": "Server Error" 
  }   
    
  ```
