Omnichannel icon

Buy online, pick up in store

Click and collect: Buy online and pick up in a store, and purchase less or more items.

In this click-and-collect retail use case, items are paid online. When the items are picked up at a brick-and-mortar store, last minute changes can be made: purchased but unwanted items can be refunded, and additional items can be bought at pickup.

Requirements

Before you begin, take into account the following information.

Requirement Description
Integration type You must have both an ecommerce integration and a point-of-sale integration with Adyen.
Your systems It is essential to have (or create) a consolidated order/inventory management or ERP system. Or alternatively, you must have an orchestration layer that communicates with your various sub-systems and can consume webhook messages. This is because your POS system needs to be able to update the online inventory in case of a pickup, sale, or return.
Preparation We recommend familiarizing yourself with specific concepts so that you can make informed decisions about integration choices. See Considerations for details.

Shopper journey

From the shopper's perspective, this click-and-collect use case is as follows.

On the ecommerce site, the shopper logs in to their profile (if they have one), selects some items, and pays. The shopper indicates they want to pick up the items in-person at a store location. The shopper selects a location, and indicates how they want to identify themselves when they pick up the items: using the same card that was used for the online payment, or using their customer profile. If necessary, the shopper enters the details to create a profile.

At the store, the shopper identifies themselves using the chosen method, either:

  • At the terminal in the store, the shopper presents (taps) the same card that was used for the online payment.
  • The shopper answers questions about identifying data that are included in the shopper's profile, such as name and telephone number.

Store personnel retrieves the purchased items. The shopper can then decide they do not want one or more of the items and get a refund, or buy additional items from the store.

The following diagram illustrates this shopper journey.

CmdyYXBoIExSCiAgICBBKChCdXkgb25saW5lKSk6OjpzdGVwU3R5bGUgLS0+IEJ7Q2hvb3NlPGJyPnBpY2t1cDxicj5vcHRpb259Ojo6c3RlcFN0eWxlCiAgICBCIC0tIENhcmQgLS0+IEMxW0F0IHBpY2t1cDogSWRlbnRpZnkgPGJyPnRocm91Z2ggcGF5bWVudCBjYXJkXTo6OnN0ZXBTdHlsZQogICAgQiAtLSBQcm9maWxlIC0tPiBDMltBdCBwaWNrdXA6IElkZW50aWZ5IDxicj50aHJvdWdoIHByb2ZpbGVdOjo6c3RlcFN0eWxlCiAgICBDMSAtLT4gRHtEcm9wIG9yPGJyPmFkZCBpdGVtcz99Ojo6c3RlcFN0eWxlCiAgICBDMiAtLT4gRHtEcm9wIG9yPGJyPmFkZCBpdGVtcz99Ojo6c3RlcFN0eWxlCiAgICBEIC0tIFllcyAtLT4gRSgoUmVmdW5kL1BheTxicj5hdCB0ZXJtaW5hbCkpOjo6c3RlcFN0eWxlCiAgICBEIC0tIE5vIC0tPiBGKChFbmQpKTo6OmZpbmFsU3R5bGUKICAgIEUgLS0+IEYoKFJlY2VpdmUgaXRlbXM8YnI+YXQgcGlja3VwKSk6OjpmaW5hbFN0eWxlCgolJSBTdHlsZXMKICAgIGNsYXNzRGVmIHRvcFN0eWxlIGZpbGw6IzAwMCxzdHJva2U6IzAwMCxjb2xvcjojZmZmCiAgICBjbGFzc0RlZiBjYXRlZ29yeVN0eWxlIGZpbGw6IzQ0NCxzdHJva2U6IzMzMyxjb2xvcjojZmZmCiAgICBjbGFzc0RlZiBzdGVwU3R5bGUgZmlsbDojZmZmLHN0cm9rZTojMGFiZjUzLHN0cm9rZS13aWR0aDoycHgsY29sb3I6IzAwMAogICAgY2xhc3NEZWYgZmluYWxTdHlsZSBmaWxsOiMwYWJmNTMsc3Ryb2tlOiMwNzhkM2UsY29sb3I6IzAwMAo=

Considerations

Before you set up a flow for this use case, there are a couple of points that you must be aware of or make a decision on.

Capture settings

You can capture the online payment immediately, or delay capture until the shopper picks up the items. We recommend capturing immediately. If you delay capture, the authorization can expire before pickup. Authorization validity periods vary per card scheme.

Reference:
Capture, Authorization validity periods

Shopper attribution

You need to decide beforehand on how you will attribute the sale: If an item is purchased online and picked up in-store, is this an in-store sale or an ecommerce sale?

Shopper identification

In general, to be able to identify the shopper at pickup based on data that you saved at the time of payment, you must consider data privacy. Always ask for explicit permission when you save the shopper's details for the first time.

Reference:
Customer data and privacy

In this use case, you identify shoppers using card recognition, or using customer profile details. Be aware that you need to implement both methods. The reason for this is that card recognition is only possible if a card or NFC wallet was used to make the ecommerce payment. Card recognition is not possible when the ecommerce payment is made with a QR code wallet (like PayPal), Buy Now Pay Later payment method (like Klarna), or other alternative payment method (like iDEAL/Wero).

We strongly recommend storing the card alias and the Payment Account Reference (PAR) in the shopper's profile. This lets you offer both recognition methods for the same shopper.

Reference:
Card recognition

To use card recognition as a way to identify the shopper at pickup, you must enable receiving shopper identifying data in API responses and webhook messages.

