Configuration for the Checkout-owned Payment Element.

interface PaymentElementConfiguration {
    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[];
    removeSavedPaymentMethodMessage?: string;
    paymentMethodOrder?: string[];
    cardBrandAcceptance?: PaymentSheet.CardBrandAcceptance;
    opensCardScannerAutomatically?: boolean;
    termsDisplay?: Record<string, PaymentSheet.TermsDisplay>;
    paymentMethodLayout?: PaymentSheet.PaymentMethodLayout;
    displaysMandateText?: boolean;
    rowSelectionBehavior?: EmbeddedRowSelectionBehavior;
    applePay?: CheckoutElements.PaymentElementConfiguration.ApplePayConfiguration;
    googlePay?: CheckoutElements.PaymentElementConfiguration.GooglePayConfiguration;
    link?: CheckoutElements.PaymentElementConfiguration.LinkConfiguration;
}

Properties

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.

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.

cardBrandAcceptance?: PaymentSheet.CardBrandAcceptance

Card brands accepted by Payment Element. Defaults to all brands.

opensCardScannerAutomatically?: boolean

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

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 true.

rowSelectionBehavior?: EmbeddedRowSelectionBehavior

Controls selection in the embedded view.

Apple Pay configuration for Payment Element. iOS only. Enabled when a merchantIdentifier is provided through StripeProvider; set display to never to hide Apple Pay from Payment Element.

Google Pay configuration for Payment Element. Android only.

Link display configuration for Payment Element.