Search

Are you looking for test card numbers?

Would you like to contact support?

Default 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 accept 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 or if you're still building your website or app. This solution also provides an alternative way to reach your shoppers in combination with your existing online or point of sale integration. So in addition to your web, in-app, or in-store store checkout, you can use Pay by Link to accept orders through channels like email, your call center, or 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 uses this 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 a 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 link.

Pay by Link payments

Payments made through Pay by Link are standard ecommerce payments—your account settings, such as risk and capture settings, also apply. For example, if you are manually capturing payments, you will also need to capture payments made through Pay by Link.

Similar to a card payment on your own checkout, you also need to use 3D Secure to get a liability shift. Pay by Link supports both 3D Secure 1 and 2 authentication out of the box.

Before you begin

If you haven't done so already, set up your Adyen test account. When you have your test account:

Check your permissions

The required permissions depend on whether you're creating payment links through the Customer Area, or through the API:

Check your API permissions

  1. Log in to your Customer Area.
  2. Go to Account > API credentials, and select the API credential ws@Company.[YourCompanyAccount].
  3. In the Roles and Associated Accounts pane, check that the credential has the following roles:
    • Checkout webservice role
    • Pay by Link Payments Processing

If your API credential does not have these roles, reach out to your Admin user.

Check your Customer Area user permissions

  1. Log in to your Customer Area.
  2. Go to Account > Users.
  3. Select the user who will be creating payment links.
    This opens a page with the details for this user.
  4. In the Roles and Associated Accounts pane, check that the user has the following user role:
    • Pay by Link Interface

If the user does not have this role, reach out to your Admin user. If this is not available for your Admin user, contact our Support Team.

Generate your API key and check your API permissions

  1. Log in to your Customer Area.
  2. Go to Account > API credentials, and select the credential ws@Company.[YourCompanyAccount], or any other credential that you will use to make API calls.
  3. If you don't have an API key yet, generate an API key:
    1. Under Authentication, select Generate New API Key .
    2. Copy and securely store the API key in your system — you won't be able to restore it later. If your API key is lost or compromised, you need to generate a new one.
  4. In the Roles and Associated Accounts pane, check that the credential has the following roles:
    • Checkout webservice role
    • Pay by Link Payments Processing

If your API credential does not have these roles, reach out to your Admin user.

Add payment methods to your account

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

Make sure that you have added payment methods to your merchant account. If you haven't done so already, add them in your 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.

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

  • Using your Customer Area. This requires no development work, and supports most payment methods except open invoice. You can view the status of payment links within your Customer Area, and get payment notifications sent to your email.
  • Using the 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.
    • Showing your shopper's saved card details.
    • Offering open invoice (buy now, pay later) payment methods such as Klarna and AfterPay.

 

To create payment links using your Customer Area:

  1. Log in to your Customer Area.
  2. Switch to your merchant account.
  3. Select Transactions > Payment Links.
  4. Select Create payment link.
  5. 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 type Select Single use if you want the link to be non-reusable or Open (for multiple payments) for a reusable payment link. Single use is selected by default.
    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.

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

    When you provide additional details, your shopper no longer needs to type these in the payment page. For example, if a shopper in Brazil selects Boleto Bancário, they will no longer be asked to provide their billing and delivery addresses on the payment page.

    Field name Description
    Shopper reference Your unique identifier for this shopper. Required if you want to tokenize your shopper's payment details for subscriptions.
    Shopper email The shopper's email address.
    Shopper locale The language rendered in the payment page. By default, the page uses en-US. Refer to Language and localization for a complete list of the languages that you can select from.
    Billing address The shopper's billing address.
    Delivery address The shopper's delivery address.

  1. Select Create payment link. The next page confirms the payment link was created.

  2. Select Copy payment link.

    Below is an example payment link.

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

  4. If you have enabled manual capture for your merchant account, you also have to capture the payment.

  5. After the shopper completes the payment, you can check the payment result in your Customer Area, under TransactionsPayments. Optionally, you can also get payment updates sent to your email.

Tokenize payment details

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

When creating payment links through Customer Area, we only support storing payment details for recurring payments and not for one-off payments. To store your shopper's payment details for subsequent one-off payments, use the Pay by Link API.

