Search

Are you looking for test card numbers?

Would you like to contact support?

Online-payment icon

Pay by Link

Accept payments using an Adyen-hosted payment page.

Discover more use cases

Read how Australian retailer Incu uses Pay by Link for social selling.

Also check out our blog to learn more about how you can use payment links to support contextual commerce.

With Pay by Link, you can start accepting payments using a payment link. The link takes your shopper to a secure, Adyen-hosted payment page where they can pay with their preferred payment method.

Pay by Link enables you to:

Use Pay by Link if you don't want to host your own payment form, if you're still building your website or app, or as an alternative way to reach your shoppers (in combination with your existing Adyen integration). Pay by Link is also ideal if you accept orders through other channels, such as through email, a call center, or on social media.

How it works

When a shopper places an order, you create a payment link by providing payment information such as amount, currency, and country. Adyen takes these payment information to tailor the available payment methods for your shopper. Next, you send the payment link to your shopper through email or chat. When the shopper selects the link, they see the payment page with all the available payment methods. After the shopper selects a payment method and completes the payment, you receive the payment result through a notification webhook.

Link expiry and reusability

By default, payment links expire after 24 hours. You can extend the expiry of the payment link to a maximum of 30 days from the time you create it.

By default, payment links can only be used to make one successful payment. After your shopper makes a successful payment, anyone accessing the same link will see a You have already paid message. For some use cases, you might want to override the default behavior so that you can give out the same link to multiple shoppers (for example, when accepting donations).

You can override the default payment link expiry and non-reusability when you create the links.

Before you begin

  1. If you haven't done so already, follow our Get started guide to set up your test account.
  2. Check that you have the required roles in your Customer Area.

    1. Log in to your Customer Area.
    2. Navigate to Account > Users, and check if your user has the roles below (depending on how you want to create payment links).

      Create payment links  using Requirements
      Customer Area 1. Checkout webservice role for your ws@Company.[YourCompanyAccount] web service user.
      2. Pay by Link Interface role for your Customer Area user: Ask your Admin user to enable this role. If this is not available for your Admin user, contact our Support Team.
      API 1. Checkout webservice role for your ws@Company.[YourCompanyAccount] web service user or any other web service user that you will use to make API calls.
      2. API key: If you don't have an API key yet, refer to Get your API key. You can also use our libraries to connect to our Pay by Link API.

  3. Make sure that you have added payment methods to your test merchant account. If you haven't done so already, add them to your test Customer Area.

    1. Log in to your Customer Area.
    2. Switch to your merchant account.
    3. Go to Account > Payment methods.
    4. Select Add payment methods.
    5. Start entering the name of the payment method, then select it from the drop-down list.
    6. Select Submit.

    Some payment methods are only supported when you create payment links through our API. For more information, refer to Supported payment methods.

Choose how you want to create payment links. You can do this:

  • Using Customer Area. This requires no development work. You can view the status of payment links within Customer Area, and get payment notifications sent to your email.
  • Using Pay by Link API. With the API, you can support additional use cases such as:
    • Tokenizing your shopper's card details for future one-off payments and subscriptions.
    • Showing your shopper's saved card details.
    • Offering open invoice (buy now, pay later) payment methods.

