{"title":"Card identification before refunding","category":"default","creationDate":1620306000,"content":"<p>Before issuing an <a href=\"\/pt\/point-of-sale\/basic-tapi-integration\/refund-payment\/unreferenced\">unreferenced refund<\/a> to the shopper's card, you may want to check if this is the same card that was used for the original payment. To do so, you make a card acquisition request with <code>PaymentType<\/code> <span translate=\"no\"><strong>Refund<\/strong><\/span> and compare the card alias against the card alias used for purchases. Then you either:<\/p>\n<ul>\n<li>Pay the refund to the card the shopper presented for the card acquisition: you make a payment request with <code>PaymentType<\/code> <span translate=\"no\"><strong>Refund<\/strong><\/span> and a reference to the card acquisition.<\/li>\n<li>Cancel the card acquisition. You can then ask the shopper for a different card and start again.<\/li>\n<\/ul>\n<h2>Requirements<\/h2>\n<p>Before you begin, take into account the following requirements and preparations.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Requirement<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Integration type<\/strong><\/td>\n<td style=\"text-align: left;\">A <a href=\"\/pt\/point-of-sale\/basic-tapi-integration\/\">Terminal API integration<\/a> with payment terminals.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Setup steps<\/strong><\/td>\n<td style=\"text-align: left;\">Before you begin: <ul><li markdown=\"1\">Be aware of the <a href=\"\/pt\/point-of-sale\/basic-tapi-integration\/refund-payment\/unreferenced#requirements\">requirements for unreferenced refunds<\/a>, and <a href=\"\/pt\/point-of-sale\/basic-tapi-integration\/refund-payment\/unreferenced#before-you-begin-unreferenced\">enable unreferenced refunds<\/a>.<\/li> <li markdown=\"1\">Set up <a href=\"\/pt\/point-of-sale\/card-acquisition\/identifiers#receiving-identifiers-in-responses\">receiving the card alias in Terminal API responses<\/a>.<\/li> <li markdown=\"1\">Contact 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 enable single tap. For contactless transactions, this ensures the terminal does not ask the shopper to tap their card again when you issue the refund.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Card alias<\/h2>\n<p>To verify that you will be issuing the refund to the same card that was used for the payment, you need to save the following <a href=\"\/pt\/point-of-sale\/card-acquisition\/identifiers\">identifier<\/a> from your card acquisition and payment responses:<\/p>\n<ul>\n<li><strong>Card alias<\/strong> (<code>alias<\/code>): A value that uniquely represents the shopper's card number (PAN), for example <code>A37317672402294<\/code>. With this, you can recognize the card that a shopper is using. You cannot use the card alias for making payments. You receive the card alias in the <code>AdditionalResponse<\/code>.<\/li>\n<\/ul>\n<p>Depending on your use case, you could also save:<\/p>\n<ul>\n<li><strong>Other transaction details<\/strong>. For example, the transaction amount.<\/li>\n<\/ul>\n<h2 id=\"card-acquisition-request\">Make a Refund card acquisition request<\/h2>\n<ol>\n<li>\n<p><a href=\"\/pt\/point-of-sale\/card-acquisition\">Make a card acquisition request<\/a>, 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 <span translate=\"no\"><strong>Service<\/strong><\/span> and <code>MessageCategory<\/code> set to <span translate=\"no\"><strong>CardAcquisition<\/strong><\/span>.<\/p>\n<table>\n<thead>\n<tr>\n<th>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><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><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>Service<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><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>CardAcquisition<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><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><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><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><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\/cardacquisition\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">CardAcquisitionRequest<\/a> object, including:<\/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>SaleData.SaleTransactionID<\/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;\">An object with: <ul><li markdown=\"1\"><code>TransactionID<\/code>: Your reference to identify the refund. We recommend using a unique value.<\/li> <li markdown=\"1\"><code>TimeStamp<\/code>: The date and time of the request in <a href=\"https:\/\/en.wikipedia.org\/wiki\/ISO_8601#Coordinated_Universal_Time_(UTC)\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">UTC format<\/a>.<\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>SaleData.TokenRequestedType<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>Customer<\/strong><\/span>. Returns the card alias in the <code>TokenValue<\/code> field of the response. Note that the card alias is always returned in the <code>AdditionalResponse<\/code>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>CardAcquisitionTransaction<\/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;\">This object contains:<ul><li markdown=\"1\"><code>TotalAmount<\/code>: The amount you want to refund.<\/li><li markdown=\"1\"><code>PaymentType<\/code>: <span translate=\"no\"><strong>Refund<\/strong><\/span>.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"''\" :id=\"'acq-before-refund'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"SaleToPOIRequest\\\":{\\n        \\\"MessageHeader\\\":{\\n            \\\"ProtocolVersion\\\":\\\"3.0\\\",\\n            \\\"MessageClass\\\":\\\"Service\\\",\\n            \\\"MessageCategory\\\":\\\"CardAcquisition\\\",\\n            \\\"MessageType\\\":\\\"Request\\\",\\n            \\\"ServiceID\\\":\\\"812\\\",\\n            \\\"SaleID\\\":\\\"POSSystemID12345\\\",\\n            \\\"POIID\\\":\\\"P400Plus-347069832\\\"\\n        },\\n        \\\"CardAcquisitionRequest\\\":{\\n            \\\"SaleData\\\":{\\n                \\\"SaleTransactionID\\\":{\\n                    \\\"TransactionID\\\":\\\"136\\\",\\n                    \\\"TimeStamp\\\":\\\"2021-05-06T12:54:12.509Z\\\"\\n                },\\n                \\\"{hint:Optional, returns the card alias in TokenValue}TokenRequestedType\\\":\\\"Customer{\\\/hint}\\\"\\n            },\\n            \\\"CardAcquisitionTransaction\\\":{\\n                \\\"TotalAmount\\\":24.98,\\n                \\\"PaymentType\\\":\\\"Refund\\\"\\n            }\\n        }\\n    }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>The terminal shows the refund amount with a minus sign (for example, -24.98) and asks the shopper to present their card.<\/p>\n<\/li>\n<li>\n<p>When you receive the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/terminal-api\/latest\/post\/cardacquisition#responses-200-Response\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">CardAcquisitionResponse<\/a>, save the following details:<\/p>\n<ul>\n<li><code>POIData.POITransactionID.TimeStamp<\/code> and <code>POIData.POITransactionID.TransactionID<\/code>: you need these details later in your payment request for an unreferenced refund.<\/li>\n<\/ul>\n<p>From the <code>AdditionalResponse<\/code> (depending on the format you used in the request, you receive either a string of form-encoded key-value pairs or a Base64 string that you need to decode to get a JSON object):<\/p>\n<ul>\n<li><code>alias<\/code>: The card alias, to recognize the customer based on their card.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Response for the Refund card acquisition'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"SaleToPOIResponse\\\": {\\n        \\\"CardAcquisitionResponse\\\": {\\n            \\\"POIData\\\": {\\n                \\\"POIReconciliationID\\\": \\\"1000\\\",\\n                \\\"POITransactionID\\\": {\\n                    \\\"{hint:For use in the CardAcquisitionReference of the payment request}TimeStamp\\\": \\\"2021-05-06T12:54:15.000Z{\\\/hint}\\\",\\n                    \\\"{hint:For use in the CardAcquisitionReference of the payment request}TransactionID\\\": \\\"CWf3001620305655003{\\\/hint}\\\"\\n                }\\n            },\\n            \\\"PaymentInstrumentData\\\": {\\n                \\\"CardData\\\": {\\n                    \\\"CardCountryCode\\\": \\\"528\\\",\\n                    \\\"MaskedPan\\\": \\\"541333 **** 9999\\\",\\n                    \\\"PaymentBrand\\\": \\\"mc\\\",\\n                    \\\"PaymentToken\\\": {\\n                        \\\"TokenRequestedType\\\": \\\"Customer\\\",\\n                        \\\"TokenValue\\\": \\\"{hint:This is the card alias}M469509594859802{\\\/hint}\\\"\\n                    },\\n                    \\\"SensitiveCardData\\\": {\\n                        \\\"ExpiryDate\\\": \\\"0228\\\"\\n                    }\\n                },\\n                \\\"PaymentInstrumentType\\\": \\\"Card\\\"\\n            },\\n            \\\"Response\\\": {\\n                \\\"AdditionalResponse\\\": \\\"tid=47314497&amp;transactionType=REFUND&amp;backendGiftcardIndicator=false&amp;posadditionalamounts.originalAmountValue=2498&amp;expiryYear=2028&amp;alias=M469509594859802&amp;giftcardIndicator=false&amp;posAmountGratuityValue=0&amp;paymentMethodVariant=mc&amp;store=A3nStoreNL&amp;aliasType=Default&amp;cardType=mc&amp;iso8601TxDate=2021-05-06T12%3a54%3a15.0000000%2b0000&amp;posOriginalAmountValue=2498&amp;txtime=14%3a54%3a15&amp;paymentMethod=mc&amp;txdate=06-05-2021&amp;cardSummary=9999&amp;expiryMonth=02&amp;merchantReference=136&amp;posadditionalamounts.originalAmountCurrency=EUR&amp;posAuthAmountCurrency=EUR&amp;message=CARD_ACQ_COMPLETED&amp;cardIssuerCountryId=528&amp;posAmountCashbackValue=0&amp;fundingSource=CREDIT&amp;posEntryMode=CLESS_CHIP&amp;cardBin=541333&amp;cardScheme=mc&amp;issuerCountry=NL&amp;posAuthAmountValue=2498\\\",\\n                \\\"Result\\\": \\\"Success\\\"\\n            },\\n            \\\"SaleData\\\": {\\n                \\\"SaleTransactionID\\\": {\\n                    \\\"TimeStamp\\\": \\\"2021-05-06T12:54:12.509Z\\\",\\n                    \\\"TransactionID\\\": \\\"136\\\"\\n                }\\n            }\\n        },\\n        \\\"MessageHeader\\\": {\\n            ...\\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>Search the payments stored in your back-end system for a match with the card alias returned in the card acquisition response and the refund amount.<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"continue-with-refund\">Continue with a refund<\/h2>\n<p>If you decide to issue an unreferenced refund to the card that the shopper presented when you made the card acquisition request:<\/p>\n<ol>\n<li>\n<p><a href=\"\/pt\/point-of-sale\/basic-tapi-integration\/make-a-payment\">Make a payment request<\/a>, 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 <span translate=\"no\"><strong>Service<\/strong><\/span> and <code>MessageCategory<\/code> set to <span translate=\"no\"><strong>Payment<\/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>Service<\/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>Payment<\/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\/payment\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">PaymentRequest<\/a> object with:<\/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>PaymentTransaction.AmountsReq<\/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;\">An object with: <ul><li markdown=\"1\"><code>Currency<\/code>: The transaction <a href=\"\/pt\/development-resources\/currency-codes\">currency<\/a>.<\/li><li markdown=\"1\"><code>RequestedAmount<\/code>: The refund amount.<\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>PaymentData.PaymentType<\/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>Refund<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>PaymentData.CardAcquisitionReference<\/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;\">An object referring to the card acquisition: <ul><li markdown=\"1\"><code>TimeStamp<\/code>: The time stamp returned in the <code>POIData.POITransactionID<\/code> of the card acquisition response.<\/li> <li markdown=\"1\"><code>TransactionID<\/code>: The transaction ID returned in the <code>POIData.POITransactionID<\/code> of the card acquisition response.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"''\" :id=\"'refund-after-acq'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"SaleToPOIRequest\\\":{\\n        \\\"MessageHeader\\\":{\\n            \\\"ProtocolVersion\\\":\\\"3.0\\\",\\n            \\\"MessageClass\\\":\\\"Service\\\",\\n            \\\"MessageCategory\\\":\\\"Payment\\\",\\n            \\\"MessageType\\\":\\\"Request\\\",\\n            \\\"SaleID\\\":\\\"POSSystemID12345\\\",\\n            \\\"ServiceID\\\":\\\"952\\\",\\n            \\\"POIID\\\":\\\"P400Plus-248069832\\\"\\n        },\\n        \\\"PaymentRequest\\\":{\\n            \\\"SaleData\\\":{\\n                \\\"SaleTransactionID\\\":{\\n                    \\\"TransactionID\\\":\\\"899\\\",\\n                    \\\"TimeStamp\\\":\\\"2021-05-06T12:54:45.000Z\\\"\\n                }\\n            },\\n            \\\"PaymentTransaction\\\":{\\n                \\\"AmountsReq\\\":{\\n                    \\\"Currency\\\":\\\"EUR\\\",\\n                    \\\"RequestedAmount\\\":24.98\\n                }\\n            },\\n            \\\"PaymentData\\\":{\\n                \\\"PaymentType\\\":\\\"Refund\\\",\\n                \\\"CardAcquisitionReference\\\":{\\n                    \\\"{hint:POITransactionID.TimeStamp from the card acquisition}TimeStamp{\\\/hint}\\\":\\\"2021-05-06T12:54:15.000Z\\\",\\n                    \\\"{hint:POITransactionID.TransactionID from the card acquisition}TransactionID{\\\/hint}\\\":\\\"CWf3001620305655003\\\"\\n                }\\n            }\\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>Check whether we received your refund request. If we received it:<\/p>\n<ul>\n<li>The terminal shows the transaction is approved.<\/li>\n<li>You receive a JSON response with:\n<ul>\n<li><code>Result<\/code>: <span translate=\"no\"><strong>Success<\/strong><\/span><\/li>\n<li><code>POIData.POITransactionID.TransactionID<\/code>: The <a href=\"\/pt\/point-of-sale\/design-your-integration\/terminal-api#transaction-identifier\">transaction identifier<\/a> for this refund request.<\/li>\n<\/ul><\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Refund payment response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"SaleToPOIResponse\\\": {\\n        \\\"MessageHeader\\\": {...},\\n        \\\"PaymentResponse\\\": {\\n            \\\"POIData\\\": {\\n                \\\"POIReconciliationID\\\": \\\"1000\\\",\\n                \\\"POITransactionID\\\": {\\n                    \\\"TimeStamp\\\": \\\"2021-05-06T12:54:42.000Z\\\",\\n                    \\\"TransactionID\\\": \\\"CWf3001620305655003.NC6HT9CRT65ZGN82\\\"\\n                }\\n            },\\n            \\\"PaymentReceipt\\\": [...],\\n            \\\"PaymentResult\\\": {\\n                \\\"AmountsResp\\\": {\\n                    \\\"AuthorizedAmount\\\": 24.98,\\n                    \\\"Currency\\\": \\\"EUR\\\"\\n                },\\n                \\\"OnlineFlag\\\": true,\\n                \\\"PaymentAcquirerData\\\": {...},\\n                \\\"PaymentInstrumentData\\\": {\\n                    \\\"CardData\\\": {\\n                        \\\"CardCountryCode\\\": \\\"826\\\",\\n                        \\\"EntryMode\\\": [\\n                            \\\"Contactless\\\"\\n                        ],\\n                        \\\"MaskedPan\\\": \\\"541333 **** 9999\\\",\\n                        \\\"PaymentBrand\\\": \\\"mc\\\",\\n                        \\\"SensitiveCardData\\\": {\\n                            \\\"CardSeqNumb\\\": \\\"33\\\",\\n                            \\\"ExpiryDate\\\": \\\"0228\\\"\\n                        }\\n                    },\\n                    \\\"PaymentInstrumentType\\\": \\\"Card\\\"\\n                },\\n                \\\"PaymentType\\\": \\\"Refund\\\"\\n            },\\n            \\\"Response\\\": {\\n                \\\"AdditionalResponse\\\": \\\"AID=A000000004101001&amp;tid=47314497&amp;transactionType=REFUND&amp;backendGiftcardIndicator=false&amp;posadditionalamounts.originalAmountValue=2498&amp;expiryYear=2028&amp;alias=M469509594859802&amp;giftcardIndicator=false&amp;posAmountGratuityValue=0&amp;batteryLevel=100%25&amp;paymentMethodVariant=mc&amp;pspReference=NC6HT9CRT65ZGN82&amp;applicationPreferredName=mc%20en%20gbr%20gbp&amp;store=A3nStoreNL&amp;aliasType=Default&amp;cardType=mc&amp;iso8601TxDate=2021-05-06T12%3a54%3a45.0000000%2b0000&amp;offline=false&amp;posOriginalAmountValue=2498&amp;txtime=14%3a54%3a45&amp;paymentMethod=mc&amp;txdate=06-05-2021&amp;startYear=2017&amp;tc=104DB3F1983EE147&amp;cardIssueNumber=33&amp;cardSummary=9999&amp;expiryMonth=02&amp;merchantReference=5&amp;mid=1000&amp;posadditionalamounts.originalAmountCurrency=EUR&amp;transactionReferenceNumber=NC6HT9CRT65ZGN82&amp;posAuthAmountCurrency=EUR&amp;cardHolderVerificationMethodResults=1F0302&amp;cardIssuerCountryId=826&amp;posAmountCashbackValue=0&amp;fundingSource=CREDIT&amp;posEntryMode=CLESS_CHIP&amp;startMonth=01&amp;cardBin=541333&amp;cardScheme=mc&amp;issuerCountry=GB&amp;posAuthAmountValue=2498\\\",\\n                \\\"Result\\\": \\\"Success\\\"\\n            },\\n            \\\"SaleData\\\": {\\n                \\\"SaleTransactionID\\\": {\\n                    \\\"TimeStamp\\\": \\\"2021-05-06T12:54:42.229Z\\\",\\n                    \\\"TransactionID\\\": \\\"5\\\"\\n                }\\n            }\\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>To learn the result, wait for the <a href=\"\/pt\/point-of-sale\/basic-tapi-integration\/refund-payment\/refund-webhooks#refund-with-data-webhook\">REFUND_WITH_DATA webhook<\/a>.<br \/>\nRefunds are always processed asynchronously. If successful, the refund is issued to the shopper's account.<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"continue-differently\">Continue in a different way<\/h2>\n<p>If you decide not to issue an unreferenced refund to the card that the shopper presented when you made the card acquisition request, you need to <a href=\"\/pt\/point-of-sale\/card-acquisition#cancel-completed\">cancel the card acquisition<\/a>.<\/p>\n<p>You can then, for example, ask the shopper for another card and start the process again.<\/p>\n<h2 id=\"see-also\">See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"\/point-of-sale\/card-acquisition\"\n                        target=\"_self\"\n                        >\n                    Card acquisition\n                <\/a><\/li><li><a href=\"\/point-of-sale\/card-acquisition\/identifiers\"\n                        target=\"_self\"\n                        >\n                    Card and shopper identifiers\n                <\/a><\/li><li><a href=\"\/point-of-sale\/basic-tapi-integration\/refund-payment\"\n                        target=\"_self\"\n                        >\n                    Refund a payment\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/shopper-recognition\/before-refund","articleFields":{"description":"Before issuing an unreferenced refund, verify that the same card is used as for the payment.","feedback_component":true,"last_edit_on":"06-05-2021 15:02"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/shopper-recognition\/before-refund","title":"Card identification before refunding","content":"Before issuing an unreferenced refund to the shopper's card, you may want to check if this is the same card that was used for the original payment. To do so, you make a card acquisition request with PaymentType Refund and compare the card alias against the card alias used for purchases. Then you either:\n\nPay the refund to the card the shopper presented for the card acquisition: you make a payment request with PaymentType Refund and a reference to the card acquisition.\nCancel the card acquisition. You can then ask the shopper for a different card and start again.\n\nRequirements\nBefore you begin, take into account the following requirements and preparations.\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nA Terminal API integration with payment terminals.\n\n\nSetup steps\nBefore you begin: Be aware of the requirements for unreferenced refunds, and enable unreferenced refunds. Set up receiving the card alias in Terminal API responses. Contact our Support Team to enable single tap. For contactless transactions, this ensures the terminal does not ask the shopper to tap their card again when you issue the refund.\n\n\n\nCard alias\nTo verify that you will be issuing the refund to the same card that was used for the payment, you need to save the following identifier from your card acquisition and payment responses:\n\nCard alias (alias): A value that uniquely represents the shopper's card number (PAN), for example A37317672402294. With this, you can recognize the card that a shopper is using. You cannot use the card alias for making payments. You receive the card alias in the AdditionalResponse.\n\nDepending on your use case, you could also save:\n\nOther transaction details. For example, the transaction amount.\n\nMake a Refund card acquisition request\n\n\nMake a card acquisition request, specifying:\n\n\nThe standard \n  SaleToPOIRequest.MessageHeader\n object, with MessageClass set to Service and MessageCategory set to CardAcquisition.\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nProtocolVersion\n\n3.0\n\n\nMessageClass\n\nService\n\n\nMessageCategory\n\nCardAcquisition\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  CardAcquisitionRequest object, including:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nSaleData.SaleTransactionID\n\nAn object with: TransactionID: Your reference to identify the refund. We recommend using a unique value. TimeStamp: The date and time of the request in UTC format.\n\n\nSaleData.TokenRequestedType\n\nCustomer. Returns the card alias in the TokenValue field of the response. Note that the card alias is always returned in the AdditionalResponse.\n\n\nCardAcquisitionTransaction\n\nThis object contains:TotalAmount: The amount you want to refund.PaymentType: Refund.\n\n\n\n\n\n\n\n\nThe terminal shows the refund amount with a minus sign (for example, -24.98) and asks the shopper to present their card.\n\n\nWhen you receive the  CardAcquisitionResponse, save the following details:\n\nPOIData.POITransactionID.TimeStamp and POIData.POITransactionID.TransactionID: you need these details later in your payment request for an unreferenced refund.\n\nFrom the AdditionalResponse (depending on the format you used in the request, you receive either a string of form-encoded key-value pairs or a Base64 string that you need to decode to get a JSON object):\n\nalias: The card alias, to recognize the customer based on their card.\n\n\n\n\n\n\nSearch the payments stored in your back-end system for a match with the card alias returned in the card acquisition response and the refund amount.\n\n\nContinue with a refund\nIf you decide to issue an unreferenced refund to the card that the shopper presented when you made the card acquisition request:\n\n\nMake a payment request, specifying:\n\n\nThe standard \n  SaleToPOIRequest.MessageHeader\n object, with MessageClass set to Service and MessageCategory set to Payment.\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nProtocolVersion\n\n3.0\n\n\nMessageClass\n\nService\n\n\nMessageCategory\n\nPayment\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  PaymentRequest object with:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nPaymentTransaction.AmountsReq\n\nAn object with: Currency: The transaction currency.RequestedAmount: The refund amount.\n\n\nPaymentData.PaymentType\n\nRefund\n\n\nPaymentData.CardAcquisitionReference\n\nAn object referring to the card acquisition: TimeStamp: The time stamp returned in the POIData.POITransactionID of the card acquisition response. TransactionID: The transaction ID returned in the POIData.POITransactionID of the card acquisition response.\n\n\n\n\n\n\n\n\n\n\nCheck whether we received your refund request. If we received it:\n\nThe terminal shows the transaction is approved.\nYou receive a JSON response with:\n\nResult: Success\nPOIData.POITransactionID.TransactionID: The transaction identifier for this refund request.\n\n\n\n\n\n\n\nTo learn the result, wait for the REFUND_WITH_DATA webhook.\nRefunds are always processed asynchronously. If successful, the refund is issued to the shopper's account.\n\n\nContinue in a different way\nIf you decide not to issue an unreferenced refund to the card that the shopper presented when you made the card acquisition request, you need to cancel the card acquisition.\nYou can then, for example, ask the shopper for another card and start the process again.\nSee also\n\n\n                    Card acquisition\n                \n                    Card and shopper identifiers\n                \n                    Refund a payment\n                \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Terminais","lvl2":"Reconhecimento de clientes e tokeniza\u00e7\u00e3o","lvl3":"Card identification before refunding"},"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-recognition","lvl3":"\/pt\/point-of-sale\/shopper-recognition\/before-refund"},"levels":4,"category":"In-person payments","category_color":"green","tags":["identification","before","refunding"]},"articleFiles":{"acq-before-refund.json":"<p alt=\"\">acq-before-refund.json<\/p>","refund-after-acq.json":"<p alt=\"\">refund-after-acq.json<\/p>"}}
