v1.10.2 - FloPayPaymentMethodSetup renders real setup sessions #
FloPayPaymentMethodSetup now reads the methods a setup session advertises, so customers can add and replace saved cards and other payment methods again.
06 Oct 2026
FloPayPaymentMethodSetup works with real setup sessions again. In 1.10.0 and
1.10.1 it looked for a setup session's methods in the purchase-checkout
gateways block, which lists nothing on a setup session. Every real session
was rejected with "this setup session advertises no payment method"
(NoAdvertisedPaymentMethods) before the card form mounted, so customers could
not add or replace a saved card or any other payment method.
What changed
- The component builds its method list from the session's
advertisedPaymentMethodsonly, and never fromgateways:- a
cardentry mounts the hosted card form; - a Stripe
walletorapmentry renders that method with that entry's ownpublishableKey; - a
paypalentry (paypal_vaulted) renders the PayPal vault flow, using the entry's key as the client id and the entry'senvironment.
- a
- A session without
advertisedPaymentMethods(an older billing API) renders the card form only, exactly likeFloPayCardSetup. An empty list still reportsNoAdvertisedPaymentMethods. - Unknown families and types, and wallets or alternative methods from a provider other than Stripe, are skipped without an error. When the same method is listed twice, the first entry wins.
- Stripe wallets and alternative methods use only the currency the
setup-session read carries. The SDK no longer substitutes
USD. When the read carries no currency they are not rendered, and the card form and PayPal are unaffected. A session that advertises only Stripe methods then has nothing to render: it reportsNoAdvertisedPaymentMethodswith a message that names those methods and the missing currency. - A wallet, alternative method or PayPal that fails for good no longer ends the
setup. That method is removed, the card form and the other methods stay
mounted, and
onErrorreportsretryable: truewhile another method is still usable. It reportsretryable: falseonly when the failed method was the last one left. A failure the method itself reports as retryable is passed through unchanged. @flopay/jssession reads now carryadvertisedPaymentMethodsexactly as the billing API sends it.
Developer notes
payment_method_setup_load_failedis nowretryable: truewhile another advertised method is still usable. It used to beretryable: falseevery time. Keep the setup open on a retryable error, as you already do for the card form.@flopay/sharedtypes each advertised entry asAdvertisedPaymentMethod, andCheckoutSession.advertisedPaymentMethodsreplacesCheckoutSession.savableMethods.savableMethodsandAdvertisedSavableMethodare removed. The billing API never filledsavableMethods, so no integration could rely on its value, but code that names either one must move to the new names.- When a setup-session read carries no
currency, the setup shows the card form and PayPal only. FloPayCardSetupand@flopay/react/card-setupare unchanged.