Updates default behavior for saved payment methods in Elements with Checkout SessionsBreaking changes
What’s new
Updates Elements with Checkout Sessions to automatically enable saved payment method collection and redisplay the saved payment methods in the Payment Element by default. This change means you don’t need to explicitly configure these options in your client-side integration when a customer ID is passed to the Checkout Session (for redisplay) or when saved_payment_method_options.payment_method_save is enabled (for collection).
Why is this a breaking change?
Previously, to enable saved payment methods with Elements and Checkout Sessions, you had to configure saved payment methods both on the Checkout Session and explicitly in your client-side initCheckout()
call. Now, when you enable saved payment methods on the Checkout Session, the Payment Element automatically enables collection and redisplay without requiring additional client-side configuration. This changes the default behavior for integrations that enabled saved payment methods on the Checkout Session but intentionally omitted the client-side configuration—those integrations will now have saved payment method collection and redisplay enabled automatically.
Impact
You can now integrate saved payment methods in Elements with Checkout Sessions with simplified client-side configuration. Previously, you had to enable saved payment methods both on the Checkout Session and explicitly in your initCheckout()
call. Now, when you enable saved payment methods on the Checkout Session, the Payment Element automatically enables collection and redisplay of saved payment methods without requiring additional client-side configuration.
This reduces integration complexity and ensures consistent saved payment method behavior across your Elements with Checkout Sessions implementation. If you want to disable saved payment methods, you can still explicitly set enableSave
and enableRedisplay
to never
in your elementsOptions.
configuration.