npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@foodello/capacitor-adyen

v7.0.1

Published

Adyen components integration for Capacitor.js

Readme

npm version npm downloads License: MIT GitHub issues GitHub stars GitHub forks

Adyen iOS SDK Adyen Android SDK

Supported Components

| Component | Since Version | Platform Support | | --------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Card | v7.0.0 | iOS Android |

Roadmap

  • [ ] Google Pay component support - Android
  • [ ] Apple Pay component support - iOS
  • [ ] PayPal component support - iOS / Android
  • [ ] iDEAL component support - iOS / Android
  • [ ] Klarna component support - iOS / Android

Install

# npm
npm install capacitor-adyen

# yarn
yarn add @foodello/capacitor-adyen

# pnpm
pnpm add @foodello/capacitor-adyen

# sync native projects
npx cap sync

Usage

Define Adyen plugin configuration in capacitor.config.json:

{
  "plugins": {
    "Adyen": {
      "componentsEnvironment": "test", // or "live"
      "clientKey": "your-adyen-client-key",
      "enableAnalytics": true // optional, defaults to false
    }
  }
}

Then all components require payment methods to be set before presenting the component:

import { Adyen } from '@foodello/capacitor-adyen';

const paymentMethodsJson = await fetchPaymentMethodsFromYourBackend();
await Adyen.setCurrentPaymentMethods({ paymentMethodsJson });

After that you can present any of the supported components, for example a Card component:

await Adyen.presentCardComponent();

To react to component events with your code, add listeners:

import { Adyen, PaymentSubmitEventData } from '@foodello/capacitor-adyen';
const listener = await Adyen.addListener('onSubmit', (data: PaymentSubmitEventData) => {
  console.log('Payment submitted:', data);
});

Example on extending Adyen web components

You can use component from this plugin to extend Adyen web component's behaviour for native platforms.

import { Capacitor} from '@capacitor/core';
import { Adyen, type ExtendedCardConfiguration } from '@foodello/capacitor-adyen';
import { AdyenCheckout, Core, type CoreConfiguration, type PaymentResponseData } from '@adyen/adyen-web';

import '@adyen/adyen-web/styles/adyen.css'; // Import Adyen base styles
import '@foodello/capacitor-adyen/dist/esm/styles.css'; // Import plugin styles

// 1. Fetch current payment methods from your backend
const paymentMethodsJson = await fetchPaymentMethodsFromYourBackend();

// 2. Set current payment methods to Adyen plugin if running on native platform
if (Capacitor.isNativePlatform()) {
  await Adyen.setCurrentPaymentMethods({ paymentMethodsJson });
}

// 3. Create Adyen Web Checkout instance
const checkoutCore = CoreConfiguration = {
    countryCode: 'NL',
    locale: 'nl-NL',
    environment: 'test',
    clientKey: 'test_***',
    analytics: { enabled: true },
    paymentMethodsResponse: PAYMENT_METHOD_JSON,
    onPaymentCompleted: (result, component) => {
      console.log('Payment completed', result, component)
    },
    onPaymentFailed: (error, component) => {
      console.error('Payment failed', error, component)
    },
    onError: (error) => {
      console.error(error)
    },
    beforeSubmit: (state, component, actions) => {
      console.log('beforeSubmit', state, component, actions)
    },
    onSubmit: (state, component, actions) => {
      console.log('onSubmit', state, component, actions)
      // Mimic a successful payment submission
      // In real implementation, you would send `state.data` to your server
      // and get the payment response from Adyen's /payments API
      // and then call `actions.handleResponse` with that response.
      // Here we just call it with an empty object to simulate success.
      const response: PaymentResponseData = {
        resultCode: 'Authorised',
        type: 'scheme',
      };
      actions.resolve(response);
    },
    onAdditionalDetails: (state, component, actions) => {
      console.log('onAdditionalDetails', state, component, actions)
    },
    onActionHandled: () => {
      console.log('onActionHandled')
    },
    onChange: (state, component) => {
      console.log('onChange', state, component)
    },
  };

  // 4. Initialize Adyen Checkout instance
  const checkout = await AdyenCheckout(checkoutCore);

  // 5. Create Card component configuration
  const cardConfiguration: ExtendedCardConfiguration = {
    // Your custom configuration here
  };

  // 6. Create Card component instance
  const cardComponent = new CardWithNativeSupport(coreRef.current, cardConfiguration);
  
  // 7. Mount the component to your container
  const wrapper = document.getElementById('card-container');
  cardComponent.mount(wrapper);

Supports:

  • Card component

See example -folder for a full example of how to extend Adyen's web Card component to support native platforms with Capacitor.

Useful Links

🏢 Adyen Resources

🛠️ Developer Tools

