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

v8.0.0

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, Card, 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 (use extended version from this @foodello/capacitor-adyen package)
  const cardComponent = new Card(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" | "show" | "hide";

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" | "show" | "hide";

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/ffabd19c1edc9601edbb4928d7007b20706a6efe/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:3490

Inherited from

CardConfiguration.order

modules?

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

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

srPanel?

optional srPanel: SRPanel;

analytics?

optional analytics: IAnalytics;

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:3500

Identifies if the Element is the DropIn element

Inherited from

CardConfiguration.isDropin

paymentMethodId?

optional paymentMethodId: string;

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

Inherited from

CardConfiguration.paymentMethodId

environment?

optional environment: string;

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

Inherited from

CardConfiguration.environment

session?

optional session: Session;

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

Inherited from

CardConfiguration.session

onComplete()?

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

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

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:3525

Inherited from

CardConfiguration.isInstantPayment

icon?

optional icon: string;

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

Inherited from

CardConfiguration.icon

amount?

optional amount: PaymentAmount;

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

Inherited from

CardConfiguration.amount

secondaryAmount?

optional secondaryAmount: PaymentAmount;

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

Inherited from

CardConfiguration.secondaryAmount

showPayButton?

optional showPayButton: boolean;

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

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:3583

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

beforeRedirect()?

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

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

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 | Promise<void>;

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

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 | Promise<void>

Inherited from

CardConfiguration.beforeSubmit

onPaymentCompleted()?

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

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

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:6262

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:6273

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:6284

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:6300

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:6301

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:6310

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

onEnterKeyPressed()?

optional onEnterKeyPressed: (activeElement, component) => void;

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

Called when a Component detects, or is told by a SecuredField, that the Enter key has been pressed.

  • merchant set config option

Parameters

activeElement

Element

component

UIElement

Returns

void

Inherited from

CardConfiguration.onEnterKeyPressed

onPaymentMethodsRequest()?

optional onPaymentMethodsRequest: (data, actions) => void;

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

Callback called when it is required to fetch/update the payment methods list. It is currently used mainly on Giftcard flow (Partial orders), since the payment method list might change depending on the amount left to be paid

The /paymentMethods response must be passed to the 'resolve' function

Parameters

data

PaymentMethodsRequestData

actions
resolve

(response) => void

reject

() => void

Returns

void

Inherited from

CardConfiguration.onPaymentMethodsRequest

onOrderUpdated()?

optional onOrderUpdated: (data) => void;

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

Called when the gift card balance is less than the transaction amount. Returns an Order object that includes the remaining amount to be paid. https://docs.adyen.com/payment-methods/gift-cards/web-component?tab=config-sessions_1

Parameters

data
order

Order

Returns

void

Inherited from

CardConfiguration.onOrderUpdated

autoFocus?

optional autoFocus: boolean;

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

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:6905

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:6912

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:6919

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:6924

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:6941

Configuration specific to brands

  • merchant set config option

Inherited from

CardConfiguration.brandsConfiguration

challengeWindowSize?

optional challengeWindowSize: ChallengeWindowSize;

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

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:6960

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:6964

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:6979

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:6995

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:7000

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:7007

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:7012

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:7022

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:7027

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

  • merchant set config option

Inherited from

CardConfiguration.forceCompat

fundingSource?

optional fundingSource: FundingSourceKeys;

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

Funding source field populated when 'splitCardFundingSources' is configured in sessions/ call This value is automatically set in Drop-in integration. For standalone integration, it can be set manually. When provided, it ensures the component loads configuration specific to that funding source (e.g. credit, debit, prepaid)

  • merchant set config option

Inherited from

CardConfiguration.fundingSource

hasHolderName?

optional hasHolderName: boolean;

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

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:7056

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:7061

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:7071

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:7078

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:7090

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:7097

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:7103

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:7114

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:7119

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:7124

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:7129

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:7134

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:7139

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:7144

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:7149

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:7155

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:7160

Called when a field gains focus.

  • merchant set config option

Parameters

event

CardFocusData | ComponentFocusObject

Returns

void

Inherit