Requirements
The requirements for Click to Pay differ depending on your integration. Select the tab corresponding to your integration:- Sessions flow
- Advanced flow
- Drop-in
- Card Component
- Custom Card Component
- Use the /sessions response
- Add shopper email to card configuration
- Sessions flow
- Advanced flow
| Requirement | Description |
|---|---|
| Integration type | Click to Pay is supported for the following integrations: Web Drop-in v5.39.0 or higher. Web Components v5.39.0 or higher. |
| API credentials | Web Drop-in or Components for Click to Pay requires Checkout API v69 or later. |
| Setup steps | Before you begin: 1. Add cards as a payment method in your Customer Area. 2. Add Click to Pay as a payment method in your Customer Area. |
| Requirement | Description |
|---|---|
| Integration type | Click to Pay is supported for the following integrations: Web Drop-in v5.39.0 or higher. Web Components v5.39.0 or higher. API only with the Custom Card Component. |
| API credentials | Web Drop-in or Components for Click to Pay requires Checkout API v69 or later. |
| Setup steps | Before you begin: 1. If you use the Custom Card Component and want to use the separate ClickToPay Component for Click to Pay, contact our Support Team or your Account Manager to add Click to Pay to your account. 2. Add cards as a payment method in your Customer Area. 3. Add Click to Pay as a payment method in your Customer Area. |
Benefits
Click to Pay offers the following benefits:- Higher authorization rates: Increases card authorization rates through the use of Network tokens.
- Faster checkout and higher conversion: Eliminates manual card detail entry, speeding up checkout times and boosting conversion rates.
- Secure: All payments are made from a recognized device, or are authenticated through a one-time password, making them more secure than regular card payments.
- No additional fees: Payments are processed as network token card payments, meaning you don’t incur additional costs.
How it works
- During checkout, we identify whether your shopper has a Click to Pay account by recognizing either their device or email address.
- If the shopper has a Click to Pay account, they can pay with their stored card details. Otherwise, the shopper can manually enter their card details.
- The shopper receives a one-time password via email or phone, and then authenticates with the password.
This step is skipped if the shopper is using a recognized device. - The shopper’s stored Click to Pay cards are shown.
- The shopper selects their preferred card and confirms the purchase.
- Configure your integration for Click to Pay.
- Ensure your integration can recognize Click to Pay users.
Checkout example
The following image represents Adyen’s implementation of Visa and Mastercard brand guidelines for a Click to Pay checkout page. We recommend you offer Click to Pay through Adyen’s Web Drop-in or Component integration, because it meets card scheme requirements.
Click to Pay for Drop-in or ComponentsIf you do not use Adyen’s provided component, you must follow EMVCO customer experience guidelines to build your Click to Pay checkout component.1. Configure your integration
How you configure Click to Pay depends on your integration:- Drop-in: Click to Pay is shown with card payments when available.
- Component: Integrate Click to Pay as part of the Card Component.
- Custom Card Component: Integrate Click to Pay as a standalone component.
clicktopay in the blockedPaymentMethods array when making a /sessions or /paymentMethods request.When you configure Drop-in, add the following configuration for Click to Pay to the
Add Click to Pay configuration to Drop-in
paymentMethod.card object:| Configuration | Description |
|---|---|
clickToPayConfiguration.merchantDisplayName | Your merchant name. Depending on the authentication flow, this can be shown to the shopper. |
const checkout = await AdyenCheckout({
paymentMethodsConfiguration: {
card: {
clickToPayConfiguration: {
merchantDisplayName: 'YOUR_MERCHANT_NAME'
shopperEmail: 'SHOPPER_EMAIL_ADDRESS' // Used to recognize your shopper's Click to Pay account.
}
},
},
...
});
const dropin = checkout.create('dropin').mount('#dropin-area')
When you integrate Click to Pay as part of the Card Component, the Click to Pay payment option is shown to recognized shoppers who have already set up Click to Pay. Shoppers who have not set up Click to Pay are only shown card payment options that do not use Click to Pay.When you mount the Card Component with Click to Pay configuration, and a Click to Pay shopper is recognized, they receive a one-time password through email or SMS. Make sure that you mount the Component only when your shopper chooses to pay with Click to Pay.When you configure the Card Component, include the following configuration for Click to Pay:
Add Click to Pay configuration to Card Component
| Configuration | Description |
|---|---|
clickToPayConfiguration.merchantDisplayName | Your merchant name. Depending on the authentication flow, this can be shown to the shopper. |
const card = checkout.create('card', {
clickToPayConfiguration: {
merchantDisplayName: 'YOUR_MERCHANT_NAME',
shopperEmail: 'SHOPPER_EMAIL_ADDRESS' // Used to recognize your shopper's Click to Pay account.
}
...
}).mount('#card-area');
To enable the Click to Pay Component, contact our Support Team.When you integrate with the Click to Pay Component, it is not rendered in the same UI element as where you collect cardholder details for card payments. This lets you separate Click to Pay from regular card payments and implement your own logic for when to offer Click to Pay.Click to Pay is designed to be an alternative to manual card detail entry. To optimize the shopper experience when you combine Click to Pay with your API-only card integration:Adyen does not support a custom pay button for Click to Pay. You must use the button provided by the Component.
- Show the Click to Pay Component next to the card entry fields, so that shoppers who look to pay by card find both options.
- Show only one option at a time, to maintain a clean interface. We recommend you show Click to Pay if your shopper is recognized, and manual card entry fields if not or if the shopper chooses to enter their card details manually.
- Create a session, including all required parameters and
shopperEmail. - Set up Components.
- Create an instance of
AdyenCheckoutand instantiate the Click to Pay Component:
// Create the Checkout object.
const checkout = await AdyenCheckout({
session,
... // Add other parameters, such as `environment`, `clientKey`, etc.
});
// Instantiate the Click to Pay Component.
const clickToPay = checkout.create('clicktopay', {
shopperEmail: 'SHOPPER_EMAIL_ADDRESS', // Used to recognize your shopper's Click to Pay account.
onReady() {
console.log('Component is ready to interact with the shopper')
}
});
// Display the Component if the shopper is identified.
clickToPay.isAvailable().then(() => {
clickToPay.mount('.clicktopay-container');
}).catch(() => {
// Click to Pay is not available, for example when the shopper cannot be identified.
});
2. Recognize the Click to Pay user
Your integration recognizes an existing Click to Pay user by the cookie stored in their browser. If there is no cookie, the user will be prompted to authenticate with their email address, which will set a new cookie.When Click to Pay recognizes the shopper, the Card Component or Drop-in shows the Click to Pay payment option.If the shopper is using a Mastercard but there is no browser cookie, the console always returns a 400 Bad Request error. This occurs even when the payment flow continues successfully. As long as the shopper’s email is registered, you can continue the payment flow.To recognize whether a Click to Pay account is registered with your shopper’s email address:- For a /sessions request, pass the shopperEmail, id, and sessionData parameters from the
/sessionsresponse to yourAdyenCheckoutconfiguration. - For other integrations, add
shopperEmailto the card configuration.
Pass the session object to AdyenCheckout
const checkout = await AdyenCheckout({
session: {
id: session.id,
sessionData: session.sessionData,
shopperEmail: session.shopperEmail
},
...
});
Add shopper email address to card configuration
const checkout = await AdyenCheckout({
paymentMethodsConfiguration: {
card: {
clickToPayConfiguration: {
shopperEmail: 'shopper.email@example.com'
}
},
},
...
});
const dropin = checkout.create('dropin').mount('#dropin-area')
Sample request and response
Payment request
A payment request with Click to Pay sends the same parameters as a standard cards request, plus the following parameters in thepaymentMethod object:srcDigitalCardId: The SRC reference for the Click to Pay token.srcCorrelationId: An identifier used for the Click to Pay transaction.
configuration object that automatically sends the following parameters that identify your CTP accounts or storefronts with the schemes:mcDpaIdmcSrcClientIdvisaSrcInitiatorIdvisaSrciDpaId
If Click to Pay is embedded in the Card Component, then its configuration will come as part of the Card configuration.Click to Pay request from Card Component
{
"amount": {
"value": 10123,
"currency": "EUR"
},
"reference": "YOUR_ORDER_NUMBER",
"returnUrl": "https://your-company.example.com/...",
"merchantAccount": "ADYEN_MERCHANT_ACCOUNT",
"countryCode": "NL",
"shopperInteraction": "Ecommerce",
"paymentMethod": {
"type": "scheme",
"srcScheme": "visa",
"srcDigitalCardId": "VqYhcPGbQiysxJqSPxJ0uQ000000000000MX",
"srcCorrelationId": "34f4a04b.845c1ff2-e0fd-4dac-b25f-55b597c20a6a",
"checkoutAttemptId": "761b203c-d922-4a57-96a9-8356977402341692834512345"
},
configuration: {
mcDpaId:"MASTERCARD_DPA_ID",
mcSrcClientId:"MASTERCARD_SRC_CLIENT_ID",
visaSrcInitiatorId:"VISA_SRC_INITIATOR_ID",
visaSrciDpaId:"VISA_SRC_DPA_ID"
},
"name":"Cards",
"type":"scheme"
}
If Click to Pay is a standalone Component, its configuration will come with a payment type of clicktopay.Click to Pay request from standalone component
{
"amount" : {
"value" : 10123,
"currency" : "EUR"
},
"reference" : "YOUR_ORDER_NUMBER",
"returnUrl" : "https://your-company.example.com/...",
"merchantAccount" : "ADYEN_MERCHANT_ACCOUNT",
"countryCode" : "NL",
"shopperInteraction" : "Ecommerce",
"paymentMethod" : {
"type" : "scheme",
"srcScheme" : "visa",
"paymentMethod": {
"type": "scheme",
"srcScheme": "visa",
"srcDigitalCardId": "VqYhcPGbQiysxJqSPxJ0uQ000000000000MX",
"srcCorrelationId": "34f4a04b.845c1ff2-e0fd-4dac-b25f-55b597c20a6a",
"checkoutAttemptId": "761b203c-d922-4a57-96a9-8356977402341692834512345"
},
configuration: {
mcDpaId:"MASTERCARD_DPA_ID",
mcSrcClientId:"MASTERCARD_SRC_CLIENT_ID",
visaSrcInitiatorId:"VISA_SRC_INITIATOR_ID",
visaSrciDpaId:"VISA_SRC_DPA_ID"
},
"name":"clicktopay",
"type":"clicktopay"
}
Payment response
When you receive a payment response, thepaymentMethod object contains:- type: The value that allows you to refer to the payment method. See payment method types for more information.
- brand: The card brand that the shopper used to pay, appended with _clicktopay. Only returned if
paymentMethod.typeis scheme.
Possible values are mc_clicktopay and visa_clicktopay.
"pspReference": "8915844059375211",
"resultCode": "Authorised",
"amount": {
"currency": "EUR",
"value": 666
},
"merchantReference": "YOUR_ORDER_NUMBER",
"paymentMethod": {
"brand": "visa_clicktopay",
"type": "scheme"
}
Test and go live
To test Click to Pay:- Create a Click to Pay account:
-
Add test cards to your account:
- For Mastercard, see their Testing documentation.
-
For Visa, use any of the following cards:
Card Number CVV Expiry 4622943123114762 591 12/27 4622943123114770 050 12/27 4622943123114788 939 12/27 4622943123114796 643 12/27 4622943123114804 218 12/27 4622943123114812 950 12/27 4622943123114820 947 12/27 4622943123114838 695 12/27 4622943123114846 697 12/27 4622943123114853 322 12/27
See also
Because Click to Pay payments are processed as card payments, the following applies:- Click to Pay is compatible with 3D Secure, meaning that transactions may or may not require 3D Secure authentication, based on regular 3D Secure decision-making.
- Your shoppers can issue chargebacks, which you can defend.
- You can configure your risk settings for custom risk management.