Terminal-2 icon

Terminal API

Learn about our Terminal API, including the endpoints and structure.

View source

Our Terminal API is based on the nexo Retailer Protocol.
See our official Terminal API reference.

The Adyen Terminal API lets you make payments, issue refunds, collect shopper information, and perform other shopper-terminal interactions using a payment terminal supplied by Adyen.

Before you make any point-of-sale payments, it is important to understand how Terminal API works and how requests and responses are structured.

Enable Terminal API

Before you can use Terminal API in your test environment, you need to enable it:

  1. Log in to your test Customer Area.
  2. Go to In-person payments > Terminal settings and select Integrations.
  3. Select the option to Enable Terminal API.
  4. Select Save.

When you switch to your live environment, follow the same steps in your live Customer Area.

API structure

Our Terminal API communicates with the terminal using JSON messages. All requests and responses have the following message header-body structure:

  • Message header: identifies the type of transaction, the terminal being used, and unique transaction identifiers.
  • Body: a request or response object, depending on the type of transaction. For example, when you make a payment request this is a PaymentRequest object, and when you receive a payment response this is a PaymentResponse object.

The message header and body of Terminal API requests and responses are described in more detail below.

Requests

Each Terminal API request you make is contained in a SaletoPOIRequest object. In this, you need to provide a:

  • MessageHeader object.
  • Request body object corresponding to the type of transaction. For example, this is a PaymentRequest object when you are making a payment, or an InputRequest object when you are requesting shopper input.

Request MessageHeader

In each request MessageHeader, specify the following:

Name Required Type Description
ProtocolVersion -white_check_mark- String

Version of the Nexo protocol that Terminal API is based on.

The current protocol version is 3.0

MessageClass -white_check_mark- Enum This is almost always Service, but it can also be Device or Event. We will specify which MessageClass is required throughout our documentation.
MessageCategory -white_check_mark- Enum The type of transaction. For example, Payment for a payment request. We will specify which MessageCategory is required throughout our documentation.
MessageType -white_check_mark- Enum This is always Request.
ServiceID -white_check_mark- String 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- String Your unique ID for the system where you send this request from.
POIID -white_check_mark- String

The unique ID of the terminal that you send this request to. Format: [device model]-[serial number]. For example, P400‑123456789.

To find the POIID, see Get the terminal ID.

The example below shows the header for making a payment.

Request body

The values you need to include in the request body depends on the type of transaction you are making. We provide examples and reference information for each transaction type throughout our point-of-sale documentation.

Sending Terminal API requests

Sending Terminal API requests and how you authenticate requests depends on how your integration connects to the Adyen payments platform:

  • Local communications.
    With a local Terminal API integration, your POS system communicates directly with the terminal over your local network. To make a payment, you make an API request directly to the IP address of the terminal, for the shopper to complete the transaction. You receive the result of the payment synchronously.
    Diagram showing local communications flow: POS app sends request directly to terminal over local network

  • Cloud communications.
    With a Terminal API integration using cloud communications, your POS system communicates with the terminal over the internet. To make a payment, you send your Terminal API requests to an endpoint on the Adyen payments platform. This request is forwarded to the terminal, for the shopper to complete the transaction. You can choose whether you want to receive the result of the payments synchronously or asynchronously.
    Diagram showing cloud communications flow: POS app sends request to Adyen cloud, which forwards to terminal

Responses

Each terminal API response you receive is contained in a SaleToPOIResponse object, and includes a:

In a cloud integration that receives results asynchronously, you only receive an ok response from the Terminal API. The MessageHeader and response body are sent in an event notification instead.

Response MessageHeader

The MessageHeader you receive in the response echoes the values you provided in the request. The only exception is the MessageType, which is Response.

The following example shows the header you would receive in response to the example payment request provided above.

Response body

The values you receive in the response body depends on the type of transaction request you made. We provide examples and reference information for each transaction type throughout our point-of-sale documentation.

The response body will often include a unique transaction identifier, and data you can use to generate your receipts.

Transaction identifier

Every API request that creates a transaction or interacts with your money flow (such as a payment or refund) returns a unique transaction identifier in the POITransactionID.TransactionID:

Transaction identifier

This identifier contains two values, separated by a dot:

  • Tender reference: a unique value generated by the terminal for the transaction.
  • PSP reference: a unique alphanumeric value generated by the Adyen payments platform for the transaction.

    If you use Adyen for online payments or an omnichannel strategy, the PSP reference is the equivalent of the pspReference that you receive for transactions made online.

You should store each transaction identifier you receive, as you will need it to:

  • Make a refund.
  • Make a payment with acquired card details.
  • Identify the transaction in your Customer Area, or in reports generated by Adyen.

Transaction identifiers for offline payments

If your integration uses local communications, your terminals will be able to make Offline EMV and store-and-forward transactions. When you experience a network issue, an approved payment will only generate a transaction identifier with the tender reference:

Transaction identifier for offline payments

When the terminal is able to connect to the internet again, the Adyen payments platform will process the payment and generate an alphanumeric PSP reference. The PSP reference and tender reference can be found in your Customer Area, and in reports generated by Adyen.

Receipt data

When you make a transaction such as a payment, the payment result contains a PaymentReceipt object. You can add the key-value pairs from this object to the receipt that you print, display, or email to your shopper.

For more information, see our receipts documentation.

Next steps