Terminal-2 icon

Card-based identification

Identify a card at start and finish to calculate the amount due.

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:

  1. Upon arrival, you identify the driver and record their time of arrival based on a card acquisition. Then you cancel the card acquisition.
  2. When the driver leaves, you do another card acquisition to recognize the driver.
  3. 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 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.

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:

  1. Make a card acquisition request without an amount.

  2. 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, 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.

    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 TokenRequestedType of Customer in the request, the card alias is also provided in PaymentInstrumentData.CardData.PaymentToken.TokenValue.

  3. Create a record in your back-end system to store the data obtained from the card acquisition.

  4. 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 -white_check_mark-, and We logged your arrival time.

    In 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.

Recognize the customer

When the customer leaves:

  1. Make a card acquisition request without an amount.

  2. When you receive the CardAcquisitionResponse, save the following details.

    • POIData.POITransactionID.TimeStamp and POIData.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, 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.

    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.
  3. 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.

  4. Add the details obtained with this second card acquisition.

Make a payment

When you have recognized the shopper:

  1. 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).

  2. Continue with a payment to complete the card acquisition flow, specifying:

    Parameter Required Description
    PaymentTransaction.AmountsReq -white_check_mark- An object with:
    • Currency: The transaction currency.
    • RequestedAmount: The transaction amount you calculated.
    PaymentData.CardAcquisitionReference -white_check_mark- An 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.

See also