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.
Creating a Configuration
Section titled “Creating a Configuration”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" } },});Updating a Configuration
Section titled “Updating a Configuration”const checkout = yield* Stripe.PaymentMethodConfiguration("checkout", { name: "Checkout (updated)", card: { displayPreference: { preference: "on" } }, usBankAccount: { displayPreference: { preference: "on" } },});Deactivating a Configuration
Section titled “Deactivating a Configuration”// stack.destroy() / resource removal sets active: falseconst checkout = yield* Stripe.PaymentMethodConfiguration("checkout", { name: "Checkout",});