{"title":"Third-party interactions","category":"default","creationDate":1654008060,"content":"<p>Apart from accepting payments, you can use your payment terminals to interact with your customers in other ways. For example, to get feedback on your service, engage customers in your loyalty program, or ask their details for sending a digital receipt. Typically, the data is collected through input requests, and forwarded to a back-end system that produces the intended result.<\/p>\n<p>You can set this up yourself. But you can also engage the services of companies specialized in surveys, customer loyalty, digital receipts, and so on. That is because we support <strong>third-party interactions<\/strong>, where another company can interact with your terminals directly without having to integrate with your POS system.<\/p>\n<p>Depending on what you want to achieve, third parties can:<\/p>\n<ul>\n<li>Send non-payment requests to your terminals, like <a href=\"\/pt\/point-of-sale\/shopper-engagement\/shopper-input\">input requests<\/a> for gathering answers from your customers, and <a href=\"\/pt\/point-of-sale\/shopper-engagement\/display-data\">display requests<\/a> to show information like a 'Thank you' message.<\/li>\n<li>Receive Terminal API display notifications.<br \/>\nThese notifications are generated by the terminal, are sent as webhooks, and contain updates on the progress of a payment on the terminal.<\/li>\n<li>Receive standard webhooks.<br \/>\nThese webhooks are generated on the plataforma de pagamentos da Adyen and contain transaction details.<\/li>\n<\/ul>\n<p>Third-party interaction with the terminal doesn't interrupt the payment process.<\/p>\n<div class=\"notices yellow\">\n<p>Third-party interactions currently do not work with the OPI integration.<\/p>\n<\/div>\n<h2>Security and requirements<\/h2>\n<p>Third parties cannot send payment or card acquisition requests to your terminals. If they try to send such a request, the request is refused with an HTTP status code of <code>010 Not Allowed<\/code>.<\/p>\n<p>Third-party interaction is possible:<\/p>\n<ul>\n<li>In a Terminal API integration with WebSockets enabled.<br \/>\nYou can check the WebSockets setting in your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>, under <strong>In-person payments<\/strong> &gt; <strong>Terminal settings<\/strong> &gt; <strong>Integrations<\/strong>.<\/li>\n<li>With specific terminal models: M400, P400 Plus, V210, V400m.<\/li>\n<\/ul>\n<h2>How it works<\/h2>\n<p>To enable third-party interactions you need to complete the setup as follows:<\/p>\n<ol>\n<li>\n<p>You <a href=\"#set-up-display-notifications\">set up display notifications<\/a> for the third party. For every step of the <a href=\"\/pt\/get-started-with-adyen\/adyen-glossary\/#tender\">tender<\/a> process, the third party receives a display notification that contains:<\/p>\n<ul>\n<li>The <code>POIID<\/code> of the terminal. This tells the third party where to send a request.<\/li>\n<li>The <code>TransactionID<\/code>: the tender reference. When the payment is completed, the terminal sends a <span translate=\"no\"><strong>TENDER_FINAL<\/strong><\/span> display notification. In this notification, the PSP reference is added in the format `[tender reference].[PSP reference] is appended with the PSP reference:  for cross-reference with a standard webhooks.<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>You <a href=\"#set-up-standard-webhooks\">set up standard webhooks<\/a> for the third party. For every payment, the third party will receive a webhook that includes the outcome of the payment, the amount, the PSP reference, and more. Based on the PSP reference, the third party can link the customer's transaction to their rating, for richer reporting.<\/p>\n<\/li>\n<li>\n<p>You <a href=\"#set-up-the-third-party-api-credential\">set up an API credential<\/a> for the third party. This enables the third party to authenticate the input and display requests that they send.<\/p>\n<\/li>\n<\/ol>\n<h2>Third-party interaction flow<\/h2>\n<p>The message flow with third-party interaction is as follows:<\/p>\n<ol>\n<li>\n<p>The POS app sends a payment request to the payment terminal.<\/p>\n<\/li>\n<li>\n<p>The terminal sends display notifications to the third party for every step of the tender process, from <a href=\"\/pt\/point-of-sale\/design-your-integration\/notifications\/display-notifications#tender-created\">TENDER_CREATED<\/a> when the payment starts, to <a href=\"\/pt\/point-of-sale\/design-your-integration\/notifications\/display-notifications#tender-final\">TENDER_FINAL<\/a> when the payment is completed.<\/p>\n<\/li>\n<li>\n<p>When the payment process is finished, the third party sends an input request to the terminal.<\/p>\n<\/li>\n<li>\n<p>The customer provides their input on the terminal, and the third party receives the response.<\/p>\n<\/li>\n<li>\n<p>To thank the customer, the third party sends a display request with an image. The image disappears after the time-out set in the request, or after a default time-out of three seconds. (This step is not shown in the diagram below.)<\/p>\n<\/li>\n<li>\n<p>The third party receives a standard webhook for the payment from the plataforma de pagamentos da Adyen.<\/p>\n<\/li>\n<\/ol>\n<p>The following diagram illustrates the message flow for third-party interaction. In the diagram, the POS uses cloud communications, but with local communications the third-party interaction with the terminal is the same.<\/p>\n<div class=\"hint--right\" data-hint=\"Message flows for third-party interaction after payment\">\n<p><img alt=\"\" src=\"\/user\/pages\/docs\/03.point-of-sale\/41.shopper-engagement\/06.third-party-interactions\/third-party-interaction-after-payment.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/p>\n<\/div>\n<h2>Set up third-party webhook endpoints<\/h2>\n<p>To receive webhooks from Adyen terminals and the plataforma de pagamentos da Adyen, the third party needs to configure their system. Then you need to set up third-party webhooks in your Customer Area.<\/p>\n<h3>Configuration by the third-party<\/h3>\n<ol>\n<li>\n<p>Inform the third party of the requirements for receiving webhooks:<\/p>\n<ul>\n<li>\n<p>Their system needs to have:<\/p>\n<ul>\n<li>One or more endpoints that can receive webhooks in JSON format. They may get two kinds of webhooks: display notifications from the terminals, and standard webhooks from the plataforma de pagamentos da Adyen.<\/li>\n<li>For the test environment: an open TCP port for HTTP traffic (80, 8080, or 8888) or HTTPS traffic (443, 8443, or 8843) with TLSv1.2.<\/li>\n<li>For the live environment: an open TCP port for HTTPS traffic (443, 8443, or 8843) with TLSv1.2.<\/li>\n<li>Optional: a username and password for basic authentication.<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>If they want to receive standard webhooks, they should <a href=\"\/pt\/development-resources\/webhooks\/secure-webhooks\/verify-hmac-signatures\">verify the HMAC signature<\/a> of the standard webhook and they must <a href=\"\/pt\/development-resources\/webhooks\/configure-and-manage#accept-webhooks\">acknowledge<\/a> every standard webhook with a <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Status#successful_responses\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">successful HTTP response status code<\/a>, for example <strong>200<\/strong>. For instructions, refer the third party to our <a href=\"\/pt\/development-resources\/webhooks\">development resources<\/a> for webhooks.<\/p>\n<!-- list separator -->\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Ask the third party for the endpoints and basic authentication credentials they set up for receiving webhooks.<br \/>\nYou need to provide those details in your Customer Area in the next steps.<\/p>\n<\/li>\n<\/ol>\n<h3>Set up display notifications<\/h3>\n<p>To set up display notifications for the third party:<\/p>\n<ol>\n<li>\n<p>Make sure that you know the endpoint where the third party wants to receive display notifications, and the basic authentication credentials.<\/p>\n<\/li>\n<li>\n<p>Log in to your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a> and switch to the account, store, or terminal that you want to set up notifications for.<\/p>\n<\/li>\n<li>\n<p>Go to <strong>In-person payments<\/strong> &gt; <strong>Terminal settings<\/strong> &gt; <strong>Integrations<\/strong>.<\/p>\n<\/li>\n<li>\n<p>In the <strong>Terminal API<\/strong> section, select <strong>Decrypted<\/strong>.<\/p>\n<\/li>\n<li>\n<p>Under <strong>Display URLs<\/strong>, select the pencil icon <i class=\"adl-icon-edit\"><\/i> and then select <strong>Add new<\/strong>.<\/p>\n<\/li>\n<li>\n<p>Select the pencil icon <i class=\"adl-icon-edit\"><\/i> next to the field that appears.<br \/>\nThe <strong>Add URL<\/strong> dialog opens.<\/p>\n<\/li>\n<li>\n<p>Enter the details:<\/p>\n<ul>\n<li><strong>URL<\/strong>: the URL of the endpoint where the third party wants to receive display notifications.<\/li>\n<li><strong>Username<\/strong> and <strong>Password<\/strong> (optional): the basic authentication credentials that the third party set up on their server.<\/li>\n<li><strong>Public<\/strong>: select this option. Indicates that the specified URL is on a public network.<\/li>\n<li>\n<p><strong>Local<\/strong>: do not select this option; not applicable for third-party interactions.<\/p>\n<!-- list separator -->\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Select <strong>Add URL<\/strong> and then <strong>Save<\/strong>.<\/p>\n<\/li>\n<li>\n<p>If your integration uses local communications, ask our <a href=\"https:\/\/ca-test.adyen.com\/ca\/ca\/contactUs\/support.shtml?form=other\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Support Team<\/a> to ensure display notifications are not encrypted.<br \/>\nThis step is necessary because with local communications the terminal generates encrypted notifications and the third party cannot decrypt those.<\/p>\n<\/li>\n<\/ol>\n<h3>Set up standard webhooks<\/h3>\n<p>Currently there are no restrictions enforced on the details that third parties can receive in standard webhooks. We advise you to limit the details to the minimum required for your use case, by enabling as few additional settings as possible.<\/p>\n<p>To set up third-party standard webhooks:<\/p>\n<p>In your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>, enable and configure webhooks for your <a href=\"\/pt\/account\/account-structure\/#company-account\">company account<\/a>, <a href=\"\/pt\/account\/account-structure\/#merchant-accounts\">merchant account<\/a>, and <a href=\"\/pt\/account\/account-structure\/#account-groups\">merchant account groups<\/a>. However, we <a href=\"\/pt\/development-resources\/webhooks\/configure-and-manage\">recommend to configure webhooks for your company account<\/a>. To set up a webhook for a specific merchant account, create a webhook for your company account, and <a href=\"\/pt\/development-resources\/webhooks\/configure-and-manage\">configure merchant accounts<\/a> for that webhook.<\/p>\n<ul>\n<li>You can configure <a href=\"\/pt\/development-resources\/webhooks\/webhook-types#payments-webhooks\">Payments webhooks<\/a> on the company, merchant account, and merchant account groups.<\/li>\n<li>You can configure <a href=\"\/pt\/development-resources\/webhooks\/webhook-types#platforms-webhooks\">Platforms webhooks<\/a> on the company account level only.<\/li>\n<\/ul>\n<p><strong>To configure a webhook:<\/strong><\/p>\n 1. Make sure that you know the endpoint where the third party wants to receive standard webhooks, and the basic authentication username and password of their webhook server. 2. If the payment terminals that the third party will interact with are boarded to one specific merchant account, switch to that merchant account. <ol>\n<li>\n<p>In your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>, go to <strong>Developers<\/strong>\u00a0&gt;\u00a0<strong>Webhooks<\/strong>.<br \/>\nIf you have a Balance Platform integration, select <strong>Payments<\/strong> or <strong>Platforms<\/strong> to view the webhooks available to you based on your integration.<\/p>\n<\/li>\n<li>\n<p>Select <i class=\"adl-icon-add\" role=\"img\" aria-label=\"add icon\"><\/i> <strong>Create new webhook<\/strong>.<br \/>\nIf you are adding a webhook for your platform and have multiple platforms set up to run on Adyen, select the balance platform where you want to configure your new webhook.<\/p>\n<\/li>\n<li>\n<p>From the list of webhooks, select <strong>Add<\/strong> for the one to add.<\/p>\n<\/li>\n<li>\n<p>Under <strong>General<\/strong>, configure the following:<\/p>\n<table>\n<thead>\n<tr>\n<th>Setting<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Enabled<\/strong><\/td>\n<td>Select the toggle to enable or disable the webhook.<\/td>\n<\/tr>\n<tr>\n<td><strong>Version<\/strong><\/td>\n<td>The webhook version.<\/td>\n<\/tr>\n<tr>\n<td><strong>Description<\/strong><\/td>\n<td>Your description of the webhook.<\/td>\n<\/tr>\n<tr>\n<td><strong>Merchant accounts<\/strong><\/td>\n<td>You can apply the webhook to all merchant accounts for a company account, include only specific merchant accounts, or exclude specific merchant accounts for your company account.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>Under <strong>Server configuration<\/strong>, configure the following:<\/p>\n<table>\n<thead>\n<tr>\n<th>Setting<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>URL<\/strong><\/td>\n<td>The URL of the third-party webhook server. It must be a public URL.<\/td>\n<\/tr>\n<tr>\n<td><strong>Method<\/strong><\/td>\n<td>JSON, HTTP POST, or SOAP<\/td>\n<\/tr>\n<tr>\n<td><strong>Encryption protocol<\/strong><\/td>\n<td>TLSv1.2 or TLSv1.3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>Under <strong>Security<\/strong>, configure the following:<\/p>\n<table>\n<thead>\n<tr>\n<th>Setting<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>OAuth 2.0<\/strong><\/td>\n<td><strong>Note:<\/strong> OAuth 2.0 support is available for the <strong>Standard webhook<\/strong> type only.<br\/><br\/>If you want to use OAuth 2.0 for access to your webhook endpoint, enter the following for your Identity Provider's OAuth 2.0 server: <ul><li markdown=\"1\"><strong>Client ID<\/strong><\/li><li markdown=\"1\"><strong>Client secret<\/strong><\/li><li markdown=\"1\"><strong>URL<\/strong>: The location of your Identity Provider's OAuth 2.0 authorization server, where Adyen should request new access tokens. The time-to-live (TTL) setting of your access tokens must be 3599 seconds, at a minimum.<\/li><li markdown=\"1\"><strong>Scope<\/strong>: The <strong>Scope<\/strong> is optional. The permission level Adyen's webhook service needs to access to your webhook endpoint.<\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td><strong>Basic authentication<\/strong><\/td>\n<td>Enter the following for the third-party webhook server:<ul><li markdown=\"1\"><strong>username<\/strong><\/li><li markdown=\"1\"><strong>password<\/strong><\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td><strong>HMAC Key<\/strong><\/td>\n<td>Generate a new HMAC Key or use an existing HMAC key.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>Under <strong>Events<\/strong> settings, select the <a href=\"\/pt\/development-resources\/webhooks\/webhook-types\/#event-codes\">event types<\/a> for this webhook. Some webhook types do not support more than one event type, so this setting does not appear.<\/p>\n<\/li>\n<li>\n<p>If the <strong>Additional settings<\/strong> section is available, optionally select the additional information you want to receive in this webhook. Some webhook types do not support more than one event type, so this section does not appear.<\/p>\n<\/li>\n<li>\n<p>Select <strong>Save configuration<\/strong>.<\/p>\n<\/li>\n<\/ol>\n<h3 id=\"ready-3rd-party\"><span translate=\"no\"><strong>READY_3RD_PARTY<\/strong><\/span> display notification<\/h3>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"''\" :id=\"'display-notifications_3rd-party'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"JSON\",\"content\":\"{\\n  \\\"SaleToPOIRequest\\\":{\\n    \\\"DisplayRequest\\\":{\\n      \\\"DisplayOutput\\\":[\\n        {\\n          \\\"Device\\\": \\\"CashierDisplay\\\",\\n          \\\"InfoQualify\\\": \\\"Status\\\",\\n          \\\"OutputContent\\\": {\\n            \\\"OutputFormat\\\": \\\"MessageRef\\\",\\n            \\\"PredefinedContent\\\": {\\n              \\\"ReferenceID\\\": \\\"event=READY_3RD_PARTY\\\"\\n            }\\n          },\\n          \\\"ResponseRequiredFlag\\\": false\\n        }\\n      ]\\n    },\\n    \\\"MessageHeader\\\":{\\n      \\\"SaleID\\\":\\\"POSSystemID12345\\\",\\n      \\\"ProtocolVersion\\\":\\\"3.0\\\",\\n      \\\"MessageType\\\":\\\"Request\\\",\\n      \\\"POIID\\\":\\\"V400m-324688179\\\",\\n      \\\"ServiceID\\\":\\\"0207111617\\\",\\n      \\\"MessageClass\\\":\\\"Device\\\",\\n      \\\"MessageCategory\\\":\\\"Display\\\",\\n      \\\"DeviceID\\\":\\\"1517998562\\\"\\n    }\\n  }\\n}\"},{\"language\":\"java\",\"tabTitle\":\"Java\",\"content\":\"String saleID = \\\"YOUR_CASH_REGISTER_ID\\\";\\nString POIID = \\\"YOUR_TERMINAL_ID\\\";\\nString serviceID = \\\"YOUR_UNIQUE_ATTEMPT_ID\\\";\\n\\nSaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();\\nDisplayRequest displayRequest = new DisplayRequest();\\nDisplayOutput displayOutput = new DisplayOutput();\\nOutputContent outputContent = new OutputContent();\\noutputContent.setOutputFormat( OutputFormatType.MESSAGE_REF );\\nPredefinedContent predefinedContent = new PredefinedContent();\\npredefinedContent.setReferenceID(\\\"event=READY_3RD_PARTY\\\");\\noutputContent.setPredefinedContent(predefinedContent);\\ndisplayOutput.setOutputContent(outputContent);\\ndisplayOutput.setInfoQualify( InfoQualifyType.STATUS );\\ndisplayOutput.setDevice( DeviceType.CASHIER_DISPLAY );\\ndisplayOutput.setResponseRequiredFlag( Boolean.FALSE );\\ndisplayRequest.setDisplayOutput(displayOutput);\\nsaleToPOIRequest.setDisplayRequest(displayRequest);\\n\\nMessageHeader messageHeader = new MessageHeader();\\nmessageHeader.setSaleID(saleID);\\nmessageHeader.setProtocolVersion(\\\"3.0\\\");\\nmessageHeader.setMessageType( MessageType.REQUEST );\\nmessageHeader.setPOIID(POIID);\\nmessageHeader.setServiceID(serviceID);\\nmessageHeader.setMessageClass( MessageClassType.DEVICE );\\nmessageHeader.setMessageCategory( MessageCategoryType.DISPLAY );\\nmessageHeader.setDeviceID(\\\"1517998562\\\");\\nsaleToPOIRequest.setMessageHeader(messageHeader);\\nterminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2>Set up the third-party API credential<\/h2>\n<p>If the third party wants to send Terminal API requests to your terminals, they must <a href=\"\/pt\/development-resources\/api-authentication#api-key-authentication\">authenticate their requests with an API key<\/a>. This means you need to create a special third-party API credential for your account and share it with the third party.<\/p>\n<p>The third-party API credential has limited access and cannot be used to make payments. Like all API credentials, it consists of:<\/p>\n<ul>\n<li>An API key.<\/li>\n<li>API permissions: roles required for the type of request, and accounts that the API key is valid for.<\/li>\n<\/ul>\n<p>To be able to create the third-party API credential, you must have one of the following <a href=\"\/pt\/account\/user-roles\">user roles<\/a>:<\/p>\n<ul>\n<li><strong>Merchant admin<\/strong><\/li>\n<li><strong>Manage API credentials<\/strong><\/li>\n<\/ul>\n<p>To create the third-party API credential:<\/p>\n<ol>\n<li>Log in to your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>, and go to <strong>Developers<\/strong>\u00a0&gt;\u00a0<strong>API credentials<\/strong>.<br \/>\nThis opens a list with all API credentials linked to your company account.<\/li>\n<li>Select <strong>Add standardized user<\/strong>.<\/li>\n<li>Select <span translate=\"no\"><strong>thirdParty_xxxxxx@Company.<\/strong><\/span><strong>[YourCompanyAccount]<\/strong>.<br \/>\nIn this third-party API credential username, <code>xxxxxx<\/code> will be replaced with numbers.<\/li>\n<li>Select <strong>Add<\/strong>.<\/li>\n<li>In the list of API credentials, select the new third-party API credential username.<\/li>\n<li>To generate an API key, under <strong>Server settings<\/strong> &gt; <strong>Authentication<\/strong> select the <strong>API key<\/strong> tab. Select <strong>Generate API key<\/strong>, copy the API key using the copy icon <i class=\"adl-icon-copy\"><\/i> and store the third-party API key securely in your system.<\/li>\n<li>Select <strong>Save changes<\/strong>.<\/li>\n<li>Under <strong>Permissions<\/strong> &gt; <strong>Roles<\/strong> select the role <strong>Thirdparty interaction with in-store terminals<\/strong>, and make sure no other roles are selected.<\/li>\n<li>Under <strong>Permissions<\/strong> &gt; <strong>Accounts<\/strong> select the accounts that the third-party credential needs to have access to.<br \/>\nMake sure that these are the accounts that you set up webhooks for.<\/li>\n<li>Select <strong>Save changes<\/strong>.<\/li>\n<li>Securely send the API key to the third party.<\/li>\n<\/ol>\n<h2>Let the third party send requests<\/h2>\n<p>If the third party wants to send Terminal API requests to your terminals, inform them that they need to:<\/p>\n<ol>\n<li>\n<p>Listen to the Terminal API <a href=\"\/pt\/point-of-sale\/design-your-integration\/notifications\/display-notifications#display-notification-types\">display notifications<\/a> sent to their webhooks server. These include:<\/p>\n<ul>\n<li>A <code>MessageHeader<\/code> with a <code>POIID<\/code> field that identifies the terminal.<\/li>\n<li>\n<p>A <code>ReferenceID<\/code> field with an <code>event<\/code> that indicates when the terminal is ready to receive a request.<\/p>\n<!-- list separator -->\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>In the <a href=\"\/pt\/point-of-sale\/design-your-integration\/terminal-api#request-message-header\">\n  <code>MessageHeader<\/code>\n<\/a> of their input or display request, include a <code>POIID<\/code> field with the same value received in the display notification.<\/p>\n<\/li>\n<li>\n<p>Format the rest of the request as described in our documentation.<\/p>\n<ul>\n<li>\n<p>For an example input request, see <a href=\"\/pt\/point-of-sale\/shopper-engagement\/shopper-input\/rating\/rating-single-press\">Ask for a rating<\/a>. That shows a screen that on various display sizes could look as follows:<\/p>\n<p><img alt=\"\" src=\"\/user\/pages\/docs\/03.point-of-sale\/41.shopper-engagement\/06.third-party-interactions\/screen-EN_rating-1-click-draft.png\" \/><\/p>\n<\/li>\n<li>\n<p>For both input and display request, the third party should set a time-out using <code>MinimumDisplayTime<\/code>. Otherwise the request will time out after three seconds.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Authenticate their request by specifying their third-party API key in the <code>x-API-key<\/code> header of the HTTP request.<\/p>\n<\/li>\n<\/ol>\n<h2>Canceling an in-progress interaction<\/h2>\n<p>To block an incoming third-party interaction request, you can cancel the request:<\/p>\n<ul>\n<li><a href=\"#cancel-interaction-from-pos\">From your POS app<\/a> by sending a <code>DisplayRequest<\/code> that forces the terminal to show the standby screen.<\/li>\n<li><a href=\"#cancel-interaction-from-terminal\">On the terminal<\/a>.<\/li>\n<\/ul>\n<h3 id=\"cancel-interaction-from-pos\">Cancel from your POS app<\/h3>\n<p>In general, requests are cancelled by sending an <code>AbortRequest<\/code> containing the <code>ServiceID<\/code> of the request you want to cancel. However, because the third party is sending the request, your POS app doesn't know the <code>ServiceID<\/code>. The solution is to send a <code>DisplayRequest<\/code> that instructs the terminal to show the standby screen.<\/p>\n<p>To cancel an in-progress third-party request from the POS app:<\/p>\n<ol>\n<li>\n<p>Make a <a href=\"\/pt\/point-of-sale\/design-your-integration\/terminal-api\">Terminal API<\/a> display request, specifying:<\/p>\n<ul>\n<li>\n<p>The standard <a href=\"\/pt\/point-of-sale\/design-your-integration\/terminal-api#request-message-header\">\n  <code>SaleToPOIRequest.MessageHeader<\/code>\n<\/a> object, with <code>MessageClass<\/code> set to <strong>Device<\/strong> and <code>MessageCategory<\/code> set to <span translate=\"no\"><strong>Display<\/strong><\/span>.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>ProtocolVersion<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><strong>3.0<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>MessageClass<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Device<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>MessageCategory<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Display<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>MessageType<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Request<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>ServiceID<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">Your unique ID for this request, consisting of 1-10 alphanumeric characters. Must be unique within the last 48 hours for the terminal (<code>POIID<\/code>) being used.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>SaleID<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">Your unique ID for the POS system component to send this request from.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>POIID<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">The unique ID of the terminal to send this request to. Format: <em>[device model]-[serial number]<\/em>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<p>The  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/terminal-api\/latest\/post\/display#request-DisplayOutput\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">DisplayRequest.DisplayOutput<\/a> array containing a single array item with:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: left;\">Value<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>Device<\/code><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>CustomerDisplay<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>InfoQualify<\/code><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Display<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>OutputContent.OutputFormat<\/code><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>MessageRef<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>OutputContent.PredefinedContent.ReferenceID<\/code><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Idle<\/strong><\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Request to switch to the standby screen'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"SaleToPOIRequest\\\":{\\n        \\\"DisplayRequest\\\":{\\n            \\\"DisplayOutput\\\":[\\n                {\\n                    \\\"Device\\\":\\\"CustomerDisplay\\\",\\n                    \\\"InfoQualify\\\":\\\"Display\\\",\\n                    \\\"OutputContent\\\":{\\n                        \\\"OutputFormat\\\":\\\"MessageRef\\\",\\n                        \\\"PredefinedContent\\\":{\\n                            \\\"ReferenceID\\\":\\\"Idle\\\"\\n                        }\\n                    }\\n                }\\n            ]\\n        },\\n        \\\"MessageHeader\\\":{\\n            \\\"ProtocolVersion\\\":\\\"3.0\\\",\\n            \\\"MessageClass\\\":\\\"Device\\\",\\n            \\\"MessageCategory\\\":\\\"Display\\\",\\n            \\\"MessageType\\\":\\\"Request\\\",\\n            \\\"ServiceID\\\":\\\"043001\\\",\\n            \\\"SaleID\\\":\\\"POSSystemID12345\\\",\\n            \\\"POIID\\\":\\\"V400m-324688179\\\"\\n        }\\n    }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>In the display response, check the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/terminal-api\/latest\/post\/display#responses-200-OutputResult\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">OutputResult<\/a>.<br \/>\nIf the request is successful, this includes <code>Response.Result<\/code>: <span translate=\"no\"><strong>Success<\/strong><\/span>.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"SaleToPOIResponse\\\": {\\n        \\\"DisplayResponse\\\": {\\n            \\\"OutputResult\\\": [\\n                {\\n                    \\\"Device\\\": \\\"CustomerDisplay\\\",\\n                    \\\"InfoQualify\\\": \\\"Display\\\",\\n                    \\\"Response\\\": {\\n                        \\\"Result\\\": \\\"Success\\\"\\n                    }\\n                }\\n            ]\\n        },\\n        \\\"MessageHeader\\\": {\\n            \\\"MessageCategory\\\": \\\"Display\\\",\\n            \\\"MessageClass\\\": \\\"Device\\\",\\n            \\\"MessageType\\\": \\\"Response\\\",\\n            \\\"POIID\\\": \\\"V400m-324688179\\\",\\n            \\\"ProtocolVersion\\\": \\\"3.0\\\",\\n            \\\"SaleID\\\": \\\"POSSystemID12345\\\",\\n            \\\"ServiceID\\\": \\\"545\\\"\\n        }\\n    }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>The terminal switches to the standby screen.<\/p>\n<\/li>\n<li>\n<p>The third party receives a response containing:<\/p>\n<ul>\n<li><code>ErrorCondition<\/code>: <span translate=\"no\"><strong>Cancel<\/strong><\/span><\/li>\n<li><code>Result<\/code>: <span translate=\"no\"><strong>Failure<\/strong><\/span><\/li>\n<li><code>AdditionalResponse<\/code>: the message <em>A higher priority request has been received<\/em>.<\/li>\n<\/ul>\n<p>The next example shows the response to an input request after canceling from the POS app:<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Third-party input request cancelled from POS app'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"SaleToPOIResponse\\\": {\\n        \\\"InputResponse\\\": {\\n            \\\"InputResult\\\": {\\n                \\\"Device\\\": \\\"CustomerDisplay\\\",\\n                \\\"InfoQualify\\\": \\\"Display\\\",\\n                \\\"Response\\\": {\\n                    \\\"AdditionalResponse\\\": \\\"message=A%20higher%20priority%20request%20has%20been%20received\\\",\\n                    \\\"ErrorCondition\\\": \\\"Busy\\\",\\n                    \\\"Result\\\": \\\"Failure\\\"\\n                }\\n            }\\n        },\\n        \\\"MessageHeader\\\": {\\n            \\\"MessageCategory\\\": \\\"Input\\\",\\n            \\\"MessageClass\\\": \\\"Device\\\",\\n            \\\"MessageType\\\": \\\"Response\\\",\\n            \\\"POIID\\\": \\\"V400m-324688179\\\",\\n            \\\"ProtocolVersion\\\": \\\"3.0\\\",\\n            \\\"SaleID\\\": \\\"POSSystemID12345\\\",\\n            \\\"ServiceID\\\": \\\"603\\\"\\n        }\\n    }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h3 id=\"cancel-interaction-from-terminal\">Cancel from the terminal<\/h3>\n<p>To cancel an in-progress third-party interaction on a terminal:<\/p>\n<ul>\n<li>On the terminal keypad, select the <em>Cancel<\/em> key <strong><img alt=\"\" src=\"\/images\/6\/2\/0\/e\/0\/620e0c5c343676dd2b947bbdb1573f7eebc3caf7-cancel2x.png\" \/><\/strong><br \/>\nIn case of a terminal without a keypad, on the display select the <em>Cancel<\/em> icon <img style=\"width: 60px;\" alt=\"\" src=\"\/user\/pages\/reuse\/image-library\/buttons\/cancel-icon\/nav-cancel.svg?decoding=auto&amp;fetchpriority=auto\" \/> if the screen includes that.<\/li>\n<\/ul>\n<p>If this is successful:<\/p>\n<ul>\n<li>The terminal shows the standby screen.<\/li>\n<li>\n<p>The third party receives a response containing:<\/p>\n<ul>\n<li><code>ErrorCondition<\/code>: <span translate=\"no\"><strong>Cancel<\/strong><\/span><\/li>\n<li><code>Result<\/code>: <span translate=\"no\"><strong>Failure<\/strong><\/span><\/li>\n<\/ul>\n<p>The next example shows the response to an input request after canceling from the terminal:<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Third-party input request cancelled from terminal'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"SaleToPOIResponse\\\": {\\n        \\\"InputResponse\\\": {\\n            \\\"InputResult\\\": {\\n                \\\"Device\\\": \\\"CustomerInput\\\",\\n                \\\"InfoQualify\\\": \\\"Input\\\",\\n                \\\"Input\\\": {\\n                    \\\"DigitInput\\\": \\\"\\\",\\n                    \\\"InputCommand\\\": \\\"DigitString\\\"\\n                },\\n                \\\"Response\\\": {\\n                    \\\"ErrorCondition\\\": \\\"Cancel\\\",\\n                    \\\"Result\\\": \\\"Failure\\\"\\n                }\\n            },\\n            \\\"OutputResult\\\": {\\n                \\\"Device\\\": \\\"CustomerDisplay\\\",\\n                \\\"InfoQualify\\\": \\\"Display\\\",\\n                \\\"Response\\\": {\\n                    \\\"Result\\\": \\\"Success\\\"\\n                }\\n            }\\n        },\\n        \\\"MessageHeader\\\": {\\n            \\\"MessageCategory\\\": \\\"Input\\\",\\n            \\\"MessageClass\\\": \\\"Device\\\",\\n            \\\"MessageType\\\": \\\"Response\\\",\\n            \\\"POIID\\\": \\\"e280-347069832\\\",\\n            \\\"ProtocolVersion\\\": \\\"3.0\\\",\\n            \\\"SaleID\\\": \\\"V400m-324688179\\\",\\n            \\\"ServiceID\\\": \\\"425\\\"\\n        }\\n    }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ul>\n<h2>Testing<\/h2>\n<p>After setting up all aspects of the third-party interaction, you need to check that the interaction behaves as expected. Contact the third party to discuss the scenarios to test for your specific use case.<\/p>\n<p>Here is an example of tests to run for a use case where the third party sends an input request:<\/p>\n<ol>\n<li>Make a test transaction that is expected to trigger the third-party interaction.\n<ul>\n<li>Check that the expected question appears on the terminal.<\/li>\n<li>React by giving an answer on the terminal.<\/li>\n<\/ul><\/li>\n<li>Repeat, but this time do not react when the question appears, and check that the interaction times out as expected.<\/li>\n<li>Repeat, but this time decline giving an answer, or cancel the interaction on the terminal.<\/li>\n<li>\n<p>Repeat, but this time cancel the interaction from the POS app.<br \/>\n<\/p>\n<\/li>\n<li>Repeat all the above tests with other test transactions that are expected to trigger the third-party interaction. For example, test different payment instruments like credit cards, debit cards, and digital wallets. Or test different entry methods like tapping, inserting, and swiping.<\/li>\n<\/ol>\n<h2>See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"\/point-of-sale\/design-your-integration\/notifications\/display-notifications\"\n                        target=\"_self\"\n                        >\n                    Display notifications\n                <\/a><\/li><li><a href=\"\/development-resources\/webhooks\"\n                        target=\"_self\"\n                        >\n                    Webhooks\n                <\/a><\/li><li><a href=\"\/point-of-sale\/shopper-engagement\/shopper-input\"\n                        target=\"_self\"\n                        >\n                    Input requests\n                <\/a><\/li><li><a href=\"\/point-of-sale\/shopper-engagement\/display-data\"\n                        target=\"_self\"\n                        >\n                    Display requests\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/shopper-engagement\/third-party-interactions","articleFields":{"description":"Allow a third party to interact with your customers on your payment terminals.","robots":"noindex,nofollow","feedback_component":true,"parameters":{"feature":"3rdParty"},"last_edit_on":"27-12-2022 09:57"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/shopper-engagement\/third-party-interactions","title":"Third-party interactions","content":"Apart from accepting payments, you can use your payment terminals to interact with your customers in other ways. For example, to get feedback on your service, engage customers in your loyalty program, or ask their details for sending a digital receipt. Typically, the data is collected through input requests, and forwarded to a back-end system that produces the intended result.\nYou can set this up yourself. But you can also engage the services of companies specialized in surveys, customer loyalty, digital receipts, and so on. That is because we support third-party interactions, where another company can interact with your terminals directly without having to integrate with your POS system.\nDepending on what you want to achieve, third parties can:\n\nSend non-payment requests to your terminals, like input requests for gathering answers from your customers, and display requests to show information like a 'Thank you' message.\nReceive Terminal API display notifications.\nThese notifications are generated by the terminal, are sent as webhooks, and contain updates on the progress of a payment on the terminal.\nReceive standard webhooks.\nThese webhooks are generated on the plataforma de pagamentos da Adyen and contain transaction details.\n\nThird-party interaction with the terminal doesn't interrupt the payment process.\n\nThird-party interactions currently do not work with the OPI integration.\n\nSecurity and requirements\nThird parties cannot send payment or card acquisition requests to your terminals. If they try to send such a request, the request is refused with an HTTP status code of 010 Not Allowed.\nThird-party interaction is possible:\n\nIn a Terminal API integration with WebSockets enabled.\nYou can check the WebSockets setting in your Customer Area, under In-person payments &gt; Terminal settings &gt; Integrations.\nWith specific terminal models: M400, P400 Plus, V210, V400m.\n\nHow it works\nTo enable third-party interactions you need to complete the setup as follows:\n\n\nYou set up display notifications for the third party. For every step of the tender process, the third party receives a display notification that contains:\n\nThe POIID of the terminal. This tells the third party where to send a request.\nThe TransactionID: the tender reference. When the payment is completed, the terminal sends a TENDER_FINAL display notification. In this notification, the PSP reference is added in the format `[tender reference].[PSP reference] is appended with the PSP reference:  for cross-reference with a standard webhooks.\n\n\n\nYou set up standard webhooks for the third party. For every payment, the third party will receive a webhook that includes the outcome of the payment, the amount, the PSP reference, and more. Based on the PSP reference, the third party can link the customer's transaction to their rating, for richer reporting.\n\n\nYou set up an API credential for the third party. This enables the third party to authenticate the input and display requests that they send.\n\n\nThird-party interaction flow\nThe message flow with third-party interaction is as follows:\n\n\nThe POS app sends a payment request to the payment terminal.\n\n\nThe terminal sends display notifications to the third party for every step of the tender process, from TENDER_CREATED when the payment starts, to TENDER_FINAL when the payment is completed.\n\n\nWhen the payment process is finished, the third party sends an input request to the terminal.\n\n\nThe customer provides their input on the terminal, and the third party receives the response.\n\n\nTo thank the customer, the third party sends a display request with an image. The image disappears after the time-out set in the request, or after a default time-out of three seconds. (This step is not shown in the diagram below.)\n\n\nThe third party receives a standard webhook for the payment from the plataforma de pagamentos da Adyen.\n\n\nThe following diagram illustrates the message flow for third-party interaction. In the diagram, the POS uses cloud communications, but with local communications the third-party interaction with the terminal is the same.\n\n\n\nSet up third-party webhook endpoints\nTo receive webhooks from Adyen terminals and the plataforma de pagamentos da Adyen, the third party needs to configure their system. Then you need to set up third-party webhooks in your Customer Area.\nConfiguration by the third-party\n\n\nInform the third party of the requirements for receiving webhooks:\n\n\nTheir system needs to have:\n\nOne or more endpoints that can receive webhooks in JSON format. They may get two kinds of webhooks: display notifications from the terminals, and standard webhooks from the plataforma de pagamentos da Adyen.\nFor the test environment: an open TCP port for HTTP traffic (80, 8080, or 8888) or HTTPS traffic (443, 8443, or 8843) with TLSv1.2.\nFor the live environment: an open TCP port for HTTPS traffic (443, 8443, or 8843) with TLSv1.2.\nOptional: a username and password for basic authentication.\n\n\n\nIf they want to receive standard webhooks, they should verify the HMAC signature of the standard webhook and they must acknowledge every standard webhook with a successful HTTP response status code, for example 200. For instructions, refer the third party to our development resources for webhooks.\n\n\n\n\n\nAsk the third party for the endpoints and basic authentication credentials they set up for receiving webhooks.\nYou need to provide those details in your Customer Area in the next steps.\n\n\nSet up display notifications\nTo set up display notifications for the third party:\n\n\nMake sure that you know the endpoint where the third party wants to receive display notifications, and the basic authentication credentials.\n\n\nLog in to your Customer Area and switch to the account, store, or terminal that you want to set up notifications for.\n\n\nGo to In-person payments &gt; Terminal settings &gt; Integrations.\n\n\nIn the Terminal API section, select Decrypted.\n\n\nUnder Display URLs, select the pencil icon  and then select Add new.\n\n\nSelect the pencil icon  next to the field that appears.\nThe Add URL dialog opens.\n\n\nEnter the details:\n\nURL: the URL of the endpoint where the third party wants to receive display notifications.\nUsername and Password (optional): the basic authentication credentials that the third party set up on their server.\nPublic: select this option. Indicates that the specified URL is on a public network.\n\nLocal: do not select this option; not applicable for third-party interactions.\n\n\n\n\n\nSelect Add URL and then Save.\n\n\nIf your integration uses local communications, ask our Support Team to ensure display notifications are not encrypted.\nThis step is necessary because with local communications the terminal generates encrypted notifications and the third party cannot decrypt those.\n\n\nSet up standard webhooks\nCurrently there are no restrictions enforced on the details that third parties can receive in standard webhooks. We advise you to limit the details to the minimum required for your use case, by enabling as few additional settings as possible.\nTo set up third-party standard webhooks:\nIn your Customer Area, enable and configure webhooks for your company account, merchant account, and merchant account groups. However, we recommend to configure webhooks for your company account. To set up a webhook for a specific merchant account, create a webhook for your company account, and configure merchant accounts for that webhook.\n\nYou can configure Payments webhooks on the company, merchant account, and merchant account groups.\nYou can configure Platforms webhooks on the company account level only.\n\nTo configure a webhook:\n 1. Make sure that you know the endpoint where the third party wants to receive standard webhooks, and the basic authentication username and password of their webhook server. 2. If the payment terminals that the third party will interact with are boarded to one specific merchant account, switch to that merchant account. \n\nIn your Customer Area, go to Developers\u00a0&gt;\u00a0Webhooks.\nIf you have a Balance Platform integration, select Payments or Platforms to view the webhooks available to you based on your integration.\n\n\nSelect  Create new webhook.\nIf you are adding a webhook for your platform and have multiple platforms set up to run on Adyen, select the balance platform where you want to configure your new webhook.\n\n\nFrom the list of webhooks, select Add for the one to add.\n\n\nUnder General, configure the following:\n\n\n\nSetting\nDescription\n\n\n\n\nEnabled\nSelect the toggle to enable or disable the webhook.\n\n\nVersion\nThe webhook version.\n\n\nDescription\nYour description of the webhook.\n\n\nMerchant accounts\nYou can apply the webhook to all merchant accounts for a company account, include only specific merchant accounts, or exclude specific merchant accounts for your company account.\n\n\n\n\n\nUnder Server configuration, configure the following:\n\n\n\nSetting\nDescription\n\n\n\n\nURL\nThe URL of the third-party webhook server. It must be a public URL.\n\n\nMethod\nJSON, HTTP POST, or SOAP\n\n\nEncryption protocol\nTLSv1.2 or TLSv1.3\n\n\n\n\n\nUnder Security, configure the following:\n\n\n\nSetting\nDescription\n\n\n\n\nOAuth 2.0\nNote: OAuth 2.0 support is available for the Standard webhook type only.If you want to use OAuth 2.0 for access to your webhook endpoint, enter the following for your Identity Provider's OAuth 2.0 server: Client IDClient secretURL: The location of your Identity Provider's OAuth 2.0 authorization server, where Adyen should request new access tokens. The time-to-live (TTL) setting of your access tokens must be 3599 seconds, at a minimum.Scope: The Scope is optional. The permission level Adyen's webhook service needs to access to your webhook endpoint.\n\n\nBasic authentication\nEnter the following for the third-party webhook server:usernamepassword\n\n\nHMAC Key\nGenerate a new HMAC Key or use an existing HMAC key.\n\n\n\n\n\nUnder Events settings, select the event types for this webhook. Some webhook types do not support more than one event type, so this setting does not appear.\n\n\nIf the Additional settings section is available, optionally select the additional information you want to receive in this webhook. Some webhook types do not support more than one event type, so this section does not appear.\n\n\nSelect Save configuration.\n\n\nREADY_3RD_PARTY display notification\n\n    \n\nSet up the third-party API credential\nIf the third party wants to send Terminal API requests to your terminals, they must authenticate their requests with an API key. This means you need to create a special third-party API credential for your account and share it with the third party.\nThe third-party API credential has limited access and cannot be used to make payments. Like all API credentials, it consists of:\n\nAn API key.\nAPI permissions: roles required for the type of request, and accounts that the API key is valid for.\n\nTo be able to create the third-party API credential, you must have one of the following user roles:\n\nMerchant admin\nManage API credentials\n\nTo create the third-party API credential:\n\nLog in to your Customer Area, and go to Developers\u00a0&gt;\u00a0API credentials.\nThis opens a list with all API credentials linked to your company account.\nSelect Add standardized user.\nSelect thirdParty_xxxxxx@Company.[YourCompanyAccount].\nIn this third-party API credential username, xxxxxx will be replaced with numbers.\nSelect Add.\nIn the list of API credentials, select the new third-party API credential username.\nTo generate an API key, under Server settings &gt; Authentication select the API key tab. Select Generate API key, copy the API key using the copy icon  and store the third-party API key securely in your system.\nSelect Save changes.\nUnder Permissions &gt; Roles select the role Thirdparty interaction with in-store terminals, and make sure no other roles are selected.\nUnder Permissions &gt; Accounts select the accounts that the third-party credential needs to have access to.\nMake sure that these are the accounts that you set up webhooks for.\nSelect Save changes.\nSecurely send the API key to the third party.\n\nLet the third party send requests\nIf the third party wants to send Terminal API requests to your terminals, inform them that they need to:\n\n\nListen to the Terminal API display notifications sent to their webhooks server. These include:\n\nA MessageHeader with a POIID field that identifies the terminal.\n\nA ReferenceID field with an event that indicates when the terminal is ready to receive a request.\n\n\n\n\n\nIn the \n  MessageHeader\n of their input or display request, include a POIID field with the same value received in the display notification.\n\n\nFormat the rest of the request as described in our documentation.\n\n\nFor an example input request, see Ask for a rating. That shows a screen that on various display sizes could look as follows:\n\n\n\nFor both input and display request, the third party should set a time-out using MinimumDisplayTime. Otherwise the request will time out after three seconds.\n\n\n\n\nAuthenticate their request by specifying their third-party API key in the x-API-key header of the HTTP request.\n\n\nCanceling an in-progress interaction\nTo block an incoming third-party interaction request, you can cancel the request:\n\nFrom your POS app by sending a DisplayRequest that forces the terminal to show the standby screen.\nOn the terminal.\n\nCancel from your POS app\nIn general, requests are cancelled by sending an AbortRequest containing the ServiceID of the request you want to cancel. However, because the third party is sending the request, your POS app doesn't know the ServiceID. The solution is to send a DisplayRequest that instructs the terminal to show the standby screen.\nTo cancel an in-progress third-party request from the POS app:\n\n\nMake a Terminal API display request, specifying:\n\n\nThe standard \n  SaleToPOIRequest.MessageHeader\n object, with MessageClass set to Device and MessageCategory set to Display.\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nProtocolVersion\n\n3.0\n\n\nMessageClass\n\nDevice\n\n\nMessageCategory\n\nDisplay\n\n\nMessageType\n\nRequest\n\n\nServiceID\n\nYour 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.\n\n\nSaleID\n\nYour unique ID for the POS system component to send this request from.\n\n\nPOIID\n\nThe unique ID of the terminal to send this request to. Format: [device model]-[serial number].\n\n\n\n\n\n\n\nThe  DisplayRequest.DisplayOutput array containing a single array item with:\n\n\n\nParameter\nValue\n\n\n\n\nDevice\nCustomerDisplay\n\n\nInfoQualify\nDisplay\n\n\nOutputContent.OutputFormat\nMessageRef\n\n\nOutputContent.PredefinedContent.ReferenceID\nIdle\n\n\n\n\n\n\n\n\n\n\nIn the display response, check the  OutputResult.\nIf the request is successful, this includes Response.Result: Success.\n\n\n\nThe terminal switches to the standby screen.\n\n\nThe third party receives a response containing:\n\nErrorCondition: Cancel\nResult: Failure\nAdditionalResponse: the message A higher priority request has been received.\n\nThe next example shows the response to an input request after canceling from the POS app:\n\n\n\n\n\nCancel from the terminal\nTo cancel an in-progress third-party interaction on a terminal:\n\nOn the terminal keypad, select the Cancel key \nIn case of a terminal without a keypad, on the display select the Cancel icon  if the screen includes that.\n\nIf this is successful:\n\nThe terminal shows the standby screen.\n\nThe third party receives a response containing:\n\nErrorCondition: Cancel\nResult: Failure\n\nThe next example shows the response to an input request after canceling from the terminal:\n\n\n\n\n\nTesting\nAfter setting up all aspects of the third-party interaction, you need to check that the interaction behaves as expected. Contact the third party to discuss the scenarios to test for your specific use case.\nHere is an example of tests to run for a use case where the third party sends an input request:\n\nMake a test transaction that is expected to trigger the third-party interaction.\n\nCheck that the expected question appears on the terminal.\nReact by giving an answer on the terminal.\n\nRepeat, but this time do not react when the question appears, and check that the interaction times out as expected.\nRepeat, but this time decline giving an answer, or cancel the interaction on the terminal.\n\nRepeat, but this time cancel the interaction from the POS app.\n\n\nRepeat all the above tests with other test transactions that are expected to trigger the third-party interaction. For example, test different payment instruments like credit cards, debit cards, and digital wallets. Or test different entry methods like tapping, inserting, and swiping.\n\nSee also\n\n\n                    Display notifications\n                \n                    Webhooks\n                \n                    Input requests\n                \n                    Display requests\n                \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Terminais","lvl2":"Shopper engagement","lvl3":"Third-party interactions"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/point-of-sale","lvl2":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/shopper-engagement","lvl3":"\/pt\/point-of-sale\/shopper-engagement\/third-party-interactions"},"levels":4,"category":"In-person payments","category_color":"green","tags":["Third-party","interactions"]},"articleFiles":{"screen-EN_rating-1-click-draft.png":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/user\/pages\/docs\/03.point-of-sale\/41.shopper-engagement\/06.third-party-interactions\/screen-EN_rating-1-click-draft.png\" \/>","display-notifications_3rd-party.json":"<p alt=\"\">display-notifications_3rd-party.json<\/p>","third-party-interaction-after-payment.svg":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/user\/pages\/docs\/03.point-of-sale\/41.shopper-engagement\/06.third-party-interactions\/third-party-interaction-after-payment.svg?decoding=auto&amp;fetchpriority=auto\" \/>","third-party-interaction-before-payment.svg":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/user\/pages\/docs\/03.point-of-sale\/41.shopper-engagement\/06.third-party-interactions\/third-party-interaction-before-payment.svg\" \/>"}}
