> ## Documentation Index
> Fetch the complete documentation index at: https://adyen-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel Collecting Input

> Learn how to cancel an in-progress input request.

While an input request is in progress, you can cancel it in the same way that you can cancel an in-progress payment. Here we describe how you can cancel an input request from:

* [Your POS app](#cancel-from-cash-register) by sending a Terminal API abort request.
* [The terminal](#cancel-from-terminal).

## Requirements

Before you begin, take into account the following requirement.

| Requirement | Description |
| - | - |
| **Integration type** | A [Terminal API integration](https://adyen-preview.mintlify.site/point-of-sale/get-started) with payment terminals. |

## Cancel from POS app

To cancel an [`InputRequest` ](https://adyen-preview.mintlify.site/point-of-sale/shopper-engagement/shopper-input)from your POS app:

1. Make a [Terminal API](https://adyen-preview.mintlify.site/point-of-sale/design-your-integration/terminal-api) abort request, specifying:

   * The standard [`SaleToPOIRequest.MessageHeader` ](https://adyen-preview.mintlify.site/point-of-sale/design-your-integration/terminal-api#request-message-header)object, with `MessageClass` set to **Service** and `MessageCategory` set to **Abort**.

     | Parameter | Required | Description |
     | - | - | - |
     | `ProtocolVersion` | ![-white\_check\_mark-](https://docs.adyen.com/user/data/smileys/emoji/white_check_mark.png) | **3.0** |
     | `MessageClass` | ![-white\_check\_mark-](https://docs.adyen.com/user/data/smileys/emoji/white_check_mark.png) | **Service** |
     | `MessageCategory` | ![-white\_check\_mark-](https://docs.adyen.com/user/data/smileys/emoji/white_check_mark.png) | **Abort** |
     | `MessageType` | ![-white\_check\_mark-](https://docs.adyen.com/user/data/smileys/emoji/white_check_mark.png) | **Request** |
     | `ServiceID` | ![-white\_check\_mark-](https://docs.adyen.com/user/data/smileys/emoji/white_check_mark.png) | Your unique ID for this request, consisting of 1-10 alphanumeric characters. Must be unique within the last 48 hours for the terminal (`POIID`) being used. |
     | `SaleID` | ![-white\_check\_mark-](https://docs.adyen.com/user/data/smileys/emoji/white_check_mark.png) | Your unique ID for the POS system component to send this request from. |
     | `POIID` | ![-white\_check\_mark-](https://docs.adyen.com/user/data/smileys/emoji/white_check_mark.png) | The unique ID of the terminal to send this request to. Format: *\[device model]-\[serial number]*. The [AbortRequest](https://docs.adyen.com/api-explorer/terminal-api/latest/post/abort) object with: |

     | Parameter | Description |
     | - | - |
     | `AbortReason` | **MerchantAbort** |
     | `MessageReference` | An object with: `MessageCategory`: **Input** `SaleID`: your unique ID of the POS app component that sent the input request. `ServiceID`: the `ServiceID` of the input request being cancelled. |

   The example shows how to cancel an in-progress input request with a `ServiceID` of **21796**.

   **Abort an in-progress input request**

   ```json theme={null}
   {
      "SaleToPOIRequest":{
         "MessageHeader":{
            "ProtocolVersion":"3.0",
            "MessageClass":"Service",
            "MessageCategory":"Abort",
            "MessageType":"Request",
            "SaleID":"POSSystemID12345",
            "ServiceID":"29239",
            "POIID":"V400m-324688179"
         },
         "AbortRequest":{
            "AbortReason":"MerchantAbort",
            "MessageReference":{
               "MessageCategory":"Input",
               "SaleID":"POSSystemID12345",
               "ServiceID":"21796"
            }
         }
      }
   }
   ```

   A successful `AbortRequest` returns a response with a `200 OK` HTTP status code and no body.

2. Check whether the cancellation was successful:

   * The screen generated by your `InputRequest` disappears from the terminal display.

   * The `InputRequest` returns a response containing:

     * `Result`: **Failure**
     * `ErrorCondition`: **Aborted**

   The following example shows the response for a confirmation input request that was cancelled.

   **InputResponse after canceling the InputRequest**

   ```json theme={null}
   {
       "SaleToPOIResponse": {
           "InputResponse": {
               "InputResult": {
                   "Device": "CustomerInput",
                   "InfoQualify": "Input",
                   "Response": {
                       "Result": "Failure",
                       "ErrorCondition": "Aborted"
                   },
                   "Input": {
                       "InputCommand": "GetConfirmation"
                   }
               },
               "OutputResult": {
                   "Device": "CustomerDisplay",
                   "InfoQualify": "Display",
                   "Response": {
                       "Result": "Success"
                   }
               }
           },
           "MessageHeader": {
               "ProtocolVersion": "3.0",
               "SaleID": "POSSystemID12345",
               "MessageClass": "Device",
               "MessageCategory": "Input",
               "ServiceID": "010",
               "POIID": "V400m-324688179",
               "MessageType": "Response"
           }
       }
   }
   ```

## Cancel from terminal

To cancel an in-progress input request from a terminal:

* Press the **Cancel** key **![](https://docs.adyen.com/images/2/8/a/f/d/28afd7de9550252a516d854a8d4a34ce726d7ba1-cancel2x.png)** on the terminal keypad.\
  In case of a terminal without a keypad, on the display select the *Cancel* icon ![](https://docs.adyen.com/user/pages/reuse/image-library/buttons/cancel-icon/nav-cancel.svg)

If this is successful:

* The screen generated by your `InputRequest` disappears from the terminal display.

* The `InputRequest` returns a response. Depending on the type of input, this `InputResponse` contains:

  | **Type of input** | `Result` | `ConfirmedFlag` |
  | - | - | - |
  | [Confirmation](https://adyen-preview.mintlify.site/point-of-sale/shopper-engagement/shopper-input/confirmation.md) | Success | false |
  | [Signature](https://adyen-preview.mintlify.site/point-of-sale/shopper-engagement/shopper-input/signature.md) | Success | false |

  | **Type of input** | `Result` | `ErrorCondition` |
  | - | - | - |
  | [Menu](https://adyen-preview.mintlify.site/point-of-sale/shopper-engagement/shopper-input/menu.md) | Failure | Cancel |
  | [Digit](https://adyen-preview.mintlify.site/point-of-sale/shopper-engagement/shopper-input/digit.md) | Failure | Cancel |
  | [Text](https://adyen-preview.mintlify.site/point-of-sale/shopper-engagement/shopper-input/text.md) | Failure | Cancel |

## See also

* [Make an input request](https://adyen-preview.mintlify.site/point-of-sale/shopper-engagement/shopper-input#select-an-input-request)
* [Create a session](https://adyen-preview.mintlify.site/point-of-sale/shopper-engagement/create-session.md)
* [Cancel an in-progress transaction](https://adyen-preview.mintlify.site/point-of-sale/basic-tapi-integration/cancel-a-transaction.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.