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

# Poll - PrintOnCommand

Send a request using the poll method to print a message from a PAX POS device

The Print on Command request is used to send custom text to the terminal printer. Unlike other transaction endpoints, `PrintOnCommand` does not extend the `BaseRequest`, meaning it does not accept a `timeToLive`, `correlationId`, or `pollId`.

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

- - message
  - Text to print. For example, this could be a previous receipt received from the POS after a sale.

### 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/printoncommand

- 202 PrintOnCommand Accepted
- ```curl
  curl -X
  post https://CloudLinkApi/poll/printoncommand
  -H 'X-API-KEY: your-access-key-here'
  -d '
  {
    "deviceToken": "b16526c3447ba6cea4818d",
    "message": "[[CardholderReceipt, 5, C, B], [], [, 5, L, B], [Address1 6, 5, L, B], [1234AB Address2, 5, L, B], [], [2024-05-31, 12:08, 5, S, N], [ABCD, 9, L, I], [***************1234, 5, L, N], [], [Authorized - P00036, 5, C, B], [], [], [], [SALE, 5, C, N], [AMOUNT, 9, C, B], [€ 256,50, 9, C, B], [PIN VERIFIED, 5, L, N], [CONTACTLESS, 5, L, N], [Voucher: 452, 1, L, N], [***********1234, *****244, 1, S, N], [A0000000032010, 1, L, N], []]"
  }
  ' 
  ```
- ```json
  {
   "message": "Accepted"	
  }
  ```

- 400 Bad Request
- ```curl
  curl -X
  post https://CloudLinkApi/poll/printoncommand
  -H 'X-API-KEY: your-access-key-here'
  -d '
  {
    "deviceToken": "b16526c3447ba6cea4818d",
    "message": "[[CardholderReceipt, 5, C, B], [], [, 5, L, B], [Address1 6, 5, L, B], [1234AB Address2, 5, L, B], [], [2024-05-31, 12:08, 5, S, N], [ABCD, 9, L, I], [***************1234, 5, L, N], [], [Authorized - P00036, 5, C, B], [], [], [], [SALE, 5, C, N], [AMOUNT, 9, C, B], [€ 256,50, 9, C, B], [PIN VERIFIED, 5, L, N], [CONTACTLESS, 5, L, N], [Voucher: 452, 1, L, N], [***********1234, *****244, 1, S, N], [A0000000032010, 1, L, N], []]"
  }
  ' 
  ```
- ```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/printoncommand
  -H 'X-API-KEY: your-access-key-here'
  -d '
  {
    "deviceToken": "b16526c3447ba6cea4818d",
    "message": "[[CardholderReceipt, 5, C, B], [], [, 5, L, B], [Address1 6, 5, L, B], [1234AB Address2, 5, L, B], [], [2024-05-31, 12:08, 5, S, N], [ABCD, 9, L, I], [***************1234, 5, L, N], [], [Authorized - P00036, 5, C, B], [], [], [], [SALE, 5, C, N], [AMOUNT, 9, C, B], [€ 256,50, 9, C, B], [PIN VERIFIED, 5, L, N], [CONTACTLESS, 5, L, N], [Voucher: 452, 1, L, N], [***********1234, *****244, 1, S, N], [A0000000032010, 1, L, N], []]"
  }
  ' 
  ```
- ```json
  {
    "message": "Unauthorized"
  }
  ```

- 500 Server Error
- ```curl
  curl -X
  post https://CloudLinkApi/poll/printoncommand
  -H 'X-API-KEY: your-access-key-here'
  -d '
  {
    "deviceToken": "b16526c3447ba6cea4818d",
    "message": "[[CardholderReceipt, 5, C, B], [], [, 5, L, B], [Address1 6, 5, L, B], [1234AB Address2, 5, L, B], [], [2024-05-31, 12:08, 5, S, N], [ABCD, 9, L, I], [***************1234, 5, L, N], [], [Authorized - P00036, 5, C, B], [], [], [], [SALE, 5, C, N], [AMOUNT, 9, C, B], [€ 256,50, 9, C, B], [PIN VERIFIED, 5, L, N], [CONTACTLESS, 5, L, N], [Voucher: 452, 1, L, N], [***********1234, *****244, 1, S, N], [A0000000032010, 1, L, N], []]"
  }
  ' 
  ```
- ```json
  {
    "message": "Server Error"
  }
  ```
