When you make Terminal API card acquisition requests, the responses provides data that you can use to identify the customer.
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:
- Upon arrival, you identify the driver and record their time of arrival based on a card acquisition. Then you cancel the card acquisition.
- When the driver leaves, you do another card acquisition to recognize the driver.
- Then you calculate the amount due based on the arrival and departure times, and make a payment.
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.
Requirements
Before you begin, take into account the following requirements and preparations.
| Requirement | Description |
|---|---|
| Integration type | A Terminal API integration with payment terminals. |
| Setup steps | Before you begin:
|
Card alias
To be able to identify customers and recognize them later, you need to save the following identifier from your card acquisition and payment responses:
- Card alias (
alias): A value that uniquely represents the shopper's card number (PAN), for exampleA37317672402294. 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 theAdditionalResponse.
Depending on your use case, you could also save:
- Other transaction details. For example, transaction date and time.
Identify the customer
When the customer arrives:
-
Make a card acquisition request without an amount.
-
When you receive the CardAcquisitionResponse, save the following details:
From the
AdditionalResponse:alias: The card alias, to identify the customer based on their card.
Depending on the format you used in the request, theAdditionalResponseis either a string of form-encoded key-value pairs or a Base64 string that you need to decode to get a JSON object.
Also save other details that you need for your use case. For example:
SaleData.SaleTransactionID.TimeStamp: The date and time when the customer presented their card.MessageHeader.POIID: The payment terminal that processed the request. This information is useful if you need to know where the customer presented their card.
Note that if you specified a
TokenRequestedTypeof Customer in the request, the card alias is also provided inPaymentInstrumentData.CardData.PaymentToken.TokenValue. -
Create a record in your back-end system to store the data obtained from the card acquisition.
-
Cancel the card acquisition flow by sending an enable service request to the same terminal that you sent the card acquisition request to.
The following example will show Welcome!, an animated green check mark
, and We logged your arrival time.In the example above, the EnableServiceRequest contains a
DisplayOutputobject to show a message to the customer that their arrival time is logged. Otherwise, if you omit theDisplayOutput, the terminal will show Canceled, a red cross
, and Transaction canceled. That can be confusing for the customer.
Recognize the customer
When the customer leaves:
-
Make a card acquisition request without an amount.
-
When you receive the CardAcquisitionResponse, save the following details.
POIData.POITransactionID.TimeStampandPOIData.POITransactionID.TransactionID: You need these details later in your payment request.
From the
AdditionalResponse:alias: The card alias, to recognize the customer based on their card.
Depending on the format you used in the request, theAdditionalResponseis either a string of form-encoded key-value pairs or a Base64 string that you need to decode to get a JSON object.
Also save other details that you need for your use case. For example:
SaleData.SaleTransactionID.TimeStamp: The date and time when the customer presented their card.MessageHeader.POIID: The payment terminal that processed the request. This information is useful if you need to know where the customer presented their card.
-
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.
-
Add the details obtained with this second card acquisition.
Make a payment
When you have recognized the shopper:
-
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).
-
Continue with a payment to complete the card acquisition flow, specifying:
Parameter Required Description PaymentTransaction.AmountsReq
An object with: Currency: The transaction currency.RequestedAmount: The transaction amount you calculated.
PaymentData.CardAcquisitionReference
An object referring to the card acquisition: TimeStamp: The time stamp returned in thePOIData.POITransactionIDof the second card acquisition response.TransactionID: The transaction ID returned in thePOIData.POITransactionIDof the second card acquisition response.