You can use the display of your payment terminal to show a QR code which the shopper can scan with their mobile device.
The QR code can contain anything you like. For example, a URL to join your loyalty program or to download an app, a message with a link to a promotional offer, or an invitation to visit your webshop.
You can also add a header and footer to explain what the QR code is for. The next examples show a QR code with header and footer on a narrow terminal display and on a wide display.
Make a display request for a QR code
-
If the QR code needs to contain more than just a URL, convert the content to a URL-encoded string. You'll need to specify the URL-encoded string in the display request.
For example, if the QR code should have this content:
Visit www.adyen.com/pos-payments and: - Learn about the features we support - Choose from a range of terminals
The resulting URL-encoded string will look like this:
Visit%20www.adyen.com%2Fpos-payments%20and%3A%0A-%20Learn%20about%20the%20features%20we%20support%0A-%20Choose%20from%20a%20range%20of%20terminals
If the QR code needs to contain only a URL, for example
https://www.adyen.com/pos-payments
, there is no need to URL-encode that. You'll specify the URL in the display request as a plain text string. -
Make a POST request to a Terminal API endpoint, specifying:
-
MessageHeader
: The standardSaleToPOIRequest.MessageHeader
object. This includes:Parameter Required Description MessageClass
Device MessageCategory
Display
-
DisplayRequest.DisplayOutput
: An array with array items representing the elements to show on the terminal display: QR code, header, and footer. Select the tabs below to view the parameters to use for each array item.Parameter Description Device
CustomerDisplay InfoQualify
Display MinimumDisplayTime
The number of seconds that the element is shown on the terminal display. Used only if greater than the default timeout of 60 seconds. ResponseRequiredFlag
If not specified, defaults to true. The response then informs you whether this element was successfully shown. OutputContent.OutputFormat
BarCode OutputContent.OutputBarcode.BarcodeType
QRCode OutputContent.OutputBarcode.BarcodeValue
The content of the QR code, specified either as a plain text string, or as a URL encoded string.
{ "SaleToPOIRequest":{ "MessageHeader":{ "ProtocolVersion":"3.0", "MessageClass":"Device", "MessageCategory":"Display", "MessageType":"Request", "ServiceID":"043001", "SaleID":"POSSystemID12345", "POIID":"V400m-346403161" }, "DisplayRequest":{ "DisplayOutput":[ { "Device":"CustomerDisplay", "InfoQualify":"Display", "OutputContent":{ "OutputFormat":"BarCode", "OutputBarcode":{ "BarcodeType":"QRCode", "BarcodeValue":"www.adyen.com/pos-payments" } } }, { "Device":"CustomerDisplay", "InfoQualify":"Display", "OutputContent":{ "OutputFormat":"Text", "OutputText":[ { "Text":"Join our loyalty program" } ] } }, { "Device":"CustomerDisplay", "InfoQualify":"Display", "OutputContent":{ "OutputFormat":"Text", "OutputText":[ { "Text":"Thank you!" } ] } } ] } } }
If you didn't set the
ResponseRequiredFlag
to false in all array items, you receive a display response with:OutputResult
: An array that indicates whether the elements were successfully shown. The first item in this array refers to the first item in theDisplayOutput
array , and so on.
{ "SaleToPOIResponse": { "DisplayResponse": { "OutputResult": [ { "Device": "CustomerDisplay", "InfoQualify": "Display", "Response": { "Result": "Success" } }, { "Device": "CustomerDisplay", "InfoQualify": "Display", "Response": { "Result": "Success" } }, { "Device": "CustomerDisplay", "InfoQualify": "Display", "Response": { "Result": "Success" } } ] }, "MessageHeader": {...} } }
-