Configuration for the Checkout-owned Payment Element.

interface PaymentElementConfiguration {
    savePaymentMethodOptInBehavior?: SavePaymentMethodOptInBehavior;
    appearance?: RecursivePartial<
        {
            font: PaymentSheet.FontConfig;
            colors: | PaymentSheet.GlobalColorConfig
            | {
                light: PaymentSheet.GlobalColorConfig;
                dark: PaymentSheet.GlobalColorConfig;
            };
            shapes: {
                borderRadius: number;
                borderWidth: number;
                shadow: PaymentSheet.ShadowConfig;
            };
            primaryButton: PaymentSheet.PrimaryButtonConfig;
            embeddedPaymentElement: PaymentSheet.EmbeddedPaymentElementAppearance;
            formInsetValues: PaymentSheet.EdgeInsetsConfig;
            applyLiquidGlass?: boolean;
            navigationBarStyle?: PaymentSheet.NavigationBarStyle;
        },
    >;
    preferredNetworks?: CardBrand[];
    billingDetailsCollectionConfiguration?: Checkout.BillingDetailsCollectionConfiguration;
    removeSavedPaymentMethodMessage?: string;
    paymentMethodOrder?: string[];
    opensCardScannerAutomatically?: boolean;
    useAutocompleteEndpoints?: boolean;
    termsDisplay?: Record<string, PaymentSheet.TermsDisplay>;
    paymentMethodLayout?: PaymentSheet.PaymentMethodLayout;
    displaysMandateText?: boolean;
    rowSelectionBehavior?: EmbeddedRowSelectionBehavior;
    applePay?: ApplePayConfiguration;
    googlePay?: GooglePayConfiguration;
    link?: LinkConfiguration;
}

Properties

savePaymentMethodOptInBehavior?: SavePaymentMethodOptInBehavior

Controls how Payment Element asks customers to save payment methods.

appearance?: RecursivePartial<
    {
        font: PaymentSheet.FontConfig;
        colors: | PaymentSheet.GlobalColorConfig
        | {
            light: PaymentSheet.GlobalColorConfig;
            dark: PaymentSheet.GlobalColorConfig;
        };
        shapes: {
            borderRadius: number;
            borderWidth: number;
            shadow: PaymentSheet.ShadowConfig;
        };
        primaryButton: PaymentSheet.PrimaryButtonConfig;
        embeddedPaymentElement: PaymentSheet.EmbeddedPaymentElementAppearance;
        formInsetValues: PaymentSheet.EdgeInsetsConfig;
        applyLiquidGlass?: boolean;
        navigationBarStyle?: PaymentSheet.NavigationBarStyle;
    },
>

Customizes the appearance of Payment Element.

preferredNetworks?: CardBrand[]

Preferred networks for co-branded cards.

billingDetailsCollectionConfiguration?: Checkout.BillingDetailsCollectionConfiguration

Controls how billing details are collected during checkout.

removeSavedPaymentMethodMessage?: string

A custom message shown when a saved payment method is removed. iOS only.

paymentMethodOrder?: string[]

Overrides the default order of payment method types.

opensCardScannerAutomatically?: boolean

Whether the new-card form opens the card scanner automatically.

useAutocompleteEndpoints?: boolean

Whether Stripe address autocomplete endpoints are used.

termsDisplay?: Record<string, PaymentSheet.TermsDisplay>

Controls legal agreement text for each payment method type.

paymentMethodLayout?: PaymentSheet.PaymentMethodLayout

The layout used when Payment Element is presented as a sheet.

displaysMandateText?: boolean

Whether the embedded view displays mandate text. Defaults to false.

rowSelectionBehavior?: EmbeddedRowSelectionBehavior

Controls selection in the embedded view.

Apple Pay configuration. iOS only.

Google Pay configuration. Android only.

Link display configuration.