Requirements
Before you begin, take into account the following requirements, limitations, and preparations.| Requirement | Description |
|---|---|
| Integration type | A Terminal API integration with payment terminals, or a Mobile solution. |
| Webhooks | Set up Send card number to <TFS provider> webhooks. |
| Limitations | The following limitations apply: Only available if you are located in a country/region where a Terminal API integration is supported or a country/region where Mobile solutions are supported, and only if the country/region allows VAT refunds. Only available with Global Blue as TFS provider. Check their overview of supported countries. |
| Setup steps | Before you begin, set up tax-free shopping. |
How it works
The role of Adyen in the tax-free flow is limited. Securely card capture enables us to send a notification with the shopper’s encrypted card details to the TFS provider. For an overview of the flow, select the tab for your integration or solution.- Terminal API with payment terminals
- Mobile solution
- Terminal API with payment terminals
- Mobile solution
- Terminal API with payment terminals
- Mobile solution
-
Check if the purchase is eligible for TFS. You can do this either:
- From the terminal: You send a card acquisition request to get the issuer country code and the BIN.
- From your POS app: This flow does not involve Adyen and you need to set it up with your TFS provider.
-
Ask the shopper’s consent for secure card capture (to share their encrypted card number with your TFS provider). You can do this either in the POS app user interface or on the payment terminal. There are two flows to ask for consent on the terminal:
- Automatic consent flow: After you have enabled this flow with Adyen, you only need to make a payment. This automatically shows the consent screen and shares the encrypted card number with the TFS provider if consent is given.
- Custom consent flow: You send an input request to ask the shopper for their consent. You also need to implement logic to decide, based on the input response, whether your payment request should trigger secure card capture.
-
You make a payment with
taxfree.indicatorset to true to indicate that the shopper has given consent for secure card capture. We send a notification to the TFS provider with the shopper’s encrypted card number. If the shopper has not given consent, you settaxfree.indicatorto false so that no secure card capture happens. In the automatic flow, we automatically change the flag to false. The shopper can still claim the refund with the TFS provider. - After the shopper completes the payment, you give the shopper the tax-free form issued by the POS app, and a receipt.
The role of Adyen in the tax-free flow is limited. We pass on information to the TFS provider for secure card capture. However, secure card capture requires consent from the shopper.After you have set up tax-free shopping:
-
Check if the purchase qualifies for TFS, based on the requirements of your TFS provider, by either:
- Checking the shopper’s passport.
- Checking the shopper’s details in your Customer Relationship Management (CRM) tool, if you have previously saved their data.
- Ask the shopper for consent to share their encrypted card number with your TFS provider. You can ask for verbal consent or implement a consent screen in your POS app.
-
If the shopper is eligible for TFS and has given consent, you make a payment with
taxfree.indicatorset to true. We send a notification to the TFS provider with the shopper’s encrypted card number that will be used for the refund. If the shopper has not given consent, you settaxfree.indicatorto false so that no secure card capture happens. - After the shopper completes the payment, you give the shopper the tax-free form issued by the POS app, and a receipt.
Set up tax-free shopping
Before you begin offering tax-free shopping to your shoppers, you need to set up the feature.Select the tab for your integration or solution.- Contact a TFS provider to set up a tax-free process.
- To set up your POS app for TFS support, contact the provider of your POS system.
- If you want to automatically show a default consent input screen before showing the payment screen, ask your Adyen account manager or the Support Team to enable the automatic consent flow. If you want to use a custom input screen, the automatic consent flow must be disabled.
-
Enable receiving the issuer country:
- In your Customer Area, go to Developers > Additional data.
- Select Issuer country, Variant, Funding source, and Funding source subtype.
- Configure a Send card number to webhook to send notifications to your TFS provider.
- Contact a TFS provider to set up a tax-free process.
- To set up your POS app for TFS support, contact the provider of your POS system.
- Configure a Send card number to webhook to send notifications to your TFS provider.
Set up notifications to your TFS provider
Configure a Send card number to <TFS provider> webhook. If the shopper agrees to share their card details, we send the following data fields to your TFS provider:- The PSP reference of the transaction.
- The shopper’s encrypted card number.
-
The BIN of the shopper’s card.
If your TFS provider is Global Blue, use
https://www.adyen.comas the URL for Server configuration for the “Send card number to Global Blue” webhook. We recommend adding a meaningful message to the Description that identifies it as part of the tax-free shopping flow.
taxfree.indicator flag in the payment request. If the notification is sent, you see this on the transaction in your Customer Area. The POS tile of the transaction includes:- Tax Free Indicator: true
- Tax Free Identifier: the ID that the TFS provider returned to acknowledge the card details. This notification is needed for testing and when you go live. Note that the shopper can claim the tax refund regardless of whether we notified the TFS provider of the shopper’s encrypted card number.
Handle the tax-free flow
Select the tab for your integration or solution.In a Terminal API integration using payment terminals, the flow can consist of three steps:
- Optionally acquire the card details to gather data that enable you to check if the transaction is eligible for TFS. The POS app should handle the eligibility check either locally or through the TFS provider, and should inform your store staff of the result.
- Optionally use a custom input request instead of the automatic consent flow to ask the shopper’s consent to sharing their encrypted card details with the TFS provider.
- Make a payment request with the
taxfree.indicatorflag set to true. The shopper’s encrypted card details will be shared with the TFS provider.
1. Optional: Acquire card details
To check whether the shopper is eligible for a tax refund and to determine the eligible tax-free service, you can check the shopper’s passport and payment card, or you make a card acquisition:-
Make a card acquisition request in which you specify the
TotalAmount.JSON
{ "SaleToPOIRequest": { "MessageHeader": { "ProtocolVersion": "3.0", "MessageClass": "Service", "MessageCategory": "CardAcquisition", "MessageType": "Request", "SaleID": "POSSystemID12345", "ServiceID": "0207111104", "POIID": "MX925-284691408" }, "CardAcquisitionRequest": { "SaleData": { "SaleTransactionID": { "TimeStamp": "2024-06-10T14:59:09.000Z", "TransactionID": "933" } }, "CardAcquisitionTransaction": { "TotalAmount":176.99 } } } }Java
String saleID = "YOUR_CASH_REGISTER_ID"; String serviceID = "YOUR_UNIQUE_ATTEMPT_ID"; String POIID = "YOUR_TERMINAL_ID"; String transactionID = "YOUR_UNIQUE_TRANSACTION_ID"; SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest(); MessageHeader messageHeader = new MessageHeader(); messageHeader.setProtocolVersion("3.0"); messageHeader.setMessageClass( MessageClassType.SERVICE ); messageHeader.setMessageCategory( MessageCategoryType.CARD_ACQUISITION ); messageHeader.setMessageType( MessageType.REQUEST ); messageHeader.setSaleID(saleID); messageHeader.setServiceID(serviceID); messageHeader.setPOIID(POIID); saleToPOIRequest.setMessageHeader(messageHeader); CardAcquisitionRequest cardAcquisitionRequest = new CardAcquisitionRequest(); SaleData saleData = new SaleData(); TransactionIdentification saleTransactionID = new TransactionIdentification(); saleTransactionID.setTimeStamp(DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar())); saleTransactionID.setTransactionID(transactionID); saleData.setSaleTransactionID(saleTransactionID); cardAcquisitionRequest.setSaleData(saleData); CardAcquisitionTransaction cardAcquisitionTransaction = new CardAcquisitionTransaction(); cardAcquisitionRequest.setCardAcquisitionTransaction(cardAcquisitionTransaction); saleToPOIRequest.setCardAcquisitionRequest(cardAcquisitionRequest); terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest); -
When you receive the CardAcquisitionResponse, get the following details.
-
POIData.POITransactionID.TimeStampandPOIData.POITransactionID.TransactionID: You need these details later in your payment request. -
CardData.CardCountryCode: The issuer country code, for example 528. Also included in theAdditionalResponse. -
From the
AdditionalResponse(you receive either a string of key-value pairs or a Base64 string that you need to decode to get a JSON object):cardIssuerCountryId: The issuer country code, for example 528. Also included inCardData.CardCountryCode.cardBin: The BIN of the shopper’s card, for example 541333.paymentMethodfundingSource
{ "SaleToPOIResponse": { "CardAcquisitionResponse": { "POIData": { "POITransactionID": { "{hint:For use in the CardAcquisitionReference of the payment request}TimeStamp{/hint}": "2024-06-10T14:59:08.000Z", "{hint:For use in the CardAcquisitionReference of the payment request}TransactionID{/hint}": "jM6S001558097948000" } }, "SaleData": { "SaleTransactionID": { "TimeStamp": "2024-06-10T14:59:09.000Z", "TransactionID": "933" } }, "PaymentInstrumentData": { "CardData": { "{hint:Issuer country code}CardCountryCode{/hint}": "528", "MaskedPan": "541333*****9999", "PaymentBrand": "mc", "SensitiveCardData": { "ExpiryDate": "0228" }, "PaymentInstrumentType": "Card" }, "Response": { "{hint:Contains the BIN and the issuer country code}AdditionalResponse{/hint}": "...cardBin=541333...cardIssuerCountryId=528...", "Result": "Success" } }, "MessageHeader": {...} } } -
-
Pass the
cardIssuerCountryID,expiryDate,paymentMethod,fundingSource, and thecardBinto your POS app for the eligibility check.
2. Optional: Use a custom input request to ask for consent
If the purchase qualifies for TFS, you must ask the shopper for their consent to sharing their encrypted card number with your TFS provider. You can do this by showing a screen either on the terminal or in the user interface of your POS app. When using the terminal, you can enable the automatic default consent screen, or send a custom input request.To ask for consent with a custom input request or through the POS app UI, the automatic consent flow must be disabled for your account.To ask consent with a custom input request on the terminal:-
Make a Confirmation input request, including:
-
The InputRequest.DisplayOutput object with:
Parameter Description OutputContent.OutputTextAn array of four Textfields containing:
A title. For example:Tax-free shoppingAn explanation and a question. This text can be long and is scrollable. For example:You are eligible for tax-free shopping. Would you like the tax-free provider to refund you on your card?A “No” button on the left of the display. A “Yes” button on the right of the display.
The InputRequest.InputData object with:Parameter Description MaxInputTime(Integer) Time-out in seconds. This is the time that the shopper gets to answer the question.
{ "SaleToPOIRequest":{ "MessageHeader":{ "ProtocolVersion":"3.0", "MessageClass":"Device", "MessageCategory":"Input", "MessageType":"Request", "ServiceID":"0207111104", "SaleID":"POSSystemID12345", "POIID":"V400m-324688179" }, "InputRequest":{ "DisplayOutput":{ "Device":"CustomerDisplay", "InfoQualify":"Display", "OutputContent":{ "OutputFormat":"Text", "PredefinedContent":{ "ReferenceID":"GetConfirmation" }, "OutputText":[ { "Text":"Tax-free shopping" }, { "Text":"You are eligible for tax-free shopping. Would you like the tax-free provider to refund you on your card?" }, { "Text":"No" }, { "Text":"Yes" } ] } }, "InputData":{ "Device":"CustomerInput", "InfoQualify":"Input", "InputCommand":"GetConfirmation", "MaxInputTime":60 } } } } -
The InputRequest.DisplayOutput object with:
-
When you receive the input response, check the InputResult for the shopper’s answer:
Input.ConfirmedFlag: true indicates the shopper gives their consent.Input.ConfirmedFlag: false indicates the shopper doesn’t give their consent.
{ "SaleToPOIResponse": { "InputResponse": { "InputResult": { "Device": "CustomerInput", "InfoQualify": "Input", "Response": { "Result": "Success" }, "Input": { "ConfirmedFlag": true, "InputCommand": "GetConfirmation" } }, "OutputResult": { "Device": "CustomerDisplay", "InfoQualify": "Display", "Response": { "Result": "Success" } } }, "MessageHeader": {...} } } - Pass the shopper’s answer to the POS app.
3. Make a payment
Use ataxfree.indicator flag in the payment request to indicate if the shopper’s encrypted card details can be shared with the TFS provider. Also include a reference to the card acquisition if you have acquired the card details in Step 1.-
Make a payment request, including:
- The PaymentData object with:
Parameter Description CardAcquisitionReferenceData from the card acquisition: TimeStamp: the time stamp returned in thePOIData.POITransactionIDof the card acquisition response.TransactionID: the transaction ID returned in thePOIData.POITransactionIDof the card acquisition response.
The SaleData object with:Pass theParameter Description SaleToAcquirerDataThe taxfree.indicatorflag set to true.If the purchase does not qualify for TFS or the shopper did not give their consent, you omittaxfree.indicatoror set it to false.SaleToAcquirerDatain one of the following formats:-
Option 1: A JSON object converted to a Base64-encoded string.
After encoding, pass this in your request:
{ "additionalData": { "taxfree.indicator": "true" } }"SaleToAcquirerData": "ewogICAgImFkZGl0aW9uYWxEYXRhIjogewogICAgICAgICJ0YXhmcmVlLmluZGljYXRvciI6IHRydWUKICAgIH0KfQ==" -
Option 2: A form-encoded key-value pair:
"SaleToAcquirerData": "taxfree.indicator=true"
taxfree.indicatorset to true.JSON
{ "SaleToPOIRequest":{ "MessageHeader":{ "ProtocolVersion":"3.0", "MessageClass":"Service", "MessageCategory":"Payment", "MessageType":"Request", "SaleID":"POSSystemID12345", "ServiceID":"0207111104", "POIID":"MX925-284691408" }, "PaymentRequest":{ "SaleData":{ "SaleToAcquirerData":"taxfree.indicator=true", "SaleTransactionID":{ "TransactionID":"27908", "TimeStamp":"2024-06-10T10:11:04+00:00" } }, "PaymentTransaction":{ "AmountsReq":{ "Currency":"EUR", "RequestedAmount":176.99 } }, "PaymentData":{ "CardAcquisitionReference":{ "{hint:The POITransactionID.TransactionID of the card acquisition}TransactionID{/hint}": "jM6S001558097948000", "{hint:The POITransactionID.TimeStamp of the card acquisition}TimeStamp{/hint}": "2024-06-10T12:59:08.000Z" } } } } }Java
When the automatic consent flow is enabled, the terminal asks the shopper for their consent for secure card capture.String saleID = "YOUR_CASH_REGISTER_ID"; String serviceID = "YOUR_UNIQUE_ATTEMPT_ID"; String POIID = "YOUR_TERMINAL_ID"; String transactionID = "YOUR_UNIQUE_TRANSACTION_ID"; SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest(); MessageHeader messageHeader = new MessageHeader(); messageHeader.setProtocolVersion("3.0"); messageHeader.setMessageClass( MessageClassType.SERVICE ); messageHeader.setMessageCategory( MessageCategoryType.PAYMENT ); messageHeader.setMessageType( MessageType.REQUEST ); messageHeader.setSaleID(saleID); messageHeader.setServiceID(serviceID); messageHeader.setPOIID(POIID); saleToPOIRequest.setMessageHeader(messageHeader); PaymentRequest paymentRequest = new PaymentRequest(); SaleData saleData = new SaleData(); saleData.setSaleToAcquirerData("taxfree.indicator=True"); TransactionIdentification saleTransactionID = new TransactionIdentification(); saleTransactionID.setTransactionID(transactionID); saleTransactionID.setTimeStamp(DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar())); saleData.setSaleTransactionID(saleTransactionID); paymentRequest.setSaleData(saleData); PaymentTransaction paymentTransaction = new PaymentTransaction(); AmountsReq amountsReq = new AmountsReq(); amountsReq.setCurrency("EUR"); amountsReq.setRequestedAmount( BigDecimal.valueOf(176.99) ); paymentTransaction.setAmountsReq(amountsReq); paymentRequest.setPaymentTransaction(paymentTransaction); PaymentData paymentData = new PaymentData(); TransactionIdentification cardAcquisitionReference = new TransactionIdentification(); cardAcquisitionReference.setTransactionID(transactionID); cardAcquisitionReference.setTimeStamp(DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar())); paymentData.setCardAcquisitionReference(cardAcquisitionReference); paymentRequest.setPaymentData(paymentData); saleToPOIRequest.setPaymentRequest(paymentRequest); terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);
The shopper provides their answer and completes the transaction.
-
When the automatic consent flow is enabled, in the payment response note the following in the
AdditionalResponse:- If the shopper gave consent, the
taxfree.indicatorflag remains set to true. - If the shopper did not give consent, the
taxfree.indicatorflag is set to false.
{ "SaleToPOIResponse": { "MessageHeader": {...}, "PaymentResponse": { "POIData": { "POIReconciliationID": "1000", "POITransactionID": { "TimeStamp": "2024-06-10T08:13:47.000Z", "TransactionID": "jM6S001558097948000.GH4R4RBFJGXXGN82" } }, "PaymentReceipt": [...], "PaymentResult": {...}, "Response": { "AdditionalResponse": "...taxfree.indicator=true...", "Result": "Success" }, "SaleData": {...} } } } - If the shopper gave consent, the
Make a TFS payment
Use ataxfree.indicator flag in the payment request to indicate if the shopper’s encrypted card details can be shared with the TFS provider:- Make sure the purchase qualifies for TFS and the shopper has given their consent to sharing their encrypted card details .
-
Make a payment request, including:
- The SaleData object with:
Pass theParameter Description SaleToAcquirerDataThe taxfree.indicatorflag set to true.If the purchase does not qualify for TFS or the shopper did not give their consent, you omittaxfree.indicatoror set it to false.SaleToAcquirerDatain one of the following formats:-
Option 1: A JSON object converted to a Base64-encoded string.
After encoding, pass this in your request:
{ "additionalData": { "taxfree.indicator": "true" } }"SaleToAcquirerData": "ewogICAgImFkZGl0aW9uYWxEYXRhIjogewogICAgICAgICJ0YXhmcmVlLmluZGljYXRvciI6IHRydWUKICAgIH0KfQ==" -
Option 2: A form-encoded key-value pair:
"SaleToAcquirerData": "taxfree.indicator=true"
taxfree.indicatorset to true.{ "SaleToPOIRequest":{ "MessageHeader":{ "ProtocolVersion":"3.0", "MessageClass":"Service", "MessageCategory":"Payment", "MessageType":"Request", "SaleID":"POSSystemID12345", "ServiceID":"0207111104", "POIID":"MX925-284691408" }, "PaymentRequest":{ "SaleData":{ "SaleToAcquirerData":"taxfree.indicator=true", "SaleTransactionID":{ "TransactionID":"27908", "TimeStamp":"2019-03-07T10:11:04+00:00" } }, "PaymentTransaction":{ "AmountsReq":{ "Currency":"EUR", "RequestedAmount":176.99 } } } } } -
When you receive the payment response, note the following in the
AdditionalResponse:- If the
taxfree.indicatorflag is set to true, the card details are shared with the TFS provider.
{ "SaleToPOIResponse": { "MessageHeader": {...}, "PaymentResponse": { "POIData": { "POIReconciliationID": "1000", "POITransactionID": { "TimeStamp": "2022-03-14T08:13:47.000Z", "TransactionID": "jM6S001558097948000.GH4R4RBFJGXXGN82" } }, "PaymentReceipt": [...], "PaymentResult": {...}, "Response": { "AdditionalResponse": "...taxfree.indicator=true...", "Result": "Success" }, "SaleData": {...} } } } - If the
Test the tax-free flow
In most cases, your TFS provider organizes an end-to-end test between themselves, Adyen, you, and your POS system provider.In general, to test the happy flow, you need to use a card with a BIN that is eligible for tax refunds. Otherwise, the TFS provider returns a message that a tax refund is not possible.- Make sure that you configured Send card number to <TFS provider> notifications for your test account.
- Discuss with your TFS provider which card numbers (PAN) on your test card you are allowed to use for tax refund testing. (The PAN includes the BIN.)
- Optional in a Terminal API integration using payment terminals: during the card acquisition step, use one of the allowed test card PANs and the associated currency.
The POS app should now show that the card is eligible for a tax refund. This depends on how the eligibility check is set up with your TFS provider and POS system. - Send a payment request with taxfree.indicator set to true, and complete the payment on the terminal. Find the PSP reference of the Transaction in the transactionID.
- Issue a tax-free form from your POS app based on the specifications provided by the TFS provider.
- In your Customer Area, look up the transaction by PSP reference and check that the POS tile contains an ID in the Tax Free Identifier field. If this field is empty, contact your TFS provider to discover what went wrong.