To tokenize the shopper's payment details for recurring payments, enable a setting in your account.

  1. Log in to your Customer Area.
  2. Switch to your merchant account.
  3. Select Account. Under Configure, select Checkout.
  4. Go to Settings below the list of available payment methods.
  5. Enable Create Recurring contract by default, if it is not enabled by default.
  6. Select Submit.

When the shopper wants you to store their payment details, follow the instructions on creating a payment link, and additionally make sure to include the Shopper reference.

Send payment updates to your email

When you manually create payment links through Customer Area, 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 > Pay by Link.
  4. Select Settings.
  5. Provide an email address under Email notifications.

When a payment has been completed, you receive an email that contains the Merchant reference, Amount, payment method, and 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 retrieve and update the status of payment links.


  1. To create a payment link, make a POST /paymentLinks request specifying the following:

    In your request, you can also include parameters to configure the payment page such as the language the page is rendered in ( shopperLocale ), the description shown in the payment page, and the expiry date (expiresAt). If these are not provided, the payment page will be rendered by default in en-US language, without a description, and with a 24-hour expiry.

    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/v65/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:

    • id: The payment link ID.
    • url: The payment link that you should send to your shopper.
    • expiresAt: Date and time when the payment link expires.
    Response
    {
      "amount": {
        "currency": "EUR",
        "value": 4200
      },
      "countryCode": "NL",
      "description": "Blue Bag - ModelM671",
      "expiresAt": "2020-07-25T11:32:20Z",
      "id": "PL50C5F751CED39G71",
      "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
      "reference": "YOUR_PAYMENT_REFERENCE",
      "shopperLocale": "nl-NL",
      "shopperReference": "UNIQUE_SHOPPER_ID_6728",
      "url": "https://checkoutshopper-test.adyen.com/checkoutshopper/payByLink.shtml?d=PL50C5F751CED39G71"
    }
  2. Send the url to your shopper. When the shopper selects the link, they are redirected to an Adyen-hosted payment page. The shopper is presented with the payment methods available for the amount and countryCode specified in the request.

  1. Keep track of the payment result that Adyen sends in an AUTHORISATION notification webhook. If you haven't set this up yet, refer to our notification webhooks documentation, and 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 PL50C5F751CED39G71.
    • 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
    {
    "notificationItems":[
       {
          "NotificationRequestItem":{
             "additionalData":{
                ...
                "paymentLinkId":"PL50C5F751CED39G71"
             },
             "amount":{
                "currency":"EUR",
                "value":4200
             },
             ...
             "eventCode":"AUTHORISATION",
             "merchantAccountCode":"YOUR_MERCHANT_ACCOUNT",
             "merchantReference":"YOUR_ORDER_NUMBER",
             "pspReference":"852593065346377D",
             "success":"true"
          }
       }
    ]
    }
  2. If you have enabled manual capture for your merchant account, you also have to capture the payment.

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

In the next sections, we'll show how you can use the Pay by Link API to:

Reusable payment links

In some cases, you may 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 for the amount of 8.50 USD from shoppers in the United States:

Create a reusable payment link
curl https://checkout-test.adyen.com/v65/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.

You can use the Pay by Link API to create a payment link that will tokenize and store your shopper's card details for future one-off payments. The next time the same shopper makes a purchase, their stored card details will be presented on the payment page.

  1. 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/v65/paymentLinks \
    -H "x-API-key: YOUR_X-API-KEY" \
    -H "content-type: application/json" \
    -d '{
      "reference": "YOUR_PAYMENT_REFERENCE",
      "amount": {
        "value": 4250,
        "currency": "EUR"
      },
      "description": "Black sneakers - X51",
      "countryCode": "NL",
      "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
      "shopperLocale": "nl-NL",
      "shopperReference": "ShopperID-A16728",
      "storePaymentMethod": true,
      "recurringProcessingModel": "CardOnFile"
    }'

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

  1. When the shopper returns for their next purchase, 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 stored card details
    curl https://checkout-test.adyen.com/v65/paymentLinks \
    -H "x-API-key: YOUR_X-API-KEY" \
    -H "content-type: application/json" \
    -d '{
      "reference": "YOUR_PAYMENT_REFERENCE",
      "amount": {
        "value": 4250,
        "currency": "EUR"
      },
      "description": "Blue backpack - BK11",
      "countryCode": "NL",
      "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
      "shopperLocale": "nl-NL",
      "shopperReference": "ShopperID-A16728",
      "recurringProcessingModel": "CardOnFile"
    }'

