Skip to content

PaymentMethodConfiguration

Source: src/Stripe/PaymentMethodConfiguration.ts

A Stripe Payment Method Configuration — which payment methods Checkout, PaymentIntents, and SetupIntents show when payment method types are not set explicitly. name and per-method displayPreference update in place. parent is create-only and changing it replaces the configuration.

Payment method configurations have no metadata field and cannot be hard-deleted. Destroying this resource deactivates it (active: false). Identity is the Stripe id plus the unique name.

Named checkout configuration

const checkout = yield* Stripe.PaymentMethodConfiguration("checkout", {
name: "Checkout",
card: { displayPreference: { preference: "on" } },
link: { displayPreference: { preference: "on" } },
});

Cards only

const cards = yield* Stripe.PaymentMethodConfiguration("cards", {
name: "Cards only",
card: { displayPreference: { preference: "on" } },
link: { displayPreference: { preference: "off" } },
applePay: { displayPreference: { preference: "off" } },
googlePay: { displayPreference: { preference: "off" } },
});
const checkout = yield* Stripe.PaymentMethodConfiguration("checkout", {
name: "Checkout (updated)",
card: { displayPreference: { preference: "on" } },
usBankAccount: { displayPreference: { preference: "on" } },
});
// stack.destroy() / resource removal sets active: false
const checkout = yield* Stripe.PaymentMethodConfiguration("checkout", {
name: "Checkout",
});