API Reference

Table of Contents

Interface: AdditionalDetailsEventData

Defined in: src/definitions/index.ts:217

Indexable

[key: string]: any

Interface: AdyenEvents

Defined in: src/definitions/index.ts:156

All available Adyen events

Extends

Properties

onCardSubmit()

onCardSubmit: (data) => void;

Defined in: src/definitions/components/card.ts:221

Listens for Card component submit events.

Parameters

data

CardSubmitEventData

Returns

void

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';
Adyen.addListener('onCardSubmit', async (data) => {
  // Handle the submit event, e.g., show selected card details to the user
  console.log('Card submitted:', data);
});

Inherited from

CardComponentEvents.onCardSubmit


onCardChange()

onCardChange: (data) => void;

Defined in: src/definitions/components/card.ts:236

Listens for Card component's change events.

Parameters

data

CardChangeEventData

Returns

void

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';
Adyen.addListener('onCardChange', async (data) => {
  // Handle the change event, e.g., show selected card details to the user
  console.log('Card changed:', data);
});

Inherited from

CardComponentEvents.onCardChange


onAdditionalDetails()

onAdditionalDetails: (data) => void;

Defined in: src/definitions/index.ts:90

Listens for payment onAdditionalDetails events.

Parameters

data

AdditionalDetailsEventData

Returns

void

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';
Adyen.addListener('onAdditionalDetails', async (data) => {
  // Handle the additionalDetails event, e.g., send data to your server
  console.log('Additional details:', data);
});

Inherited from

BaseEvents.onAdditionalDetails


onSubmit()

onSubmit: (data) => void;

Defined in: src/definitions/index.ts:104

Listens for payment submit events.

Parameters

data

PaymentSubmitEventData

Returns

void

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';
Adyen.addListener('onSubmit', async (data) => {
  // Handle the submit event, e.g., send payment data to your server
  console.log('Payment submitted:', data);
});

Inherited from

BaseEvents.onSubmit


onError()

onError: (data) => void;

Defined in: src/definitions/index.ts:119

Listens for payment and component error events.

Parameters

data

PaymentErrorEventData

Returns

void

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';
Adyen.addListener('onError', async (data) => {
  // Handle the error event, e.g., show an error message to the user
  console.error('Payment error:', data);
});

Inherited from

BaseEvents.onError


onShow()

onShow: () => void;

Defined in: src/definitions/index.ts:134

Listens for component present events.

Returns

void

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';
Adyen.addListener('onShow', async () => {
  // Handle the present event
  console.log('Component presented');
});

Inherited from

BaseEvents.onShow


onHide()

onHide: (data) => void;

Defined in: src/definitions/index.ts:149

Listens for component dismiss events.

Parameters

data

ComponentHideEventData

Returns

void

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';
Adyen.addListener('onHide', async (data) => {
  // Handle the hide event, e.g., navigate back or reset the UI
  console.log('Component hidden:', data.reason);
});

Inherited from

BaseEvents.onHide

Interface: AdyenPlugin

Defined in: src/definitions/index.ts:212

Extends

Methods

presentCardComponent()

presentCardComponent(options?): Promise<void>;

Defined in: src/definitions/components/card.ts:203

Creates a Adyen Card component for handling card payments.

Parameters

options?

CardComponentOptions

Options for creating the card component.

Returns

Promise<void>

Since

7.0.0

See

https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods for more information on how to retrieve available payment methods.

Example

import { Adyen } from '@foodello/capacitor-adyen';

const paymentMethodsResponse: PaymentMethodsResponse = await fetchPaymentMethodsFromYourServer();
await Adyen.presentCardComponent({
  amount: 1000,
  countryCode: 'NL',
  currencyCode: 'EUR',
});

#### Inherited from