Tokenize payment details for subscriptions

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

You can use the Pay by Link API to create a payment link that will tokenize and store your shopper's card details for recurring payments.

  1. 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 store payment details for a subscription, for a shopper with shopperReference Shopper-B7183.

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

  3. Send the token when you make subsequent subscription payments with a POST /payments request.

Customize the list of payment methods

You can use this to specify your preference for each transaction. If you want to remove a payment method by default, consider disabling the payment method on your merchant account.

You can send additional parameters in each POST /paymentLinks request to specify which payment methods you want to be shown on the payment page.

You can specify either of the following:

When using these parameters, refer to payment methods using their paymentMethod.type from our Payment methods overview.

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/v65/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. To make sure that a payment is processed when shoppers select any of these payment methods, collect the following additional details 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/v65/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": "s.hopper@example.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.

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:

To get the details of a specific payment link, send a GET /paymentLinks/{id} request. Let's use our example from the previous section for a payment link with ID PL50C5F751CED39G71.

Get payment link details
curl https://checkout-test.adyen.com/v65/paymentLinks/PL50C5F751CED39G71 \
-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 is active. Else, the status is paid or expired.

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

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

To view payment links in your Customer Area:

  1. Log in to your Customer Area.
  2. Select Transactions > Payment Links.

You'll see a list of active and inactive payment links created through the Customer Area. Inactive links are either paid or expired. The information also includes payment link status and expiry date. Payment links are available in this table up to 30 days from when they were created.

Update payment link status

In some scenarios, you may 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 may 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.

Force the expiry of a payment link
curl  https://checkout-test.adyen.com/v65/paymentLinks/PL50C5F751CED39G71 \
-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": "PL50C5F751CED39G71",
    "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 Pay by Link

Customize the payment page

You can customize the Adyen-hosted payment page with your branding, and include a link to your Terms & Conditions. Your Admin user has access to configure the payment page.

If a different Customer Area user needs access to configure the payment page, ask your Admin user to assign the Pay by Link Settings role. Your Admin user can configure the page, but they need to have the same role assigned to them before they can assign it to others. If your Admin user does not have this role, contact our Support Team.

To customize the payment page:

  1. Log in to your Customer Area.
  2. Select Account > Pay by Link.
  3. Select Appearance.
  4. Enter your company, store, or brand name, upload a brand logo, and add a link to your Terms & Conditions.
  5. Optionally change the background color and upload a background image.
  6. Select Save.

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

Change language and localization

To change the language rendered in the Adyen-hosted payment page, you can:

  • Select a Shopper locale when creating a link through Customer Area.
  • Send the shopperLocale parameter in your POST /paymentLinks request.

Pay by Link supports the following languages:

Language shopperLocale
Chinese - Simplified zh-CN
Chinese - Traditional zh-TW
Croatian hr-HR
Czech cs-CZ
Danish da-DK
Dutch nl-NL
English - US en-US
Finnish fi-FI
French fr-FR
German de-DE
Greek el-GR
Hungarian hu-HU
Italian it-IT
Japanese ja-JP
Korean ko-KR
Norwegian no-NO
Polish pl-PL
Portuguese pt-BR
Romanian ro-RO
Russian ru-RU
Slovak sk-SK
Slovenian sl-SI
Spanish es-ES
Swedish sv-SE

Sort payment methods

The list of payment methods shown by Pay by Link is ordered by popularity, the most popular payment methods in the shopper's country appearing at the top.

If you want to present the payment methods in a different order:

  1. Log in to your Customer Area.
  2. Go to Account > Checkout.
    If Checkout does not appear in the Account menu, ask your Admin user to enable the Change payment methods user role for your user account.
  3. Select a Country. The list of payment methods you now see are in the order they will appear to shoppers in this country.
  4. Drag the payment methods into the order that you want them to appear.
  5. Select Submit at the bottom of the page.

Remove payment methods

This action deactivates payment methods for your merchant account. If you are using the Pay by Link API and only want to limit the payment methods for specific transactions, send additional parameters instead.

To remove a payment method from the list shown by Pay by Link, we recommend that you deactivate this payment method:

  1. Log in to your Customer Area.
  2. Go to Account > Payment methods.
  3. Select the check box next to the payment method that you want you disable.
  4. Select Deactivate at the bottom of the page.

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