To create payment links using Customer Area:

  1. Log in to you Customer Area.
  2. Switch to your merchant account.
  3. Select Transactions. Under Actions, select Create payment link.
  4. Fill out the form with the payment information, specifying the following under Transaction details:

    Field name Required Description
    Merchant reference -white_check_mark- Your order number. You can use this to identify and reconcile the payment in your own system.
    Shopper country -white_check_mark- We use this to tailor the list of payment methods available to your shopper.
    Amount -white_check_mark- Payment currency and value.
    Description Describe what the shopper is paying for. This description will be visible on the Pay By Link page.
    Link validity Select the validity period of the payment link. This can be a maximum of 30 days from the time you create the link. 24 hours is selected by default.
    Link type Select if you want the link to be Single use or Open (for multiple payments). Single use is selected by default.

    You can also include other optional information about your shopper under Additional details:

    Field name Description
    Shopper reference Your unique identifier for this shopper.
    Shopper email Your shopper'e email address.
    Billing address Your shopper's billing address.
    Delivery address Your shopper's delivery address.

  1. The next page confirms if the payment link has been successfully created. Select Copy payment link.

    Below is an example payment link.

    https://checkoutshopper-test.adyen.com/checkoutshopper/payByLink.shtml?d=PLFA45PD35E1E75KBE
  2. Send the payment link to your shopper. When the shopper selects the link, they are redirected to the Adyen-hosted payment form. The shoppers are presented with all the payment methods available in the Shopper country you provided in the form.

  3. After the shopper completes the payment, you can check the payment result in your Customer Area, under TransactionsPayments.

    You can also configure your account to get payment status updates sent to your email. To do this:

    1. Log in to your Customer Area.
    2. Switch to your merchant account.
    3. Select Account. Under Configure, select Pay by Link.
    4. Select Settings.
    5. Provide an email address under Email notifications.

    When email notifications are configured, you receive an email informing you that the payment has been completed, along with the following:

    • Merchant reference
    • Amount
    • Description
    • PSP reference: Our unique identifier for the payment.

    Alternatively, you can set up notification webhooks to get payment updates sent to your server. This requires development work.

Now that you can create payment links and check payment results in Customer Area, learn how you can manage payment links.


  1. To create a payment link, make POST /paymentLinks request specifying your merchantAccount, your own reference for the transaction, and amount.

    In your request, you can also include parameters to configure the payment page such as the description shown in the payment page, the language (shopperLocale), and the payment link's expiry date (expiresAt).

    In this example, we'll show you how you can create a payment link for a shopper in the Netherlands for a purchase amount of 42 EUR:

    Create a payment link
    curl https://checkout-test.adyen.com/v52/paymentLinks \
    -H "x-API-key: YOUR_X-API-KEY" \
    -H "content-type: application/json" \
    -d '{
      "reference": "YOUR_PAYMENT_REFERENCE",
      "amount": {
        "value": 4200,
        "currency": "EUR"
      },
      "shopperReference": "UNIQUE_SHOPPER_ID_6728",
      "description": "Blue Bag - ModelM671",
      "countryCode": "NL",
      "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
      "shopperLocale": "nl_NL"
    }'

    You receive a response containing the following:

    • url: The payment link that you should send to your shopper. The payment link identifier is appended as the URL parameter. For this example, the payment link ID is PLFA45PD35E1E75KBE.
    • expiresAt: Date and time when the payment link expires. If not specified in the request, the value is set by default to 24 hours after you create the link.
    Response
    {
        "amount": {
            "currency": "EUR",
            "value": 4200
        },
        "expiresAt": "2020-06-23T12:25:28Z",
        "reference": "YOUR_ORDER_NUMBER",
        "url": "https://checkoutshopper-test.adyen.com/checkoutshopper/payByLink.shtml?d=PLFA45PD35E1E75KBE"
    }
  2. Send the url to your shopper. When they select the link, they will be redirected to an Adyen-hosted payment page. The shoppers are presented with the payment methods available for the amount and countryCode that you specified in the request.

  1. When the shopper completes the payment, Adyen sends the payment result in an AUTHORISATION notification webhook. To keep track of the payments, make sure that your server can process and accept notifications.

    The AUTHORISATION notification contains:

    • additionalData.paymentLinkId: Use this to match the payment to the payment link. For our example, this matches the payment link ID PLFA45PD35E1E75KBE.
    • pspReference: Unique identifier for the payment.
    • success: This field contains the result of the transaction.

      success field Description Action to take
      false The shopper attempted to pay but the transaction failed. The payment page informs the shopper that the payment was unsuccessful, and prompts them to try again. However, if the shopper still doesn't make a successful payment, you may want to reach out to them to follow up.
      true The shopper successfully completed the payment. Inform the shopper that the payment has been successful, and proceed with the order.
    AUTHORISATION notification
    {
    "live":"false",
    "notificationItems":[
       {
          "NotificationRequestItem":{
             "additionalData":{
                ...
                "paymentLinkId":"PLFA45PD35E1E75KBE"
             },
             "amount":{
                "currency":"EUR",
                "value":4200
             },
             ...
             "eventCode":"AUTHORISATION",
             "merchantAccountCode":"YOUR_MERCHANT_ACCOUNT",
             "merchantReference":"YOUR_ORDER_NUMBER",
             "pspReference":"852593065346377D",
             "success":"true"
          }
       }
    ]
    }

