---
title: "Poll - Cancel"
source_url: https://docs.rapyd.net/en/poll---cancel.html
lang: en
---

# Poll - Cancel

Send a request using the poll method to cancel a sale that is being displayed on a PAX POS device.

The cancel request is a fire-and-forget operation used to interrupt an in-progress transaction on the terminal. Unlike other endpoint requests, the `Cancel` model does not extend the `BaseRequest`, meaning it does not accept a `timeToLive` or a `pollId`.

When a cancel request is received, the terminal attempts to cancel the current transaction. No separate poll response is generated for the cancel request itself. Instead, the outcome is reported as a `SALE_CANCELLED` event on the original transaction's polling sequence.

### Parameters

### Request Header Parameters

- - X-API-KEY
  - Unique access key provided by Rapyd for each partner.

### Request Body Parameters

- - deviceToken
  - The token of a PAX POS device.

  - correlationId
  - 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.

### 202 Accepted Response

- - message
  - Accepted

### 400 Error Response

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

- - title
  - Bad Request

- - status
  - 400

- - detail
  - DeviceId not registered.

### 401 Error Response

- - message
  - Unauthorized

### 500 Error Response

- - message
  - Server Error

- /poll/cancel

- 202 Cancel Accepted
- ```curl
  curl -X
  post https://CloudLinkApi/poll/cancel
  -H 'X-API-KEY: your-access-key-here'
  -d '{
       "deviceToken": "b16526c3447ba6cea4818d",
       "correlationId": "011182D3-A941-4207-9905-D7770347D492"
  }
  '  
  ```
- ```json
  {
    "message": "Accepted"	
  }
  ```

- 400 Bad Request
- ```curl
  curl -X
  post https://CloudLinkApi/poll/cancel
  -H 'X-API-KEY: your-access-key-here'
  -d '{
       "deviceToken": "b16526c3447ba6cea4818d",
       "correlationId": "011182D3-A941-4207-9905-D7770347D492"
  }
  ' 
  ```
- ```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://CloudLinkApi/poll/cancel
  -H 'X-API-KEY: your-access-key-here'
  -d '{
       "deviceToken": "b16526c3447ba6cea4818d",
       "correlationId": "011182D3-A941-4207-9905-D7770347D492"
  }
  ' 
  ```
- ```json
  {
    "message": "Unauthorized"
  }
  ```

- 500 Server Error
- ```curl
  curl -X
  post https://CloudLinkApi/poll/cancel
  -H 'X-API-KEY: your-access-key-here'
  -d '{
       "deviceToken": "b16526c3447ba6cea4818d",
       "correlationId": "011182D3-A941-4207-9905-D7770347D492"
  }
  ' 
  ```
- ```json
  {
    "message": "Server Error"
  }
  ```
