{"title":"Card-based identification","category":"default","creationDate":1776961627,"content":"<p>When you make Terminal API card acquisition requests, the responses provides data that you can use to identify the customer.<\/p>\n<p>For example, in a parking garage you can use the card acquisition data instead of issuing a parking pass. This page illustrates how you could do that:<\/p>\n<ol>\n<li>Upon arrival, you <a href=\"#identify\">identify<\/a> the driver and record their time of arrival based on a card acquisition. Then you cancel the card acquisition.<\/li>\n<li>When the driver leaves, you do another card acquisition to <a href=\"#recognize\">recognize<\/a> the driver.<\/li>\n<li>Then you calculate the amount due based on the arrival and departure times, and <a href=\"#payment\">make a payment<\/a>.<\/li>\n<\/ol>\n<p>A similar scenario could apply to toll booths, using the location of the terminals used in the card acquisition requests to calculate the amount due.<\/p>\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\">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 customer to tap their card again for the payment.<\/li><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Card alias<\/h2>\n<p>To be able to identify customers and recognize them later, 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, transaction date and time.<\/li>\n<\/ul>\n<h2 id=\"identify\">Identify the customer<\/h2>\n<p>When the customer arrives:<\/p>\n<ol>\n<li>\n<p><a href=\"\/pt\/point-of-sale\/card-acquisition#card-acquisition-request\">Make a card acquisition request<\/a> without an amount.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'First card acquisition'\" :id=\"''\" :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\\\":\\\"282\\\",\\n            \\\"SaleID\\\":\\\"POSSystemID12345\\\",\\n            \\\"POIID\\\":\\\"P400Plus-347069832\\\"\\n        },\\n        \\\"CardAcquisitionRequest\\\":{\\n            \\\"SaleData\\\":{\\n                \\\"SaleTransactionID\\\":{\\n                    \\\"TransactionID\\\":\\\"375\\\",\\n                    \\\"TimeStamp\\\":\\\"2021-03-26T15:58:45.000Z\\\"\\n                },\\n                \\\"TokenRequestedType\\\":\\\"{hint:optional param, returns card alias in TokenValue}Customer{\\\/hint}\\\"\\n            },\\n            \\\"CardAcquisitionTransaction\\\":{\\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>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<p>From the <code>AdditionalResponse<\/code>:<\/p>\n<ul>\n<li><code>alias<\/code>: The card alias, to identify the customer based on their card.<br \/>\nDepending on the format you used in the request, the <code>AdditionalResponse<\/code> is either a string of form-encoded key-value pairs or a Base64 string that you need to decode to get a JSON object.<\/li>\n<\/ul>\n<p>Also save other details that you need for your use case. For example:<\/p>\n<ul>\n<li><code>SaleData.SaleTransactionID.TimeStamp<\/code>: The date and time when the customer presented their card.<\/li>\n<li><code>MessageHeader.POIID<\/code>: The payment terminal that processed the request. This information is useful if you need to know where the customer presented their card.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Response for the first card acquisition'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"SaleToPOIResponse\\\": {\\n        \\\"CardAcquisitionResponse\\\": {\\n            \\\"POIData\\\": {\\n                \\\"POIReconciliationID\\\": \\\"1000\\\",\\n                \\\"POITransactionID\\\": {\\n                    \\\"TimeStamp\\\": \\\"2021-03-26T15:58:45.000Z\\\",\\n                    \\\"TransactionID\\\": \\\"BV0q001616774325000\\\"\\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 alias. Store it in your back-end system}M469509594859802{\\\/hint}\\\"\\n                    },\\n                    \\\"SensitiveCardData\\\": {\\n                        \\\"ExpiryDate\\\": \\\"0228\\\"\\n                    }\\n                },\\n                \\\"PaymentInstrumentType\\\": \\\"Card\\\"\\n            },\\n            \\\"Response\\\": {\\n                \\\"AdditionalResponse\\\": \\\"tid=47069832&amp;transactionType=GOODS_SERVICES&amp;backendGiftcardIndicator=false&amp;expiryYear=2028&amp;alias=M469509594859802&amp;posAmountGratuityValue=0&amp;giftcardIndicator=false&amp;paymentMethodVariant=mc&amp;txtime=16%3a58%3a45&amp;iso8601TxDate=2021-03-26T15%3a58%3a45.0000000%2b0000&amp;cardType=mc&amp;posOriginalAmountValue=0&amp;aliasType=Default&amp;txdate=26-03-2021&amp;paymentMethod=mc&amp;merchantReference=68&amp;expiryMonth=02&amp;cardSummary=9999&amp;posadditionalamounts.originalAmountCurrency=EUR&amp;posAuthAmountCurrency=EUR&amp;message=CARD_ACQ_COMPLETED&amp;cardIssuerCountryId=528&amp;posAmountCashbackValue=0&amp;posEntryMode=CLESS_CHIP&amp;fundingSource=CREDIT&amp;issuerCountry=NL&amp;cardScheme=mc&amp;cardBin=541333&amp;posAuthAmountValue=0\\\",\\n                \\\"Result\\\": \\\"Success\\\"\\n            },\\n            \\\"SaleData\\\": {\\n                \\\"SaleTransactionID\\\": {\\n                    \\\"TimeStamp\\\": \\\"2021-03-26T15:58:44.591Z\\\",\\n                    \\\"TransactionID\\\": \\\"382\\\"\\n                }\\n            }\\n        },\\n        \\\"MessageHeader\\\": {\\n            \\\"MessageCategory\\\": \\\"CardAcquisition\\\",\\n            \\\"MessageClass\\\": \\\"Service\\\",\\n            \\\"MessageType\\\": \\\"Response\\\",\\n            \\\"POIID\\\": \\\"P400Plus-347069832\\\",\\n            \\\"ProtocolVersion\\\": \\\"3.0\\\",\\n            \\\"SaleID\\\": \\\"POSSystemID12345\\\",\\n            \\\"ServiceID\\\": \\\"282\\\"\\n        }\\n    }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>Note that if you specified a <code>TokenRequestedType<\/code> of <span translate=\"no\"><strong>Customer<\/strong><\/span> in the request, the card alias is also provided in <code>PaymentInstrumentData.CardData.PaymentToken.TokenValue<\/code>.<\/p>\n<\/li>\n<li>\n<p>Create a record in your back-end system to store the data obtained from the card acquisition.<\/p>\n<\/li>\n<li>\n<p>Cancel the card acquisition flow by sending an <a href=\"\/pt\/point-of-sale\/card-acquisition#cancel-completed\">enable service request<\/a> to the same terminal that you sent the card acquisition request to.<\/p>\n<p>The following example will show <em>Welcome!<\/em>, an animated green check mark <img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/>, and <em>We logged your arrival time<\/em>.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Cancellation using a custom message'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n   \\\"SaleToPOIRequest\\\":{\\n      \\\"MessageHeader\\\":{\\n         \\\"ProtocolVersion\\\":\\\"3.0\\\",\\n         \\\"MessageClass\\\":\\\"Service\\\",\\n         \\\"MessageCategory\\\":\\\"EnableService\\\",\\n         \\\"MessageType\\\":\\\"Request\\\",\\n         \\\"ServiceID\\\":\\\"3020711110\\\",\\n         \\\"SaleID\\\":\\\"POSSystemID12345\\\",\\n         \\\"POIID\\\":\\\"P400Plus-347069832\\\"\\n      },\\n      \\\"EnableServiceRequest\\\":{\\n         \\\"TransactionAction\\\":\\\"AbortTransaction\\\",\\n         \\\"DisplayOutput\\\":{\\n            \\\"Device\\\":\\\"CustomerDisplay\\\",\\n            \\\"InfoQualify\\\":\\\"Display\\\",\\n            \\\"OutputContent\\\":{\\n               \\\"PredefinedContent\\\":{\\n                  \\\"ReferenceID\\\":\\\"AcceptedAnimated\\\"\\n               },\\n               \\\"OutputFormat\\\":\\\"Text\\\",\\n               \\\"OutputText\\\":[\\n                  {\\n                     \\\"Text\\\":\\\"Welcome!\\\"\\n                  },\\n                  {\\n                     \\\"Text\\\":\\\"We logged your arrival time\\\"\\n                  }\\n               ]\\n            }\\n         }\\n      }\\n   }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>In the example above, the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/terminal-api\/latest\/post\/enableservice\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">EnableServiceRequest<\/a> contains a <code>DisplayOutput<\/code> object to show a message to the customer that their arrival time is logged. Otherwise, if you omit the <code>DisplayOutput<\/code>, the terminal will show <em>Canceled<\/em>, a red cross <strong><img alt=\"\" src=\"\/images\/6\/2\/0\/e\/0\/620e0c5c343676dd2b947bbdb1573f7eebc3caf7-cancel2x.png\" \/><\/strong>, and <em>Transaction canceled<\/em>. That can be confusing for the customer.<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"recognize\">Recognize the customer<\/h2>\n<p>When the customer leaves:<\/p>\n<ol>\n<li>\n<p><a href=\"\/pt\/point-of-sale\/card-acquisition#card-acquisition-request\">Make a card acquisition request<\/a> without an amount.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Second card acquisition'\" :id=\"''\" :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\\\":\\\"112\\\",\\n            \\\"SaleID\\\":\\\"POSSystemID12345\\\",\\n            \\\"POIID\\\":\\\"P400Plus-248069832\\\"\\n        },\\n        \\\"CardAcquisitionRequest\\\":{\\n            \\\"SaleData\\\":{\\n                \\\"SaleTransactionID\\\":{\\n                    \\\"TransactionID\\\":\\\"630\\\",\\n                    \\\"TimeStamp\\\":\\\"2021-03-26T16:49:42.000Z\\\"\\n                },\\n                \\\"{hint:Optional, returns the card alias in TokenValue}TokenRequestedType\\\":\\\"Customer{\\\/hint}\\\"\\n            },\\n            \\\"CardAcquisitionTransaction\\\":{\\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>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.<\/li>\n<\/ul>\n<p>From the <code>AdditionalResponse<\/code>:<\/p>\n<ul>\n<li><code>alias<\/code>: The card alias, to recognize the customer based on their card.<br \/>\nDepending on the format you used in the request, the <code>AdditionalResponse<\/code> is either a string of form-encoded key-value pairs or a Base64 string that you need to decode to get a JSON object.<\/li>\n<\/ul>\n<p>Also save other details that you need for your use case. For example:<\/p>\n<ul>\n<li><code>SaleData.SaleTransactionID.TimeStamp<\/code>: The date and time when the customer presented their card.<\/li>\n<li><code>MessageHeader.POIID<\/code>: The payment terminal that processed the request. This information is useful if you need to know where the customer presented their card.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Response for the second 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-03-26T16:49:42.000Z{\\\/hint}\\\",\\n                    \\\"{hint:For use in the CardAcquisitionReference of the payment request}TransactionID\\\": \\\"BV0q001616777383001{\\\/hint}\\\"\\n                }\\n            },\\n            \\\"PaymentInstrumentData\\\": {\\n                \\\"CardData\\\": {\\n                    \\\"CardCountryCode\\\": \\\"528\\\",\\n                    \\\"MaskedPan\\\": \\\"541333 **** 9999\\\",\\n                    \\\"PaymentBrand\\\": \\\"mc\\\",\\n                    \\\"PaymentToken\\\": {\\n                        \\\"TokenRequestedType\\\": \\\"Customer\\\",\\n                        \\\"TokenValue\\\": \\\"M469509594859802\\\"\\n                    },\\n                    \\\"SensitiveCardData\\\": {\\n                        \\\"ExpiryDate\\\": \\\"0228\\\"\\n                    }\\n                },\\n                \\\"PaymentInstrumentType\\\": \\\"Card\\\"\\n            },\\n            \\\"Response\\\": {\\n                \\\"AdditionalResponse\\\": \\\"tid=47069832&amp;transactionType=GOODS_SERVICES&amp;backendGiftcardIndicator=false&amp;expiryYear=2028&amp;alias=M469509594859802&amp;posAmountGratuityValue=0&amp;giftcardIndicator=false&amp;paymentMethodVariant=mc&amp;txtime=17%3a49%3a42&amp;iso8601TxDate=2021-03-26T16%3a49%3a42.0000000%2b0000&amp;cardType=mc&amp;posOriginalAmountValue=0&amp;aliasType=Default&amp;txdate=26-03-2021&amp;paymentMethod=mc&amp;merchantReference=104&amp;expiryMonth=02&amp;cardSummary=9999&amp;posadditionalamounts.originalAmountCurrency=EUR&amp;posAuthAmountCurrency=EUR&amp;message=CARD_ACQ_COMPLETED&amp;cardIssuerCountryId=528&amp;posAmountCashbackValue=0&amp;posEntryMode=CLESS_CHIP&amp;fundingSource=CREDIT&amp;issuerCountry=NL&amp;cardScheme=mc&amp;cardBin=541333&amp;posAuthAmountValue=0\\\",\\n                \\\"Result\\\": \\\"Success\\\"\\n            },\\n            \\\"SaleData\\\": {\\n                \\\"SaleTransactionID\\\": {\\n                    \\\"TimeStamp\\\": \\\"2021-03-26T16:49:42.913Z\\\",\\n                    \\\"TransactionID\\\": \\\"104\\\"\\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>In your back-end system, use the card alias from this second card acquisition to find the record you created for the customer after the first card acquisition.<\/p>\n<\/li>\n<li>\n<p>Add the details obtained with this second card acquisition.<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"payment\">Make a payment<\/h2>\n<p>When you have recognized the shopper:<\/p>\n<ol>\n<li>\n<p>Calculate the amount due based on the details from the first card acquisition (when the customer arrived) and the second card acquisition (when the customer is ready to leave).<\/p>\n<\/li>\n<li>\n<p><a href=\"\/pt\/point-of-sale\/card-acquisition#continue-with-payment\">Continue with a payment<\/a> to complete the card acquisition flow, specifying:<\/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 transaction amount you calculated.<\/li><\/ul><\/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 second card acquisition response.<\/li> <li markdown=\"1\"><code>TransactionID<\/code>: The transaction ID returned in the <code>POIData.POITransactionID<\/code> of the second card acquisition response.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Payment after second card acquisition'\" :id=\"''\" :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\\\":\\\"712\\\",\\n         \\\"POIID\\\":\\\"P400Plus-248069832\\\"\\n      },\\n      \\\"PaymentRequest\\\":{\\n         \\\"SaleData\\\":{\\n            \\\"SaleTransactionID\\\":{\\n               \\\"TransactionID\\\":\\\"899\\\",\\n               \\\"TimeStamp\\\":\\\"2021-03-26T16:49:45.810Z\\\"\\n            }\\n         },\\n         \\\"PaymentTransaction\\\":{\\n            \\\"AmountsReq\\\":{\\n               \\\"Currency\\\":\\\"EUR\\\",\\n               \\\"RequestedAmount\\\":9.50\\n            }\\n         },\\n         \\\"PaymentData\\\":{\\n            \\\"CardAcquisitionReference\\\":{\\n               \\\"{hint:POITransactionID.TimeStamp from the second card acquisition}TimeStamp{\\\/hint}\\\":\\\"2021-03-26T16:49:42.000Z\\\",\\n               \\\"{hint:POITransactionID.TransactionID from the second card acquisition}TransactionID{\\\/hint}\\\":\\\"BV0q001616777383001\\\"\\n            }\\n         }\\n      }\\n   }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\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><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/shopper-recognition\/identification","articleFields":{"description":"Identify a card at start and finish to calculate the amount due.","last_edit_on":"27-03-2020 16:16"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/point-of-sale\/shopper-recognition\/identification","title":"Card-based identification","content":"When you make Terminal API card acquisition requests, the responses provides data that you can use to identify the customer.\nFor example, in a parking garage you can use the card acquisition data instead of issuing a parking pass. This page illustrates how you could do that:\n\nUpon arrival, you identify the driver and record their time of arrival based on a card acquisition. Then you cancel the card acquisition.\nWhen the driver leaves, you do another card acquisition to recognize the driver.\nThen you calculate the amount due based on the arrival and departure times, and make a payment.\n\nA similar scenario could apply to toll booths, using the location of the terminals used in the card acquisition requests to calculate the amount due.\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: 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 customer to tap their card again for the payment.\n\n\n\nCard alias\nTo be able to identify customers and recognize them later, 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, transaction date and time.\n\nIdentify the customer\nWhen the customer arrives:\n\n\nMake a card acquisition request without an amount.\n\n\n\n\n\nWhen you receive the  CardAcquisitionResponse, save the following details:\nFrom the AdditionalResponse:\n\nalias: The card alias, to identify the customer based on their card.\nDepending on the format you used in the request, the AdditionalResponse is either a string of form-encoded key-value pairs or a Base64 string that you need to decode to get a JSON object.\n\nAlso save other details that you need for your use case. For example:\n\nSaleData.SaleTransactionID.TimeStamp: The date and time when the customer presented their card.\nMessageHeader.POIID: The payment terminal that processed the request. This information is useful if you need to know where the customer presented their card.\n\n\n\n\nNote that if you specified a TokenRequestedType of Customer in the request, the card alias is also provided in PaymentInstrumentData.CardData.PaymentToken.TokenValue.\n\n\nCreate a record in your back-end system to store the data obtained from the card acquisition.\n\n\nCancel the card acquisition flow by sending an enable service request to the same terminal that you sent the card acquisition request to.\nThe following example will show Welcome!, an animated green check mark , and We logged your arrival time.\n\n\n\nIn the example above, the  EnableServiceRequest contains a DisplayOutput object to show a message to the customer that their arrival time is logged. Otherwise, if you omit the DisplayOutput, the terminal will show Canceled, a red cross , and Transaction canceled. That can be confusing for the customer.\n\n\nRecognize the customer\nWhen the customer leaves:\n\n\nMake a card acquisition request without an amount.\n\n\n\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.\n\nFrom the AdditionalResponse:\n\nalias: The card alias, to recognize the customer based on their card.\nDepending on the format you used in the request, the AdditionalResponse is either a string of form-encoded key-value pairs or a Base64 string that you need to decode to get a JSON object.\n\nAlso save other details that you need for your use case. For example:\n\nSaleData.SaleTransactionID.TimeStamp: The date and time when the customer presented their card.\nMessageHeader.POIID: The payment terminal that processed the request. This information is useful if you need to know where the customer presented their card.\n\n\n\n\n\n\nIn your back-end system, use the card alias from this second card acquisition to find the record you created for the customer after the first card acquisition.\n\n\nAdd the details obtained with this second card acquisition.\n\n\nMake a payment\nWhen you have recognized the shopper:\n\n\nCalculate the amount due based on the details from the first card acquisition (when the customer arrived) and the second card acquisition (when the customer is ready to leave).\n\n\nContinue with a payment to complete the card acquisition flow, specifying:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nPaymentTransaction.AmountsReq\n\nAn object with: Currency: The transaction currency.RequestedAmount: The transaction amount you calculated.\n\n\nPaymentData.CardAcquisitionReference\n\nAn object referring to the card acquisition: TimeStamp: The time stamp returned in the POIData.POITransactionID of the second card acquisition response. TransactionID: The transaction ID returned in the POIData.POITransactionID of the second card acquisition response.\n\n\n\n\n\n\n\n\nSee also\n\n\n                    Card acquisition\n                \n                    Card and shopper identifiers\n                \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Terminais","lvl2":"Reconhecimento de clientes e tokeniza\u00e7\u00e3o","lvl3":"Card-based identification"},"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\/identification"},"levels":4,"category":"In-person payments","category_color":"green","tags":["Card-based","identification"]}}
