HomeProduct DocsAPI ReferenceChangelog
RecurlyAPI GuidesRecurly.jsWebhooksAPI ReferenceSupportBook demo
Product Docs

Third-party checkout guide: Adyen Web Components

Learn how to connect an Adyen Web Components (Advanced Flow) integration to Recurly using Recurly.js and the V3 API.

This guide walks you through connecting your Adyen Web Components integration to Recurly using the V3 API and Recurly.js. You'll configure Adyen's Web Components, tokenize payments with Recurly.js, and make purchase requests against the Recurly API.

Prerequisites

  • A working Adyen Web Components implementation using the Advanced Flow (Cards, Cash App Pay, Google Pay, Apple Pay, ACH, SEPA, BACS, iDEAL, and Bancontact). You don't need to send state data to Adyen.
  • Recurly.js loaded on your page and initialized per the Recurly.js documentation.
  • Access to your Recurly V3 API credentials and a Recurly site configured to accept payments.

Limitations

  • 100% coupons and account credits aren't supported. Since communication with the gateway is required during initial setup, offer a free trial instead to avoid future payment failures.
  • Adyen's Sessions flow isn't supported — only the Advanced Flow.
ImportantYou must follow the Adyen setup guide, including the webhooks configuration in Adyen. Without proper webhooks configuration, recurring token usage and async status updates won't function correctly.

Definition

Adyen Web Components let you build a custom checkout UI while Adyen collects and tokenizes payment details client-side. This guide covers connecting that Advanced Flow integration to Recurly using Recurly.js and the V3 API.

Key concepts

Supported payment methods

Cards — Visa, Mastercard, Discover, Diners, JCB, UnionPay, American Express, Cartes Bancaires, and Bancontact (requires SEPA for renewals)

Wallets — Apple Pay, Google Pay, Cash App Pay, and PayPay

Direct debit — ACH, SEPA, BACS, and iDEAL (requires SEPA for renewals)

Integration guide

ImportantDon't write code to create, update, or otherwise process transactions or tokens with Adyen directly. You only create the state data, then pass it to Recurly using the steps below.
1

Build your Adyen components and Recurly.js integration

Follow Adyen's Advanced Flow docs to render Web Components for each payment method you support.

Before rendering, fetch your supported methods via Adyen's API and pass the paymentMethodsResponse into the Components configuration. Only include methods your Recurly site supports.

"paymentMethodsResponse": {
  "paymentMethods": [
    {
      "brands": [
        "amex",
        "cup",
        "diners",
        "discover",
        "mc",
        "visa"
      ],
      "name": "Cards",
      "type": "scheme"
    }
  ]
}
2

Tokenize Adyen components with Recurly.js

Use an onSubmit handler in your checkout to generate a Recurly.js token from the component state, then send it to your server to complete the purchase via Recurly's API.

const onSubmit = async (state, component, actions) => {
  try {
    let payload = {
      type: 'adyen_component_state',
      adyen_component_state_context: state
    };

    recurly.token(payload, (error, token) => {
      if (error) {
        actions.reject();
        return;
      }
      // Send token.nonce to your backend to create a purchase via Recurly API
      actions.resolve();
    });
  } catch (error) {
    actions.reject();
  }
};

const adyenCheckout = await AdyenWeb.AdyenCheckout({
  onSubmit
});
3

Configure Adyen component best practices

Set the following options for reliable tokenization and renewals.

OptionRecommended settingNotes
storePaymentMethodtrueRequired for tokenization. If omitted or false, no vault token is issued and renewals fail with no_billing_information errors.
enableStoreDetailsomitAvoid using — allows the user to opt out of vaulting tokens, which can break renewals with no_billing_information errors.
hideCVCconditionalSet to true unless your Adyen setup explicitly supports CVC bypass on return customers.
maskSecurityCodetrueMasking the CVV field enhances security and user trust.
hasHolderNameomitNot supported — use Recurly.js name elements instead.
billingAddressRequiredomitNot supported — use Recurly.js address elements if you need AVS.
addressSearchDebounceMsomitNot supported — Recurly doesn't process Adyen address search elements.
installmentOptionsomitRecurly doesn't support Adyen installment features.
showInstallmentAmountsomitRecurly doesn't display installment breakdowns — handle this in your own UI if needed.

For full Adyen Advanced Flow guidance, see the Advanced flow integration guide.

4

Create a purchase via the Recurly API

Once you have a valid Recurly.js token from the component data, call the Purchase endpoint. For example, to subscribe to a plan:

POST https://v3.recurly.com/purchases
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

{
	"currency": "USD",
  "account": {
	"code": "GoldCard",
	"email":"[email protected]",
  "billing_info": {
  "token_id":"kejCaCCHNIH5bDZx47f7Xw" // Adyen Component State Recurly.js Token
		}
	},
	"gateway_code":"1234567890", // Adyen Gateway Account code
	"subscriptions": [{
		"plan_code": "goldplan", // Plan ID for Subscription
	}]
}
5

Handle the purchase response

Check the response to confirm the purchase succeeded or handle any follow-up action.

  • On success, Recurly returns an InvoiceCollection containing any charge or credit invoices created.
  • On error, inspect the response code and message for validation or gateway issues, and surface them to the user.
  • For PayPay specifically, inspect the response and handle the action_result by following the standard Recurly.js alternative payment method flow.

Webhooks

Adyen returns recurring token usage and async status updates to Recurly through webhooks, as configured in the Adyen setup guide.

What's next




Did this page help you?