[`CardComponentMethods`](#CardComponentMethods.md).[`presentCardComponent`](#CardComponentMethods.md#presentcardcomponent)

***

#### setCurrentPaymentMethods()

```ts
setCurrentPaymentMethods(options): Promise<void>;

Defined in: src/definitions/index.ts:179

Set current available payment methods for the Adyen components.

Parameters

options

Options for creating the card component.

paymentMethodsJson

PaymentMethodsResponse

Returns

Promise<void>

A promise that resolves when the card component is created.

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';

const paymentMethodsResponse: PaymentMethodsResponse = await fetchPaymentMethodsFromYourServer();
await Adyen.setCurrentPaymentMethods({
  paymentMethodsJson: paymentMethodsResponse,
});

@see {@link https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods} for more information on how to retrieve available payment methods.

@throws Will throw an error if the Adyen SDK is not initialized or if required parameters are missing.

#### Inherited from

[`BaseAdyenPlugin`](#BaseAdyenPlugin.md).[`setCurrentPaymentMethods`](#BaseAdyenPlugin.md#setcurrentpaymentmethods)

***

#### hideComponent()

```ts
hideComponent(): Promise<void>;

Defined in: src/definitions/index.ts:193

Hides the currently presented Adyen component, if any.

Returns

Promise<void>

A promise that resolves when the component is hidden.

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';
await Adyen.hideComponent();

Inherited from

BaseAdyenPlugin.hideComponent


destroyComponent()

destroyComponent(): Promise<void>;

Defined in: src/definitions/index.ts:207

Destroys the currently selected Adyen component, if any.

Returns

Promise<void>

A promise that resolves when the component is destroyed.

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';
await Adyen.destroyComponent();

Inherited from

BaseAdyenPlugin.destroyComponent


addListener()

addListener<E>(eventName, listener): Promise<PluginListenerHandle>;

Defined in: src/definitions/index.ts:209

Type Parameters

E

E extends keyof AdyenEvents

Parameters

eventName

E

listener

AdyenEvents[E]

Returns

Promise<PluginListenerHandle>

Inherited from

BaseAdyenPlugin.addListener

Interface: BaseAdyenComponentOptions

Defined in: src/definitions/index.ts:65

Base options for Adyen components.

Extended by

Properties

amount?

optional amount: number;

Defined in: src/definitions/index.ts:66


countryCode?

optional countryCode: string;

Defined in: src/definitions/index.ts:68

ISO-3166-1 alpha-2 format


currencyCode?

optional currencyCode: string;

Defined in: src/definitions/index.ts:70

ISO 4217 currency code

Interface: BaseAdyenPlugin

Defined in: src/definitions/index.ts:158

Extended by

Methods

setCurrentPaymentMethods()

setCurrentPaymentMethods(options): Promise<void>;

Defined in: src/definitions/index.ts:179

Set current available payment methods for the Adyen components.

Parameters

options

Options for creating the card component.

paymentMethodsJson

PaymentMethodsResponse

Returns

Promise<void>

A promise that resolves when the card component is created.

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';

const paymentMethodsResponse: PaymentMethodsResponse = await fetchPaymentMethodsFromYourServer();
await Adyen.setCurrentPaymentMethods({
  paymentMethodsJson: paymentMethodsResponse,
});

@see {@link https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods} for more information on how to retrieve available payment methods.

@throws Will throw an error if the Adyen SDK is not initialized or if required parameters are missing.

***

#### hideComponent()

```ts
hideComponent(): Promise<void>;

Defined in: src/definitions/index.ts:193

Hides the currently presented Adyen component, if any.

Returns

Promise<void>

A promise that resolves when the component is hidden.

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';
await Adyen.hideComponent();

destroyComponent()

destroyComponent(): Promise<void>;

Defined in: src/definitions/index.ts:207

Destroys the currently selected Adyen component, if any.

Returns

Promise<void>

A promise that resolves when the component is destroyed.

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';
await Adyen.destroyComponent();

addListener()

addListener<E>(eventName, listener): Promise<PluginListenerHandle>;

Defined in: src/definitions/index.ts:209

Type Parameters

E

E extends keyof AdyenEvents

Parameters

eventName

E

listener

AdyenEvents[E]

Returns

Promise<PluginListenerHandle>

Interface: BaseEvents

Defined in: src/definitions/index.ts:77

Base events available for all Adyen components.

Extended by

Properties

onAdditionalDetails()

onAdditionalDetails: (data) => void;

Defined in: src/definitions/index.ts:90

Listens for payment onAdditionalDetails events.

Parameters

data

AdditionalDetailsEventData

Returns

void

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';
Adyen.addListener('onAdditionalDetails', async (data) => {
  // Handle the additionalDetails event, e.g., send data to your server
  console.log('Additional details:', data);
});

onSubmit()

onSubmit: (data) => void;

Defined in: src/definitions/index.ts:104

Listens for payment submit events.

Parameters

data

PaymentSubmitEventData

Returns

void

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';
Adyen.addListener('onSubmit', async (data) => {
  // Handle the submit event, e.g., send payment data to your server
  console.log('Payment submitted:', data);
});

onError()

onError: (data) => void;

Defined in: src/definitions/index.ts:119

Listens for payment and component error events.

Parameters

data

PaymentErrorEventData

Returns

void

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';
Adyen.addListener('onError', async (data) => {
  // Handle the error event, e.g., show an error message to the user
  console.error('Payment error:', data);
});

onShow()

onShow: () => void;

Defined in: src/definitions/index.ts:134

Listens for component present events.

Returns

void

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';
Adyen.addListener('onShow', async () => {
  // Handle the present event
  console.log('Component presented');
});

onHide()

onHide: (data) => void;

Defined in: src/definitions/index.ts:149

Listens for component dismiss events.

Parameters

data

ComponentHideEventData

Returns

void

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';
Adyen.addListener('onHide', async (data) => {
  // Handle the hide event, e.g., navigate back or reset the UI
  console.log('Component hidden:', data.reason);
});

Interface: CardBrand

Defined in: src/definitions/components/card.ts:170

Properties

type

type: string;

Defined in: src/definitions/components/card.ts:174

Card brand name, e.g., 'visa', 'mc', 'amex', etc.


isSupported

isSupported: boolean;

Defined in: src/definitions/components/card.ts:179

Only on iOS

Interface: CardBrandData

Defined in: src/definitions/components/card.ts:157

Properties

cardBrands

cardBrands: CardBrand | CardBrand[];

Defined in: src/definitions/components/card.ts:162

iOS: List of detected card brands Android: Detected card brand


primaryBrand

primaryBrand: CardBrand;

Defined in: src/definitions/components/card.ts:167

First card brand in the list (iOS) or the detected brand (Android)

Interface: CardChangeEventData

Defined in: src/definitions/components/card.ts:145

Properties

cardBrands?

optional cardBrands: CardBrandData;

Defined in: src/definitions/components/card.ts:149

Card brand information


cardBIN?

optional cardBIN: string;

Defined in: src/definitions/components/card.ts:154

Bank Identification Number (BIN) of the card

Interface: CardComponentConfiguration

Defined in: src/definitions/components/card.ts:31

Configuration options specific to the Card component.

See

Properties

showsHolderNameField?

optional showsHolderNameField: boolean;

Defined in: src/definitions/components/card.ts:36

Display cardholder name input field

Default

false

showsSecurityCodeField?

optional showsSecurityCodeField: boolean;

Defined in: src/definitions/components/card.ts:42

Display security code input field

Default

true

showsStorePaymentMethodField?

optional showsStorePaymentMethodField: boolean;

Defined in: src/definitions/components/card.ts:48

Display store payment method checkbox

Default

false

allowedCardTypes?

optional allowedCardTypes: string[];

Defined in: src/definitions/components/card.ts:55

Supported card types Same as supportedCardTypes on Android

Default

AnyCardPaymentMethod


showsSubmitButton?

optional showsSubmitButton: boolean;

Defined in: src/definitions/components/card.ts:61

Display submit button

Default

true

shopperReference?

optional shopperReference: string;

Defined in: src/definitions/components/card.ts:66

Your unique shopper reference.


billingAddress?

optional billingAddress: {
  requirementPolicy: boolean;
  mode: "none" | "full" | "postalCode";
  countryCodes?: string[];
};

Defined in: src/definitions/components/card.ts:71

Billing address configuration

requirementPolicy

requirementPolicy: boolean;

Set to true to collect the shopper's billing address and mark the fields as required.

Default
false

mode

mode: "none" | "full" | "postalCode";

Sets which billing address fields to show in the payment form. Possible values:

  • full: show all billing address fields.
  • none: do not show billing address fields.
  • postalCode: show only the postal code field.
Default

none

countryCodes?

optional countryCodes: string[];

Array of allowed country codes for the billing address. For example, ['US', 'CA', 'BR'].

Default
all countries supported by Adyen

koreanAuthenticationMode?

optional koreanAuthenticationMode: "auto" | "hide" | "show";

Defined in: src/definitions/components/card.ts:101

For Korean cards, sets if security fields show in the payment form. Possible values:

  • show: show the fields.
  • hide: do not show the fields.
  • auto: the field appears for cards issued in South Korea.

Default

auto


socialSecurityNumberMode?

optional socialSecurityNumberMode: "auto" | "hide" | "show";

Defined in: src/definitions/components/card.ts:110

For Brazilian cards, sets if the CPF/CNPJ social security number field shows in the payment form. Possible values:

  • show: show the field.
  • hide: do not show the field.
  • auto: the field appears based on the detected card number.

Default

auto


localizationParameters?

optional localizationParameters: {
  languageOverride?: string;
  tableName?: string;
  keySeparator?: string;
};

Defined in: src/definitions/components/card.ts:113

Localization parameters for the component

languageOverride?

optional languageOverride: string;

ISO 639-1 language code

Default
not-set, defaults to device language

tableName?

optional tableName: string;

iOS only

See

https://adyen.github.io/adyen-ios/5.20.1/documentation/adyen/localization/

keySeparator?

optional keySeparator: string;

iOS only

See

https://adyen.github.io/adyen-ios/5.20.1/documentation/adyen/localization/

Interface: CardComponentEvents

Defined in: src/definitions/components/card.ts:207

Extended by

Properties

onCardSubmit()

onCardSubmit: (data) => void;

Defined in: src/definitions/components/card.ts:221

Listens for Card component submit events.

Parameters

data

CardSubmitEventData

Returns

void

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';
Adyen.addListener('onCardSubmit', async (data) => {
  // Handle the submit event, e.g., show selected card details to the user
  console.log('Card submitted:', data);
});

onCardChange()

onCardChange: (data) => void;

Defined in: src/definitions/components/card.ts:236

Listens for Card component's change events.

Parameters

data

CardChangeEventData

Returns

void

Since

7.0.0

Example

import { Adyen } from '@foodello/capacitor-adyen';
Adyen.addListener('onCardChange', async (data) => {
  // Handle the change event, e.g., show selected card details to the user
  console.log('Card changed:', data);
});

Interface: CardComponentMethods

Defined in: src/definitions/components/card.ts:183

Extended by

Methods

presentCardComponent()

presentCardComponent(options?): Promise<void>;

Defined in: src/definitions/components/card.ts:203

Creates a Adyen Card component for handling card payments.

Parameters

options?

CardComponentOptions

Options for creating the card component.

Returns

Promise<void>

Since

7.0.0

See

https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods for more information on how to retrieve available payment methods.

Example

import { Adyen } from '@foodello/capacitor-adyen';

const paymentMethodsResponse: PaymentMethodsResponse = await fetchPaymentMethodsFromYourServer();
await Adyen.presentCardComponent({
  amount: 1000,
  countryCode: 'NL',
  currencyCode: 'EUR',
});

## Interface: CardComponentOptions

Defined in: [src/definitions/components/card.ts:10](https://github.com/Fiksuruoka-fi/capacitor-adyen/blob/3ca2f61f73c0730818724c89c67e12ff6eda3c92/src/definitions/components/card.ts#L10)

Options for creating a Adyen Card component.

#### Extends

- [`BaseAdyenComponentOptions`](#BaseAdyenComponentOptions.md)

#### Properties

#### amount?

```ts
optional amount: number;

Defined in: src/definitions/components/card.ts:12

Payment amount in minor currency units (e.g., cents)

Overrides

BaseAdyenComponentOptions.amount


countryCode?

optional countryCode: string;

Defined in: src/definitions/components/card.ts:14

ISO 3166-1 alpha-2 country code (e.g., 'US', 'NL')

Overrides

BaseAdyenComponentOptions.countryCode


currencyCode?

optional currencyCode: string;

Defined in: src/definitions/components/card.ts:16

ISO 4217 currency code (e.g., 'USD', 'EUR')

Overrides

BaseAdyenComponentOptions.currencyCode


configuration?

optional configuration: CardComponentConfiguration;

Defined in: src/definitions/components/card.ts:18

Card component behaviour configuration


style?

optional style: FormComponentStyle;

Defined in: src/definitions/components/card.ts:20

Card-specific styling options


viewOptions?

optional viewOptions: ComponentViewOptions;

Defined in: src/definitions/components/card.ts:22

View options for the component's presentation layout

Interface: CardSubmitEventData

Defined in: src/definitions/components/card.ts:133

Properties

lastFour

lastFour: string;

Defined in: src/definitions/components/card.ts:137

Last four digits of the card number


finalBIN

finalBIN: string;

Defined in: src/definitions/components/card.ts:142

Final Bank Identification Number (BIN) of the card

Interface: ComponentHideEventData

Defined in: src/definitions/index.ts:237

Properties

reason

reason: "user_gesture";

Defined in: src/definitions/index.ts:238

Interface: ExtendedCardConfiguration

Defined in: src/definitions/components/card.ts:331

Extended Card component configuration including native options

See

https://docs.adyen.com/payment-methods/cards/web-component/#optional-configuration

Extends

  • CardConfiguration

Properties

order?

optional order: Order;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:627

Inherited from

CardConfiguration.order

modules?

optional modules: {
  srPanel?: SRPanel;
  analytics?: AnalyticsModule;
  resources?: Resources;
  risk?: RiskElement;
};

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:628

srPanel?

optional srPanel: SRPanel;

analytics?

optional analytics: AnalyticsModule;

resources?

optional resources: Resources;

risk?

optional risk: RiskElement;

Inherited from

CardConfiguration.modules

isDropin?

optional isDropin: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:634

Inherited from

CardConfiguration.isDropin

environment?

optional environment: string;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:696

Inherited from

CardConfiguration.environment

session?

optional session: Session;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:697

Inherited from

CardConfiguration.session

onComplete()?

optional onComplete: (state, element) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:698

Parameters

state

any

element

UIElement

Returns

void

Inherited from

CardConfiguration.onComplete

isInstantPayment?

optional isInstantPayment: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:699

Inherited from

CardConfiguration.isInstantPayment

icon?

optional icon: string;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:723

Inherited from

CardConfiguration.icon

amount?

optional amount: PaymentAmount;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:724

Inherited from

CardConfiguration.amount

secondaryAmount?

optional secondaryAmount: PaymentAmountExtended;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:725

Inherited from

CardConfiguration.secondaryAmount

showPayButton?

optional showPayButton: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:730

Show/Hide pay button

Default Value

true

Inherited from

CardConfiguration.showPayButton

originalAction?

optional originalAction: PaymentAction;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:757

Reference to the action object found in a /payments response. This, in most cases, is passed on to the onActionHandled callback

Inherited from

CardConfiguration.originalAction

autoFocus?

optional autoFocus: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:775

Automatically shift the focus from one field to another. Usually happens from a valid Expiry Date field to the Security Code field, but some BINS also allow us to know that the PAN is complete, in which case we can shift focus to the date field

Default Value

true

  • merchant set config option

Inherited from

CardConfiguration.autoFocus

billingAddressAllowedCountries?

optional billingAddressAllowedCountries: string[];

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:780

Config t olimit the countries that will show in the country dropdown

  • merchant set config option

Inherited from

CardConfiguration.billingAddressAllowedCountries

billingAddressMode?

optional billingAddressMode: "none" | "full" | "partial";

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:787

If billingAddressRequired is set to true, you can set this to partial to require the shopper's postal code instead of the full address.

Default Value

full

- merchant set config option

Inherited from

CardConfiguration.billingAddressMode

billingAddressRequired?

optional billingAddressRequired: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:794

Show Address fields

Default Value

false

  • merchant set config option

Inherited from

CardConfiguration.billingAddressRequired

billingAddressRequiredFields?

optional billingAddressRequiredFields: string[];

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:799

Config to specify which address field are required

  • merchant set config option

Inherited from

CardConfiguration.billingAddressRequiredFields

brandsConfiguration?

optional brandsConfiguration: CardBrandsConfiguration;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:816

Configuration specific to brands

  • merchant set config option

Inherited from

CardConfiguration.brandsConfiguration

challengeWindowSize?

optional challengeWindowSize: "01" | "02" | "03" | "04" | "05";

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:830

Defines the size of the challenge Component

01: [250px, 400px] 02: [390px, 400px] 03: [500px, 600px] 04: [600px, 400px] 05: [100%, 100%]

Default Value

'02'

- merchant set config option

Inherited from

CardConfiguration.challengeWindowSize

clickToPayConfiguration?

optional clickToPayConfiguration: ClickToPayProps;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:835

Configuration for Click to Pay

  • merchant set config option

Inherited from

CardConfiguration.clickToPayConfiguration

fastlaneConfiguration?

optional fastlaneConfiguration: FastlaneSignupConfiguration;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:839

Configuration for displaying the Fastlane consent UI.

Inherited from

CardConfiguration.fastlaneConfiguration

data?

optional data: {
  holderName?: string;
  billingAddress?: Partial<AddressData>;
};

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:854

Object that contains placeholder information that you can use to prefill fields.

  • merchant set config option

holderName?

optional holderName: string;

billingAddress?

optional billingAddress: Partial<AddressData>;

Inherited from

CardConfiguration.data

disableIOSArrowKeys?

optional disableIOSArrowKeys: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:870

Turn on the procedure to force the arrow keys on an iOS soft keyboard to always be disabled

Default Value

false

  • merchant set config option

Inherited from

CardConfiguration.disableIOSArrowKeys

disclaimerMessage?

optional disclaimerMessage: DisclaimerMsgObject;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:875

Object to configure the message and text for a disclaimer message, added after the Card input fields

  • merchant set config option

Inherited from

CardConfiguration.disclaimerMessage

doBinLookup?

optional doBinLookup: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:882

Allow binLookup process to occur

Default Value

true

  • merchant set config option

Inherited from

CardConfiguration.doBinLookup

enableStoreDetails?

optional enableStoreDetails: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:887

Config option related to whether we set storePaymentMethod in the card data, and showing/hiding the "store details" checkbox

  • merchant set config option

Inherited from

CardConfiguration.enableStoreDetails

exposeExpiryDate?

optional exposeExpiryDate: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:897

Allows SF to return an unencrypted expiryDate

  • merchant set config option

Inherited from

CardConfiguration.exposeExpiryDate

forceCompat?

optional forceCompat: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:902

Force securedFields to use the 'compat' version of JWE. (Use case: running custom http:// test environment

  • merchant set config option

Inherited from

CardConfiguration.forceCompat

hasHolderName?

optional hasHolderName: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:919

Show/hide the card holder name field

  • merchant set config option

Inherited from

CardConfiguration.hasHolderName

hideCVC?

optional hideCVC: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:929

Show/hide the Security Code field

  • merchant set config option

Inherited from

CardConfiguration.hideCVC

holderNameRequired?

optional holderNameRequired: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:934

Whether the card holder name field will be required

  • merchant set config option

Inherited from

CardConfiguration.holderNameRequired

installmentOptions?

optional installmentOptions: InstallmentOptions;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:944

Configure the installment options for the card

  • merchant set config option

Inherited from

CardConfiguration.installmentOptions

keypadFix?

optional keypadFix: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:951

Implements a workaround for iOS/Safari bug where keypad doesn't retract when SF paymentMethod is no longer active

Default Value

true

  • merchant set config option

Inherited from

CardConfiguration.keypadFix

legacyInputMode?

optional legacyInputMode: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:963

For some scenarios make the card input fields (PAN, Expiry Date, Security Code) have type="tel" rather than type="text" inputmode="numeric"

Default Value

false

  • merchant set config option

Inherited from

CardConfiguration.legacyInputMode

maskSecurityCode?

optional maskSecurityCode: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:970

Adds type="password" to the Security code input field, causing its value to be masked

Default Value

false

  • merchant set config option

Inherited from

CardConfiguration.maskSecurityCode

minimumExpiryDate?

optional minimumExpiryDate: string;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:976

Specify the minimum expiry date that will be considered valid

  • merchant set config option

Inherited from

CardConfiguration.minimumExpiryDate

onAddressLookup?

optional onAddressLookup: OnAddressLookupType;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:987

Function used to perform 3rd party Address lookup

  • merchant set config option

Inherited from

CardConfiguration.onAddressLookup

onAddressSelected?

optional onAddressSelected: OnAddressSelectedType;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:992

Function used to handle the selected address from 3rd party Address lookup

  • merchant set config option

Inherited from

CardConfiguration.onAddressSelected

onBinLookup()?

optional onBinLookup: (event) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:997

After binLookup call - provides the brand(s) we detect the user is entering, and if we support the brand(s)

  • merchant set config option

Parameters

event

CardBinLookupData

Returns

void

Inherited from

CardConfiguration.onBinLookup

onBinValue()?

optional onBinValue: (event) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:1002

Provides the BIN Number of the card (up to 6 digits), called as the user types in the PAN.

  • merchant set config option

Parameters

event

CardBinValueData

Returns

void

Inherited from

CardConfiguration.onBinValue

onBlur()?

optional onBlur: (event) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:1007

Called when a field loses focus.

  • merchant set config option

Parameters

event

CardFocusData | ComponentFocusObject

Returns

void

Inherited from

CardConfiguration.onBlur

onBrand()?

optional onBrand: (event) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:1012

Called once we detect the card brand.

  • merchant set config option

Parameters

event

CardBrandData

Returns

void

Inherited from

CardConfiguration.onBrand

onConfigSuccess()?

optional onConfigSuccess: (event) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:1017

Called once the card input fields are ready to use.

  • merchant set config option

Parameters

event

CardConfigSuccessData

Returns

void

Inherited from

CardConfiguration.onConfigSuccess

onAllValid()?

optional onAllValid: (event) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:1022

Called when all the securedFields becomes valid Also called again if one of the fields moves out of validity.

Parameters

event

CardAllValidData

Returns

void

Inherited from

CardConfiguration.onAllValid

onFieldValid()?

optional onFieldValid: (event) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:1028

Called when a field becomes valid and also if a valid field changes and becomes invalid. For the card number field, it returns the last 4 digits of the card number.

  • merchant set config option

Parameters

event

CardFieldValidData

Returns

void

Inherited from

CardConfiguration.onFieldValid

onFocus()?

optional onFocus: (event) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:1033

Called when a field gains focus.

  • merchant set config option

Parameters

event

CardFocusData | ComponentFocusObject

Returns

void

Inherited from

CardConfiguration.onFocus

onLoad()?

optional onLoad: (event) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:1038

Called once all the card input fields have been created but are not yet ready to use.

  • merchant set config option

Parameters

event

CardLoadData

Returns

void

Inherited from

CardConfiguration.onLoad

placeholders?

optional placeholders: Partial<Record<PlaceholderKeys, string>>;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:1043

Configure placeholder text for holderName, cardNumber, expirationDate, securityCode and password.

  • merchant set config option

Inherited from

CardConfiguration.placeholders

positionHolderNameOnTop?

optional positionHolderNameOnTop: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:1050

Position holder name above card number field (instead of having it after the security code field)

Default Value

false

  • merchant set config option

Inherited from

CardConfiguration.positionHolderNameOnTop

showBrandIcon?

optional showBrandIcon: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:1057

Show/hide the brand logo when the card brand has been recognized

Default Value

true

  • merchant set config option

Inherited from

CardConfiguration.showBrandIcon

showContextualElement?

optional showContextualElement: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:1064

Show/hide the contextual text under each form field. The contextual text is to assist shoppers filling in the payment form.

Default Value

true

  • merchant set config option

Inherited from

CardConfiguration.showContextualElement

showInstallmentAmounts?

optional showInstallmentAmounts: boolean;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:1071

Set whether to show installments broken down into amounts or months

Default Value

true

  • merchant set config option

Inherited from

CardConfiguration.showInstallmentAmounts

styles?

optional styles: StylesObject;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:1086

Object to configure the styling of the inputs in the iframes that are used to present the PAN, Expiry Date & Security Code fields

  • merchant set config option

Inherited from

CardConfiguration.styles

beforeRedirect()?

optional beforeRedirect: (resolve, reject, redirectData) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:5981

Called before the page redirect happens. Allows you to perform any sort of action before redirecting the shopper to another page.

Parameters

resolve

() => void

reject

() => void

redirectData
url

string

method

string

data?

any

Returns

void

Inherited from

CardConfiguration.beforeRedirect

beforeSubmit()?

optional beforeSubmit: (state, component, actions) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:5996

Called when the shopper selects the Pay button (it only works on Sessions flow)

Allows you to add details which will be sent in the payment request to Adyen's servers. For example, you can add shopper details like 'billingAddress', 'deliveryAddress', 'shopperEmail' or 'shopperName'

Parameters

state

PaymentData

component

UIElement

actions

BeforeSubmitActions

Returns

void

Inherited from

CardConfiguration.beforeSubmit

onPaymentCompleted()?

optional onPaymentCompleted: (data, component?) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:6005

Called when the payment succeeds.

The first parameter is the sessions response (when using sessions flow), or the result code.

Parameters

data

PaymentCompletedData

component?

UIElement<UIElementProps>

Returns

void

Inherited from

CardConfiguration.onPaymentCompleted

onPaymentFailed()?

optional onPaymentFailed: (data?, component?) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:6015

Called when the payment fails.

The first parameter is populated when merchant is using sessions, or when the payment was rejected with an object. (Ex: 'action.reject(obj)' ). Otherwise, it will be empty.

Parameters

data?

PaymentFailedData

session response or resultCode. It can also be undefined if payment was rejected without argument ('action.reject()')

component?

UIElement<UIElementProps>

Returns

void

Inherited from

CardConfiguration.onPaymentFailed

onSubmit()?

optional onSubmit: (state, component, actions) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:6026

Callback used in the Advanced flow to perform the /payments API call

The payment response must be passed to the 'resolve' function, even if the payment wasn't authorized (Ex: resultCode = Refused). The 'reject' should be used only if a critical error occurred.

Parameters

state

SubmitData

component

UIElement

actions

SubmitActions

Returns

void

Inherited from

CardConfiguration.onSubmit

onAdditionalDetails()?

optional onAdditionalDetails: (state, component, actions) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:6037

Callback used in the Advanced flow to perform the /payments/details API call.

The payment response must be passed to the 'resolve' function, even if the payment wasn't authorized (Ex: resultCode = Refused). The 'reject' should be used only if a critical error occurred.

Parameters

state

AdditionalDetailsData

component

UIElement

Component submitting details. It is undefined when using checkout.submitDetails()

actions

AdditionalDetailsActions

Returns

void

Inherited from

CardConfiguration.onAdditionalDetails

onActionHandled()?

optional onActionHandled: (actionHandled) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:6053

Callback called when an action (for example a QR code or 3D Secure 2 authentication screen) is shown to the shopper.

Parameters

actionHandled

ActionHandledReturnObject

Returns

void

Inherited from

CardConfiguration.onActionHandled

onChange()?

optional onChange: (state, component) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:6054

Parameters

state

OnChangeData

component

UIElement

Returns

void

Inherited from

CardConfiguration.onChange

onError()?

optional onError: (error, component?) => void;

Defined in: node_modules/@adyen/adyen-web/dist/es/index.d.ts:6063

Callback called in two different scenarios:

  • when a critical error happened (network error; implementation error; script failed to load)
  • when the shopper cancels the payment flow in payment methods that have an overlay (GooglePay, PayPal, ApplePay)

Parameters

error

AdyenCheckoutError

component?

UIElement<UIElementProps>

Returns

void

Inherited from

CardConfiguration.onError

onEnterKey