Now that you can create payment links and check payment results, proceed to the next sections for examples of how you can create payment links for different use cases.

More examples using the API

Reusable payment links

In some cases, you might want to create a reusable link. For example, if you want to accept donations for a fixed amount from multiple shoppers, or sell event tickets. To do this, set reusable to true in your POST /paymentLinks request.

The example below shows how you would create a reusable payment link to accept donations with an amount of 8.50 USD from shoppers in the United States:

Create a reusable payment link
curl https://checkout-test.adyen.com/v52/paymentLinks \
-H "x-API-key: YOUR_X-API-KEY" \
-H "content-type: application/json" \
-d '{
  "reference": "YOUR_PAYMENT_REFERENCE",
  "amount": {
    "value": 850,
    "currency": "USD"
  },
  "description": "Donation",
  "countryCode": "US",
  "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
  "shopperLocale": "en_US",
  "reusable" : true
}'

Tokenize for future one-off payments

You should always ask for your customer's consent before tokenizing their card for future payments.

  1. To use Pay by Link to save and tokenize your shopper's card details for future one-off payments, make sure that in your POST /paymentLinks request, you send:

    Here's an example of how you can create a payment link for a shopper with shopperReference ShopperID-A16728.

    Create a payment link to save card details
    curl https://checkout-test.adyen.com/v52/paymentLinks \
    -H "x-API-key: YOUR_X-API-KEY" \
    -H "content-type: application/json" \
    -d '{
      "reference": "YOUR_PAYMENT_REFERENCE",
      "amount": {
        "value": 4250,
        "currency": "EUR"
      },
      "shopperReference": "ShopperID-A16728",
      "recurringProcessingModel": "CardOnFile",
      "description": "Black sneakers - X51",
      "countryCode": "NL",
      "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
      "shopperLocale": "nl_NL",
      "storePaymentMethod": true
    }'

    The shopper's card details will be tokenized after they make a successful payment.

  1. When the shopper returns for their next payment, send the same shopperReference from the first request, and set recurringProcessingModel to CardOnFile in your POST /paymentLinks request.

    Here's an example of how you can create a payment link for the same shopper with shopperReference ShopperID-A16728.

    Create a payment link that shows card details
    curl https://checkout-test.adyen.com/v52/paymentLinks \
    -H "x-API-key: YOUR_X-API-KEY" \
    -H "content-type: application/json" \
    -d '{
      "reference": "YOUR_PAYMENT_REFERENCE",
      "amount": {
        "value": 4250,
        "currency": "EUR"
      },
      "shopperReference": "ShopperID-A16728",
      "recurringProcessingModel": "CardOnFile",
      "description": "Blue backpack - BK11",
      "countryCode": "NL",
      "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
      "shopperLocale": "nl_NL"
    }'

