When you make card acquisition requests, you get data to identify the customer.
For example, in a parking garage you can use the card acquisition data instead of issuing a parking pass:
- 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.
Card identifiers
To be able to identify customers and recognize them later, save the following identifiers:
- 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, 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 response, save the following details:
From 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):alias
: The card alias, to identify the customer based on their card.
Also save other details that you need for your use case. For example:
SaleData.SaleTransactionID.TimeStamp
: date and time when the customer presented their card.MessageHeader.POIID
: The payment terminal that processed the request. Useful if you need to know where the customer presented their card.
Note that if you specified a
TokenRequestedType
of 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 making an
EnableServiceRequest
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, we include a
DisplayOutput
object 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 response, save the following details.
POIData.POITransactionID.TimeStamp
andPOIData.POITransactionID.TransactionID
: you need these details later in your payment request.
From 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):alias
: The card alias, to recognize the customer based on their card.
Also save other details that you need for your use case. For example:
SaleData.SaleTransactionID.TimeStamp
: date and time when the customer presented their card.MessageHeader.POIID
: The payment terminal that processed the request. 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.POITransactionID
of the second card acquisition response.TransactionID
: The transaction ID returned in thePOIData.POITransactionID
of the second card acquisition response.