Reference:
Receive identifiers in webhooks and Receive identifiers in Terminal API responses

Card acquisition

Card recognition is based on a "card acquisition" request: the shopper presents their card or other payment instrument to the payment terminal, and the response returns details that you can use to look up the shopper in your system. Make sure you are familiar with card acquisition and the shopper identifiers that this operation returns.

Reference:
Card acquisition

Refund type

If at pickup the shopper does not want an item, you need to issue a (partial) referenced refund. A referenced refund uses the PSP reference to link to the original authorization. You need to decide which API you prefer to use:

  • Terminal API: You send a reversal request to the terminal. The terminal prints a receipt. You can refund from a different terminal or even a different merchant account.
  • Checkout API: You send a refund request to the Checkout API. The terminal does not print a receipt.

Reference:
Terminal API refund of an ecommerce payment or Checkout API refund

API flow

There are several Adyen API requests involved in the described shopper journey, as shown in the following diagram.

CnNlcXVlbmNlRGlhZ3JhbQogICAgcGFydGljaXBhbnQgU2hvcHBlcgogICAgcGFydGljaXBhbnQgRWNvbQogICAgcGFydGljaXBhbnQgRVJQCiAgICBwYXJ0aWNpcGFudCBQT1MKICAgIHBhcnRpY2lwYW50IEFkeWVuCgogICAgU2hvcHBlci0+PkVjb206IEJ1eSBvbmxpbmUKICAgIEVjb20tPj5BZHllbjogQ2hlY2tvdXQgQVBJIHBheW1lbnQgcmVxdWVzdAogICAgQWR5ZW4tPj5FY29tOiBQYXltZW50IHJlc3BvbnNlCiAgICBub3RlIG92ZXIgQWR5ZW4sIEVjb206IEF1dG9tYXRpYyBvciBtYW51YWwgY2FwdHVyZQogICAgU2hvcHBlci0+PkVjb206IENob29zZSBwaWNrdXAgb3B0aW9uOiBjYXJkIG9yIHByb2ZpbGUKICAgIEVjb20tPj5FUlA6IFNhdmUgc2hvcHBlciBkYXRhIGZyb20gY2FyZCBvciBwcm9maWxlCiAgICBTaG9wcGVyL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The next section, "Instructions", provides more details about the API flow.

Instructions

This section provides high-level instructions focusing on how to use the Adyen APIs and webhooks in the described shopper journey.

The code samples show the minimally required parameters. You can add more parameters.

Online purchase

If the shopper selected an option on your checkout to pick up their purchase at a (specific) physical location:

  1. Make a Checkout API payment request and handle any additional action to complete the authorization.

    Reference:
    Online payments > Build your integration.

  2. If the resultCode from the API response shows the payment is authorized, present an option on your checkout to let the shopper choose an identification method at the pickup location: through the card they used for the purchase, or through personal details.

  3. If the shopper selected personal details as identification method, present a form to let the shopper enter identifying details such as name, phone number, and address. Securely save the entered details in your system.

  4. If the shopper selected card as identification method, securely save the following details when you get the outcome of the payment in the AUTHORISATION webhook message:

    • additionalData.alias: The card alias uniquely represents the shopper's card number (PAN). This enables you to recognize the card that a shopper is using. You cannot use the card alias for making payments. For NFC wallet transactions, the card alias is not available.
    • additionalData.PaymentAccountReference: The payment account reference (PAR) represents the payment account that the card and/or NFC wallet is linked to. It solves the issue with the PAN and alias not being available for NFC wallet transactions. Using the PAR, you can recognize the shopper.
  5. Regardless of identification method, from the AUTHORISATION webhook message also save the following details. You will need these details to find the order in your system. You also need these details in case you want to make a referenced refund request when the shopper returns items at pickup.

    • pspReference: The Adyen-generated unique reference for the transaction.
    • amount: The currency and value of the transaction.

In-store pickup

When the shopper comes to the pickup location:

  1. If you need to identify the shopper based on the card that was used to pay for the online purchase:

    1. Make a Terminal API CardAcquisitionRequest with an empty CardAcquisitionTransaction object.

      Reference:
      Card acquisition

    2. When you receive the CardAcquisitionResponse, get the following information from the response.AdditionalResponse:

      • PaymentAccountReference: the PAR, if present.
      • alias: the card alias

      The following example shows the AdditionalResponse as a string of key-value pairs concatenated with an ampersand (&). It is possible you receive a Base64-encoded string instead, which you need to Base64 decode first.

    3. Finish the card acquisition by making an EnableServiceRequest to stop the flow.
      Consider including a DisplayOutput object with an explanatory message for the shopper, as shown in the following example.

      Reference:
      Finish with a cancellation

  2. If you need to identify the shopper based on profile data, collect certain details like name and phone number. You can do this in the various ways, for example:

    • The shop assistant asks the shopper for the details.
    • You collect the shopper's details on a secondary screen, for instance a tablet.
    • You use input requests to collect the shopper's details on the payment terminal.

  3. Ensure your store staff is able to look up the shopper and the purchased items in your system using either the PAR or card alias from the card acquisition response, or the profile data that the shopper provided. Store staff then hands over the items to the shopper.

  4. If the shopper does not want one or more of the purchased items, issue a referenced refund using the Terminal API or the Checkout API.

  5. If the shopper has added some items from the store to their basket, make a Terminal API PaymentRequest.

    Reference:
    Make a payment

See also