Tokenize payment details for subscriptions

  1. To use Pay by Link to save and tokenize your shopper's card details for subscriptions, make sure that in your POST /paymentLinks request, you send:

    Send the payment amount, or if you only want to tokenize the shopper's payment details without charging them, set the amount.value to 0. This is called a zero-value authorisation. Instead of a Pay button, your shoppers will see a Confirm preathorization button on the payment page.

    Here is an example of how you can create a payment link to tokenize and start a subscription for a shopper with shopperReference Shopper-B7183.

    Create a payment link to tokenize for subscription
    curl https://checkout-test.adyen.com/v52/paymentLinks \
    -H "x-API-key: YOUR_X-API-KEY" \
    -H "content-type: application/json" \
    -d '{
      "reference": "YOUR_PAYMENT_REFERENCE",
      "amount": {
        "value": 0,
        "currency": "EUR"
      },
      "shopperReference": "Shopper-B7183",
      "description": "Coffee Subscription",
      "countryCode": "NL",
      "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
      "shopperLocale": "nl_NL",
      "storePaymentMethod": true
    }'
  2. After the shopper completes the payment or the preauthorization, make a POST /paymentMethods request to get the token for the shopper's saved payment details.

  3. Make subsequent subscription payments using the token in a POST /payments request.

Customize the list of payment methods

To limit the list of payment methods presented to your shopper, you can specify either:

Here is an example of how you can create a payment link that only allows the shopper to pay with iDEAL or card:

Create a payment link with customized list of payment methods
curl https://checkout-test.adyen.com/v52/paymentLinks \
-H "x-API-key: YOUR_X-API-KEY" \
-H "content-type: application/json" \
-d '{
  "allowedPaymentMethods": ["ideal","scheme"],
  "reference": "YOUR_PAYMENT_REFERENCE",
  "amount": {
    "value": 1000,
    "currency": "EUR"
  },
  "countryCode": "NL",
  "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
  "shopperLocale": "nl_NL",
}'

Provide additional information

Some payment methods, such as open invoice payment methods, require additional information about the payment being made. To make sure that a payment is processed when shoppers select any of these payment methods, make sure that you collect the following additional information and send these in your POST /paymentLinks request:

Payment method Required objects
3x 4x Oney (FR, ES) lineItems

Note: Other shopper information such as shopper name and email are collected on the payment page.
AfterPay (NL, BE) lineItems

Note: Other shopper information such as shopper name and email are collected on the payment page.
AfterPay Touch (AU, NZ) shopperEmail, shopperName, deliveryAddress, billingAddress, lineItems
Klarna (AT, DK, FI,
DE, NO, SE, CH,
NL, GB, US)
shopperEmail, shopperName, billingAddress, lineItems
Zip (AU) shopperEmail, shopperName, deliveryAddress, billingAddress, lineItems

For example, here is how you would create a payment link that can support Klarna for a shopper based in Sweden making a 125.00 SEK purchase.

Create payment link with additional shopper information
curl https://checkout-test.adyen.com/v52/paymentLinks \
-H "x-API-key: YOUR_X-API-KEY" \
-H "content-type: application/json" \
-d '{
  "reference": "YOUR_ORDER_NUMBER",
  "amount": {
    "value": 12500,
    "currency": "SEK"
  },
  "description": "Green backpack - 671L",
  "countryCode": "SE",
  "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
  "shopperReference": "YOUR_UNIQUE_SHOPPER_ID",
  "shopperEmail": "test@email.com",
  "shopperLocale": "en-US",
  "billingAddress":{
      "city":"Ankeborg",
      "country":"SE",
      "houseNumberOrName":"1",
      "postalCode":"12345",
      "street":"Stargatan"
   },
   "lineItems":[
      {
         "quantity":"1",
         "amountExcludingTax":"331",
         "taxPercentage":"2100",
         "description":"Shoes",
         "id":"Item #1",
         "taxAmount":"69",
         "amountIncludingTax":"400"
      },
      {
         "quantity":"2",
         "amountExcludingTax":"248",
         "taxPercentage":"2100",
         "description":"Socks",
         "id":"Item #2",
         "taxAmount":"52",
         "amountIncludingTax":"300"
      }
   ]
}'

