> ## Documentation Index
> Fetch the complete documentation index at: https://adyen-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Wallet Passes

> Learn how to check for digital loyalty passes that shoppers keep in their NFC wallet.

Customers can link credit and debit cards to a wallet app on their phone or smartwatch to make in-person payments through Near Field Communication (NFC) with a payment terminal. Apart from payment cards, customers can also keep other types of digital passes in their wallet app, such as:

* Loyalty cards
* Boarding passes
* Tickets

With these NFC-enabled passes, they can for example enter an event or collect points on a loyalty card when they make a purchase.

As a merchant, you can create your own wallet passes, and link the passes to your loyalty program. When a customer makes a purchase, you check if the customer has your loyalty pass in their NFC wallet. If the customer has your pass, you can apply a discount or other advantage associated with the loyalty pass to the purchase. Or you can update the customer's loyalty account later, for example with loyalty points accrued through the purchase.

## Requirements

Before you begin, take into account the following requirements and limitations.

| Requirement | Description |
| - | - |
| **Integration type** | A [Terminal API integration](https://adyen-preview.mintlify.site/point-of-sale/basic-tapi-integration) with payment terminals. |
| **Hardware** | The following payment terminal models are supported: Verifone Engage terminals using software version 1.64 or later. Castles Android terminals using software version 1.105 or later. |
| **Limitations** | Take into account the following limitations: Only Apple Wallet passes are supported. |
| **Setup steps** | Before you begin: To be allowed to present your own Apple wallet passes, you need to have an agreement with Apple. If you want to use the [single-tap redeem flow](https://adyen-preview.mintlify.site/point-of-sale/loyalty/wallet-passes.md), ask our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) to enable single tap. |

## Transaction flow options

There are various ways to implement NFC wallet passes with a payment, depending on what makes sense for your pass and loyalty program:

* **Payment flow**: You check for the passes after the payment, and update the shopper's account later.

* **Redeem flow**: You check for the passes before the payment through a card acquisition request. If there are discounts or other advantages related to the pass, you can apply these to the payment beforehand. If the shopper does not have your pass yet, you can create one on the spot and add this information to your payment request. The shopper then receives a message that lets them add the pass to their wallet.

  There are two variations of the redeem flow: **single-tap redeem flow** and **double-tap redeem flow**. The implementation is very similar. The main difference is that in the double-tap flow the terminal asks the shopper a second time to present their card. This allows the shopper to redeem the NFC pass the first time that the terminal asks for their card, and then switch to another payment method the second time that the terminal asks for their card.

Select the tabs below to learn more. Before you [configure your NFC pass in the Customer Area](#configure-in-ca), you need to understand how these flows work and which flow you want to implement.

> [tab] Payment flow
>
> You make a payment request. If the shopper pays with an NFC wallet, you are informed in the payment response whether the shopper has your pass in their mobile wallet. If they do, the payment response includes the unique ID of the shopper's pass so that you can update the shopper's loyalty account.

> [tab] Single-tap redeem flow
>
> You first make a card acquisition request with an amount. The terminal asks the shopper to present their card. When the shopper taps their device with the NFC wallet to the payment terminal, the terminal polls the mobile wallet on the device for:
>
> * Your passes.
> * The details of the payment method (the credit or debit card that is linked to the wallet).
>
> If the shopper has your pass, the card acquisition response returns the `LoyaltyAccount` details. This includes the unique ID of the shopper's pass so that you can look up the shopper's account. You can then for example:
>
> * Make an [input request](https://adyen-preview.mintlify.site/point-of-sale/shopper-engagement/shopper-input) to ask the shopper whether they want to redeem loyalty points.
> * Add or recalculate loyalty points.
> * Apply a discount.
>
> If the shopper does not have your pass, you can check if they already have a loyalty account and issue a pass.
>
> Then you make a payment request for the final amount. This must be equal to or lower than the card acquisition amount. To ensure the shopper does not need to tap again if the payment amount differs from the card acquisition amount, you need to ask our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) to enable single tap.
>
> In this flow, the shopper taps their mobile device to the terminal only once, because the card acquisition polls for the pass details and the payment method details at the same time. If the shopper already had your pass, the payment response does not include the `LoyaltyAccount` details again.

> [tab] Double-tap redeem flow
>
> You first make a card acquisition request with or without an amount. The terminal asks the shopper to present their card. When the shopper taps their device with the NFC wallet to the payment terminal, the terminal polls the mobile wallet on the device for your passes.
>
> Contrary to the single-tap redeem flow, the terminal does not poll the wallet for the payment method details.
>
> If the shopper has your pass, the card acquisition response includes the unique ID and other details of the shopper's pass so that you can look up the shopper's account. You can then for example:
>
> * Make an [input request](https://adyen-preview.mintlify.site/point-of-sale/shopper-engagement/shopper-input) to ask the shopper whether they want to redeem loyalty points.
> * Add or recalculate loyalty points.
> * Apply a discount.
>
> If the shopper does not have your pass, you can check if they already have a loyalty account and issue a pass.
>
> Then you make a payment request for the final amount. The terminal asks the shopper again to present their card. The shopper can then choose to pay with their mobile wallet and tap their mobile device to the terminal a second time, or use a different payment method.
>
> ## Shopper enrollment
>
> To enroll shoppers in your loyalty program and let them add your NFC wallet pass to their mobile wallet, you can inform them through email, social media, your web site, and so on.
>
> In the redeem flow, it is possible to enroll the shopper and/or issue a pass on the spot, and add this information to your payment request. The shopper then receives a notification on their device that lets them add the pass to their wallet. This is possible with Verifone Engage terminals. See [Case 2: The shopper does not have your pass](#redeem-pass-not-added).
>
> To send the notification to the shopper's device, we need to know the URL where people can add a pass to their wallet, and the pass number. You can provide this information in two ways:
>
> * [Configure](#configure-in-ca) the URL in your Customer Area. Then, in the `LoyaltyData.LoyaltyID` field of your payment request, specify only the pass number.
> * Do not configure the URL in your Customer Area. In your payment request, in the `LoyaltyData.LoyaltyID` field, specify the URL appended with the pass number.
>
> ## How it works
>
> To implement transactions with digital NFC-enabled passes:
>
> 1. Set up a pass server and [create your NFC wallet pass](#create-nfc-enabled-passes).
> 2. [Configure](#configure-in-ca) your NFC wallet pass in your Customer Area.
> 3. Implement either the [payment flow](#payment-flow) or the [redeem flow](#redeem-flow) to use NFC wallet passes in the transaction flow.
>
> ## Create NFC wallet passes
>
> 1. Set up a server for your NFC wallet passes. Note that there are third parties that offer this as a service.\
>    On this pass server, you need to make a URL available where shoppers can enroll with the loyalty program tied to your NFC wallet pass and add the pass to their mobile wallet.
>
>    The full URL including `https://` or `http://` cannot be more than 60 characters.
>
>    For easier [shopper enrollment](#enrollment), specify this URL when you configure the pass in your Customer Area.
>
> 2. Create one or more NFC wallet passes. See for example the [Wallet Developer Guide](https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/PassKit_PG/index.html#//apple_ref/doc/uid/TP40012195), which explains how to create an Apple Wallet pass for your loyalty program.
>
>    While creating your pass, a pass type ID and private key are generated. You will need these later, when you configure the pass in your Customer Area.
>
> 3. Tie in your loyalty program with your NFC wallet passes and your POS system. To learn more about how to link a customer in your loyalty program to a transaction, see [Shopper recognition and tokenization](https://adyen-preview.mintlify.site/point-of-sale/shopper-recognition).
>
> ## Configure passes in your Customer Area
>
> To inform us about your NFC-enabled pass and the flow you want to use:
>
> 1. Log in to your [Customer Area](https://ca-test.adyen.com/) and select the account level where you want to use your NFC wallet pass.
>
> 2. Go to **In-person payments** > **Terminal settings** > **Payment features**.
>
> 3. Scroll to **NFC wallet passes**.
>
> 4. At **Choose a set up**, select an option for the flow you want to use.
>
>    * [Single-tap redeem flow](https://adyen-preview.mintlify.site/point-of-sale/loyalty/wallet-passes.md): collect both the NFC pass details and the NFC payment method details when you make a card acquisition request.
>
>    * [Payment flow](https://adyen-preview.mintlify.site/point-of-sale/loyalty/wallet-passes.md): collect both the NFC pass details and the NFC payment method details when you make a payment request.
>
>    * [Double-tap redeem flow](https://adyen-preview.mintlify.site/point-of-sale/loyalty/wallet-passes.md): collect only the NFC pass details when you make a card acquisition request.
>
> 5. Enter the **Name** of your pass.
>
> 6. Enter the **Pass type ID** that was generated when you created your NFC pass.\
>    We use this to poll only for your pass and not for passes from other organizations that the shopper may have in their mobile wallet. For an Apple Wallet pass, this has the format *pass.com.your-company.your-pass-name*.
>
> 7. At **Protocol** select the company responsible for the protocol that your NFC pass is based on. For example, Apple.
>
> 8. Optional. Enter the **URL** where people can add the pass to their mobile wallet.\
>    We use this for [shopper enrollment](#enrollment), to send an NFC signal so that the shopper receives a message that lets them add the pass to their wallet.
>
> 9. In the **Private key** box, select the slot where you will provide your private key. For example, *Private key 1*.
>
> 10. Under **Private key slots**, select **Decrypted**, go to the slot that you selected in the previous step, and enter the private key for your NFC pass.
>
>     Include the begin and end lines `-----BEGIN EC PRIVATE KEY-----\n` and `\n-----END EC PRIVATE KEY-----`.
>
>     This key was generated when you created the pass. We will protect and encrypt it in our back end. The terminal uses this key to decrypt the NFC message and return the unique ID of the shopper's pass in the response.
>
> 11. To add more NFC wallet passes, select **Add another pass** and repeat the steps to complete the settings.
>
> 12. Select **Save**.
>
> After you have finished the configuration, you are ready to accept your NFC wallet pass with a payment, using either the [payment flow](#payment-flow) or the [redeem flow](#redeem-flow).
>
> ## Use the payment flow
>
> To make a payment request and afterwards update the shopper's NFC pass account:
>
> 1. [Make a payment request](https://adyen-preview.mintlify.site/point-of-sale/basic-tapi-integration/make-a-payment). For example:
>
>    **Payment request in the payment flow**
>
>    ```json theme={null}
>    {
>        "SaleToPOIRequest": {
>            "MessageHeader": {
>                "ProtocolVersion": "3.0",
>                "MessageClass": "Service",
>                "MessageCategory": "Payment",
>                "MessageType": "Request",
>                "ServiceID": "s9wrxa",
>                "SaleID": "POSSystemID12345",
>                "POIID": "V400m-324689265"
>            },
>            "PaymentRequest": {
>                "SaleData": {
>                    "SaleTransactionID": {
>                        "TransactionID": "a1b2c3",
>                        "TimeStamp": "2020-06-16T16:13:16"
>                    }
>                },
>                "PaymentTransaction": {
>                    "AmountsReq": {
>                        "Currency": "EUR",
>                        "RequestedAmount": 10.99
>                    }
>                }
>            }
>        }
>    }
>    ```
>
> 2. Check the payment response for the [LoyaltyResult](https://docs.adyen.com/api-explorer/terminal-api/latest/post/payment#responses-200-LoyaltyResult).\
>    This is an array with your NFC enabled passes that are in the shopper's digital wallet. For each pass, there is a `LoyaltyAccount` object with:
>
>    | Property | Description |
>    | - | - |
>    | `LoyaltyAccountID.EntryMode` | Indicates how the NFC pass details were obtained. |
>    | `LoyaltyAccountID.IdentificationType` | **AccountNumber**. The type of ID of the shopper's pass. |
>    | `LoyaltyAccountID.LoyaltyID` | The unique ID of the shopper's pass. |
>    | `LoyaltyBrand` | The vendor protocol that the NFC pass is based on. |
>
>    If the response does not include a `LoyaltyResult`, the shopper has not added your NFC wallet pass to their mobile wallet yet.
>
>    **Payment response including LoyaltyResult**
>
>    ```json theme={null}
>    {
>        "SaleToPOIResponse": {
>            "PaymentResponse": {
>                "LoyaltyResult": [
>                    {
>                        "LoyaltyAccount": {
>                            "LoyaltyAccountID": {
>                                "EntryMode": [
>                                    "Contactless"
>                                ],
>                                "IdentificationType": "AccountNumber",
>                                "LoyaltyID": "rEqQFLnckxJ3jCvmQoLmBh"
>                            },
>                            "LoyaltyBrand": "pass.com.your-company.your-pass-name"
>                        }
>                    }
>                ],
>                "POIData": {
>                    "POIReconciliationID": "1000",
>                    "POITransactionID": {
>                        "TimeStamp": "2020-06-15T16:13:16.000Z",
>                        "TransactionID": "fanx001580400796015.NC6HT9CRT65ZGN82"
>                    },
>                    "POIReconciliationID": "1000"
>                },
>                "SaleData": {
>                    "SaleTransactionID": {
>                        "TimeStamp": "2020-06-15T16:13:16.000Z",
>                        "TransactionID": "a1b2c3"
>                    }
>                },
>                "PaymentReceipt": [...],
>                "PaymentResult": {
>                    "AuthenticationMethod": [
>                        "SecuredChannel"
>                    ],
>                    "OnlineFlag": true,
>                    "PaymentAcquirerData": {...},
>                        "MerchantID": "ADYEN_MERCHANT_ACCOUNT"
>                    },
>                    "PaymentInstrumentData": {
>                        "CardData": {
>                            "EntryMode": [
>                                "Contactless"
>                            ],
>                            "PaymentToken": {
>                                "TokenRequestedType": "Customer",
>                                "TokenValue": "G526627978654924"
>                            },
>                            "PaymentBrand": "visa",
>                            "MaskedPan": "481749 **** 1108",
>                            "CardCountryCode": "076",
>                            "SensitiveCardData": {
>                                "CardSeqNumb": "00",
>                                "ExpiryDate": "1223"
>                            }
>                        },
>                        "PaymentInstrumentType": "Card"
>                    },
>                    "AmountsResp": {
>                        "AuthorizedAmount": 10.99,
>                        "Currency": "EUR"
>                    }
>                },
>                "Response": {
>                    "Result": "Success",
>                    "AdditionalResponse": "..."
>                }
>            },
>            "MessageHeader": {...}
>        }
>    }
>    ```
>
> 3. Using the `LoyaltyID` and card alias returned in the response, look up the shopper in your pass server and loyalty program, and update the shopper's data. For example, the loyalty points accrued.
>
> ## Use the redeem flow
>
> In this flow you [check](#redeem-card-acquisition) whether the shopper has your NFC wallet pass in their wallet app before you start a payment. If the [shopper already has your pass](#redeem-pass-added), you can apply a discount or other advantages related to the pass. If the [shopper does not have your pass](#redeem-pass-not-added), you can issue a pass and add this data to your payment request. The shopper will receive a message that lets them add the pass to their wallet.
>
> ### Get the shopper's pass details
>
> 1. [Make a card acquisition request](https://adyen-preview.mintlify.site/point-of-sale/card-acquisition), including:
>
>    | Parameter | Description |
>    | - | - |
>    | `CardAcquisitionTransaction` | In the single-tap redeem flow, this object must contain: `TotalAmount`: The transaction amount.In the double-tap redeem flow, you can omit `TotalAmount` when you do not know the amount yet. Or you can also change the transaction amount later, in the payment request. |
>
>    **Card acquisition in the redeem flow**
>
>    ```json theme={null}
>    {
>        "SaleToPOIRequest":{
>            "MessageHeader":{
>                "ProtocolVersion":"3.0",
>                "MessageClass":"Service",
>                "MessageCategory":"CardAcquisition",
>                "MessageType":"Request",
>                "ServiceID":"0305Acq",
>                "SaleID":"POSSystemID12345",
>                "POIID":"V400m-346403161"
>            },
>            "CardAcquisitionRequest":{
>                "SaleData":{
>                    "SaleTransactionID":{
>                        "TransactionID":"422024",
>                        "TimeStamp":"2020-06-19T12:18:04"
>                    },
>                    "TokenRequestedType": "Customer"
>                },
>                "CardAcquisitionTransaction":{
>                    "TotalAmount": 14.98
>                }
>            }
>        }
>    }
>    ```
>
> 2. When you receive the card acquisition response, keep the `TimeStamp` and `TransactionID` from the `POIData.POITransactionID`. You need these details later in your payment request.
>
> 3. Check the card acquisition response for the [LoyaltyAccount](https://docs.adyen.com/api-explorer/terminal-api/latest/post/cardacquisition#responses-200-LoyaltyAccount).\
>    This is an array with your NFC enabled passes that are in the shopper's digital wallet. For each pass, the following details are provided:
>
>    | Property | Description |
>    | - | - |
>    | `LoyaltyAccountID.EntryMode` | Indicates how the NFC pass details were obtained. |
>    | `LoyaltyAccountID.IdentificationType` | **AccountNumber**. The type of ID of the shopper's pass. |
>    | `LoyaltyAccountID.LoyaltyID` | The unique ID of the shopper's pass. |
>    | `LoyaltyBrand` | The vendor protocol that the NFC pass is based on. |
>
>    If the response does not include a `LoyaltyAccount`, the shopper has not added your NFC wallet pass to their mobile wallet yet.
>
>    **Card acquisition response including LoyaltyAccount**
>
>    ```json theme={null}
>    {
>        "SaleToPOIResponse": {
>            "CardAcquisitionResponse": {
>                "LoyaltyAccount": [
>                    {
>                        "LoyaltyAccountID": {
>                            "EntryMode": [
>                                "Contactless"
>                            ],
>                            "IdentificationType": "AccountNumber",
>                            "LoyaltyID": "rEqQFLnckxJ3jCvmQoLmBh"
>                        },
>                        "LoyaltyBrand": "pass.com.your-company.your-pass-name"
>                    }
>                ],
>                "POIData": {
>                    "POIReconciliationID": "1000",
>                    "POITransactionID": {
>                        "TimeStamp": "2020-06-19T10:18:48.000Z",
>                        "TransactionID": "8ha5001592561928000"
>                    }
>                },
>                "SaleData": {
>                    "SaleTransactionID": {
>                        "TimeStamp": "2020-06-19T12:18:04.000Z",
>                        "TransactionID": "422024"
>                    }
>                },
>                "PaymentInstrumentData": {
>                    "CardData": {
>                        "PaymentBrand": "mc",
>                        "MaskedPan": "541333 **** 9999",
>                        "CardCountryCode": "528",
>                        "SensitiveCardData": {
>                            "ExpiryDate": "0228"
>                        }
>                    },
>                    "PaymentInstrumentType": "Card"
>                },
>                "Response": {
>                    "Result": "Success",
>                    "AdditionalResponse": "..."
>                }
>            },
>            "MessageHeader": {...}
>        }
>    }
>    ```
>
> 4. Go to the next step, depending on the case:
>
>    * [Case 1](#redeem-pass-added): The shopper already added your pass to their wallet.
>    * [Case 2](#redeem-pass-not-added): The shopper does not have your pass in their wallet yet.
>
> ### Case 1: The shopper has your pass
>
> 1. Using the `LoyaltyID` returned in the card acquisition response, look up the shopper in your pass server and loyalty program, and apply your business logic.\
>    For example:
>
>    * Make a [confirmation input request](https://adyen-preview.mintlify.site/point-of-sale/shopper-engagement/shopper-input/confirmation.md) to ask the shopper whether they want to redeem loyalty points.
>
>    * Add or recalculate loyalty points.
>
>    * Apply a discount.
>
>    * Recalculate the transaction amount.
>
> 2. [Make a payment request](https://adyen-preview.mintlify.site/point-of-sale/basic-tapi-integration/make-a-payment) with:\
>    []()
>
>    | Parameter | Description |
>    | - | - |
>    | `PaymentTransaction.AmountsReq` | An object with: `Currency`: The transaction [currency](https://adyen-preview.mintlify.site/development-resources/currency-codes.md). `RequestedAmount`: The final transaction amount. |
>    | `PaymentData.CardAcquisitionReference` | An object referencing the card acquisition: `TimeStamp`: The timestamp returned in the `POIData.POITransactionID` of the card acquisition response. `TransactionID`: The transaction ID returned in the `POIData.POITransactionID` of the card acquisition response. |
>
>    **Payment request in the redeem flow**
>
>    ```json theme={null}
>    {
>        "SaleToPOIRequest":{
>            "MessageHeader":{
>                "ProtocolVersion":"3.0",
>                "MessageClass":"Service",
>                "MessageCategory":"Payment",
>                "MessageType":"Request",
>                "ServiceID":"0305p",
>                "SaleID":"POSSystemID12345",
>                "POIID":"V400m-346403161"
>            },
>            "PaymentRequest":{
>                "SaleData":{
>                    "SaleTransactionID":{
>                        "TimeStamp": "2020-06-19T12:23:04.000Z",
>                        "TransactionID": "042208"
>                    },
>                    "TokenRequestedType": "Customer"
>                },
>                "PaymentTransaction":{
>                    "AmountsReq":{
>                        "Currency":"EUR",
>                        "RequestedAmount":14.48
>                    }
>                },
>                "PaymentData":{
>                    "CardAcquisitionReference":{
>                        "TimeStamp": "2020-06-19T10:21:27.000Z",
>                        "TransactionID": "8ha5001592562087001"
>                    }
>                }
>            }
>        }
>    }
>    ```
>
> 3. When you receive the payment response, note that:
>
>    * In the single-tap redeem flow, the payment response does not include the `LoyaltyResult` again.
>    * In the double-tap redeem flow, the payment response includes the `LoyaltyResult` with the same loyalty details as in the card acquisition response.
>
>    **Payment response - Double-tap redeem flow**
>
>    ```json theme={null}
>    {
>        "SaleToPOIResponse": {
>            "PaymentResponse": {
>                "LoyaltyResult": [
>                    {
>                        "LoyaltyAccount": {
>                            "LoyaltyAccountID": {
>                                "IdentificationType": "AccountNumber",
>                                "EntryMode": [
>                                    "Contactless"
>                                ],
>                                "LoyaltyID": "rEqQFLnckxJ3jCvmQoLmBh"
>                            },
>                            "LoyaltyBrand": "pass.com.your-company.your-pass-name"
>                        }
>                    }
>                ],
>                "POIData": {
>                    "POITransactionID": {
>                        "TimeStamp": "2020-06-19T10:24:03.000Z",
>                        "TransactionID": "8ha5001592562087001.KHQC5N7G84BLNK43"
>                    },
>                    "POIReconciliationID": "1000"
>                },
>                "SaleData": {
>                    "SaleTransactionID": {
>                        "TimeStamp": "2020-06-19T12:23:04.000Z",
>                        "TransactionID": "042208"
>                    }
>                },
>                "PaymentReceipt": [...],
>                "PaymentResult": {
>                    "OnlineFlag": true,
>                    "PaymentAcquirerData": {...},
>                        "MerchantID": "ADYEN_MERCHANT_ACCOUNT"
>                    },
>                    "PaymentInstrumentData": {
>                        "CardData": {
>                            "EntryMode": [
>                                "Contactless"
>                            ],
>                            "PaymentBrand": "mc",
>                            "MaskedPan": "541333 **** 9999",
>                            "CardCountryCode": "056",
>                            "SensitiveCardData": {
>                                "CardSeqNumb": "83",
>                                "ExpiryDate": "0228"
>                            }
>                        },
>                        "PaymentInstrumentType": "Card"
>                    },
>                    "AmountsResp": {
>                        "AuthorizedAmount": 14.48,
>                        "Currency": "EUR"
>                    },
>                },
>                "Response": {
>                    "Result": "Success",
>                    "AdditionalResponse": "...&alias=M469509594859802&...recurring.shopperReference=YOUR_UNIQUE_SHOPPER_ID&...shopperReference=YOUR_UNIQUE_SHOPPER_ID&shopperEmail=S.Hopper%40example.com&..."
>                }
>            },
>            "MessageHeader": {...}
>        }
>    }
>    ```
>
> ### Case 2: The shopper does not have your pass
>
> If the card acquisition response indicates the shopper does not have your NFC wallet pass in their mobile wallet, you check whether they are enrolled in your loyalty program. If they are (or if you enroll them on the spot) you can issue a pass and add the pass details to your payment request. This will send a message to the shopper's device so that they can easily add your pass to their wallet.
>
> 1. Check whether the shopper is enrolled in your loyalty program. Depending on how you have set up your loyalty program, you can:
>
>    * Check the `AdditionalResponse` in the card acquisition response for a `shopperReference`. If this is present, you already have the shopper on record. (See the [shopper loyalty use case](https://adyen-preview.mintlify.site/point-of-sale/loyalty).)
>
>    * Or ask the shopper whether they are enrolled. If yes, ask them for their membership number or similar. You can use [input requests](https://adyen-preview.mintlify.site/point-of-sale/shopper-engagement/shopper-input) to gather this information, or let your staff enter the information in your POS app.
>
>    If the shopper is already enrolled, skip to [issuing a pass (step 4)](#issue-pass).
>
> 2. If the shopper is not enrolled in your loyalty program yet, ask the shopper whether they want to enroll.
>
>    * If the shopper does not want to enroll, make a payment request with a reference to the card acquisition. This is the same [payment request from Case 1](#case-1-payment-request), only the response won't include a `LoyaltyResult`. The flow ends.
>
>    * If the shopper wants to enroll, continue with the next step.
>
> 3. To enroll the shopper in your loyalty program on the spot:
>
>    * Collect shopper details like their email address. You can use [input requests](https://adyen-preview.mintlify.site/point-of-sale/shopper-engagement/shopper-input) to gather this information, or let your staff enter the information in your POS app.
>
>    * Create a customer profile for the shopper in your loyalty program and pass server with the information you collected.
>
>    You now have a customer profile for the shopper, either because it already existed or because you just created it.
>
> 4. []()Using the `shopperReference` from the card acquisition response or some other reference, find the shopper's customer profile in your pass server. Then generate a unique pass identifier for the shopper.
>
> 5. [Make a payment request](https://adyen-preview.mintlify.site/point-of-sale/basic-tapi-integration/make-a-payment) with:
>
>    | Parameter | Description |
>    | - | - |
>    | `PaymentTransaction.AmountsReq` | An object with: `Currency`: The transaction [currency](https://adyen-preview.mintlify.site/development-resources/currency-codes.md). `RequestedAmount`: The final transaction amount. |
>    | `PaymentData.CardAcquisitionReference` | An object referencing the card acquisition: `TimeStamp`: The timestamp returned in the `POIData.POITransactionID` of the card acquisition response. `TransactionID`: The transaction ID returned in the `POIData.POITransactionID` of the card acquisition response. |
>    | `LoyaltyData` | An array with a `LoyaltyAccountID` object for each of your NFC wallet passes. This lets the shopper add your NFC wallet pass to their digital wallet. Each `LoyaltyAccountID` object contains: `EntryMode`: **Mobile** `IdentificationType`: **AccountNumber**. `LoyaltyID`: the unique identifier of the shopper's new pass. If in your Customer Area you [configured](#enrollment) the URL where people can get your pass, only specify the pass ID. For example: **oGvXzNSwEeQgZYVfZPU4pu** If you didn't configure the URL of your pass, specify the URL appended with the pass ID. For example: **`https://uc.seamless-checkout.net/getWallet/oGvXzNSwEeQgZYVfZPU4pu`** |
>    | `SaleData.SaleToAcquirerData` | Optional. When you are enrolling the shopper in your loyalty program on the spot, use this parameter to create shopper identifiers and receive them in card acquisition and payment responses.See the [instructions below](#sale-to-acquirer-data). |
>
>    For a newly enrolled shopper, you can include the following in `SaleData.SaleToAcquirerData`:\
>    []()
>
>    * `shopperEmail`: The shopper's email address, if you collected that.
>
>    * `shopperReference`: Your unique reference for this shopper. Minimum length: three characters. Note that the value is case-sensitive. Do not include personally identifiable information (PII), such as name or email address.
>
>    Pass the `SaleToAcquirerData` value in one of the following formats:
>
>    * Option 1: a JSON object converted to a Base64 encoded string. Refer to [Add information to a payment](https://adyen-preview.mintlify.site/point-of-sale/add-data#base64-json).
>    * Option 2: form-encoded key-value pairs (using **&** as a separator). For example:\
>      `shopperEmail=S.Hopper@example.com&shopperReference=12345`
>
>    The format that you use here, will also be the format of the `AdditionalResponse` that you receive.
>
>    The following example shows how to make a payment for a shopper who is already enrolled in your loyalty program but does not have your NFC wallet pass yet.
>
>    **Issue a pass through a payment request**
>
>    ```json theme={null}
>    {
>        "SaleToPOIRequest":{
>            "MessageHeader":{
>                "ProtocolVersion":"3.0",
>                "MessageClass":"Service",
>                "MessageCategory":"Payment",
>                "MessageType":"Request",
>                "ServiceID":"0305p",
>                "SaleID":"POSSystemID12345",
>                "POIID":"V400m-346403161"
>            },
>            "PaymentRequest":{
>                "LoyaltyData": [
>                    {
>                        "LoyaltyAccountID": {
>                            "EntryMode" : [
>                                "Mobile"
>                            ],
>                            "IdentificationType": "AccountNumber",
>                            "LoyaltyID": "oGvXzNSwEeQgZYVfZPU4pu"
>                        }
>                    }
>                ],
>                "SaleData":{
>                    "SaleTransactionID":{
>                        "TimeStamp": "2020-06-19T12:23:04.000Z",
>                        "TransactionID": "042208"
>                    },
>                },
>                "PaymentTransaction":{
>                    "AmountsReq":{
>                        "Currency":"EUR",
>                        "RequestedAmount":14.48
>                    }
>                },
>                "PaymentData":{
>                    "CardAcquisitionReference":{
>                        "TimeStamp": "2020-06-19T10:21:27.000Z",
>                        "TransactionID": "8ha5001592562087001"
>                    }
>                }
>            }
>        }
>    }
>    ```
>
> 6. The shopper receives a message on their device that lets them add your pass to their wallet.
>
> ## Overriding the configured flow
>
> There can be situations when you want to use a different flow than the flow configured in your Customer Area.
>
> To specify the flow for an individual transaction:
>
> 1. Create a `VASModeOverride` JSON object and convert the JSON object to a Base64-encoded string.
>
>    | Parameter | Description |
>    | - | - |
>    | `VASModeOverride` | An object that specifies the flow to use: - `VASModeVASAndPayment`: collect both the NFC wallet pass details and the payment method details. - `VASModeVASOrPayment`: let the shopper collect the NFC wallet pass details. - `VASModeVASOnly`: only collect the NFC wallet pass details. - `VASModePaymentOnly`: only collect the payment method details. |
>
>    For example, create the JSON object `{"VASModeOverride": "VASModePaymentOnly"}`. When you encode that to Base64, the resulting string is `eyJWQVNNb2RlT3ZlcnJpZGUiOiAiVkFTTW9kZVBheW1lbnRPbmx5In0=`.
>
> 2. Make a [card acquisition request](https://adyen-preview.mintlify.site/point-of-sale/card-acquisition) or a [payment request](https://adyen-preview.mintlify.site/point-of-sale/basic-tapi-integration/make-a-payment) passing the Base64-encoded `VASModeOverride` JSON object inside `SaleData.SaleToPOIData`.
>
>    **Card acquisition request**
>
>    ```json theme={null}
>    {
>        "SaleToPOIRequest":{
>            "MessageHeader":{
>                "ProtocolVersion":"3.0",
>                "MessageClass":"Service",
>                "MessageCategory":"CardAcquisition",
>                "MessageType":"Request",
>                "ServiceID":"0305Acq",
>                "SaleID":"POSSystemID12345",
>                "POIID":"V400m-346403161"
>            },
>            "CardAcquisitionRequest":{
>                "SaleData":{
>                    "SaleTransactionID":{
>                        "TransactionID":"422024",
>                        "TimeStamp":"2021-05-07T12:12:34.000Z"
>                    },
>                    "SaleToPOIData":"eyJWQVNNb2RlT3ZlcnJpZGUiOiAiVkFTTW9kZVBheW1lbnRPbmx5In0=",
>                    "TokenRequestedType":"Customer"
>                },
>                "CardAcquisitionTransaction":{
>                    "TotalAmount": 14.98
>                }
>            }
>        }
>    }
>    ```
>
>    Depending on the `VASModeOverride` option, the response includes NFC wallet pass details and/or the payment method details.
>
> ## See also
>
> * [Shopper loyalty](https://adyen-preview.mintlify.site/point-of-sale/loyalty)
> * [Card acquisition](https://adyen-preview.mintlify.site/point-of-sale/card-acquisition)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.