If the shopper selects to pay with Klarna, Adyen passes along the required information to Klarna.

Manage payment links

Get the payment link details and track its status—paid, expired, or active—so you can follow up with your shopper if needed. To do this, you can use the GET /paymentLinks/{id} endpoint or if you're only creating links using Customer Area, you can alternatively view these links within Customer Area.

To get the details, send a GET /paymentLinks/{id} request using the URL parameter as the id. Let's use our example in the previous section with payment link ID PLFA45PD35E1E75KBE.

GET /paymentLinks/{id}
curl https://checkout-test.adyen.com/v52/paymentLinks/PLFA45PD35E1E75KBE \
-H "x-API-key: YOUR_X-API-KEY" \

The response returns the payment link details, including the amount and the status. If the link is not yet expired but has not been paid yet, the status will be active. Else, the status will be paid or expired.

Response
{
    "amount": {
        "currency": "EUR",
        "value": 4200
    },
    "countryCode": "NL",
    "expiresAt": "2020-06-23T12:25:28Z",
    "id": "PLFA45DD35E1E75EBE",
    "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
    "reference": "YOUR_PAYMENT_REFERENCE",
    "shopperLocale": "nl-NL",
    "status": "active",
    "url": "https://checkoutshopper-test.adyen.com/checkoutshopper/payByLink.shtml?d=PLFA45PD35E1E75KBE"
}

This section only applies to payment links created in Customer Area. For payment links created through the API, use the GET /paymentLinks/{id} endpoint instead.

To view payment links in Customer Area:

  1. Log in to you Customer Area.
  2. Select Transactions. Under View, select Payment link.

You'll see a list of active and inactive payment links created through Customer Area. The information also includes payment link status and expiry date. The payment links will be available in this table up to 30 days from when it was created.

Update payment link status

In some scenarios, you might want to force the expiry of a payment link. For example, if a shopper updates their order after you've sent them a payment link, you might want to create a new payment link with the updated amount. To avoid confusion with two payment links, set the status of the previous payment link to expired. Changing the status to expired also changes the payment link's expiry date to the current date and time.

To force the expiry, make a PATCH /paymentLinks/{id} request and update the status.

PATCH /paymentLinks/{id}
curl  https://checkout-test.adyen.com/v52/paymentLinks/PLFA45DD35E1E75EBE \
-H "x-API-key: YOUR_API_KEY" \
-H "content-type: application/json" \
-X PATCH \
-d '{
    "status": "expired"
}'

The response returns the payment link details with the updated status and expiresAt parameters.

Response
{
    "amount": {
        "currency": "EUR",
        "value": 4200
    },
    "countryCode": "NL",
    "expiresAt": "2020-06-23T13:10:33Z",
    "id": "PLFA45DD35E1E75EBE",
    "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
    "reference": "YOUR_PAYMENT_REFERENCE",
    "shopperLocale": "nl-NL",
    "status": "expired",
    "url": "https://checkoutshopper-test.adyen.com/checkoutshopper/payByLink.shtml?d=PLFA45PD35E1E75KBE"
}

Customize the payment page

You can customize the payment page with your brand name, your logo, and a background color. To do this:

  1. Log in to your Customer Area.
  2. Select Account. Under Configure, select Pay by Link.
  3. Select the web service user.
  4. Add a display name, upload a brand logo, and set a background color.

You will receive a confirmation that the payment form has been updated.

Test and go live

Before going live, use our list of test cards and other payment methods to test your integration. We recommend testing each payment method that you intend to offer to your shoppers.

You can check the test payments in your Customer Area, under TransactionsPayments.

When you are ready to go live, you need to:

  1. Apply for a live account.
  2. Configure your live account
  3. Submit a request to add payment methods in your live Customer Area .
  4. If you're using the API to create payment links, switch from test to our live endpoints.

Next steps