v1.20.1 - Preview of a card checkout that runs from the Flopay-hosted runtime #
@flopay/js adds loadCheckoutRuntime, and @flopay/react and @flopay/vue add a runtime checkout preview component. They load a checkout runtime from the Flopay origin and mount the card checkout from it. A runtime that cannot load reports an error you can handle, and a card gateway the SDK has not seen before gets the same card-form recovery as Worldpay. Existing checkouts are unchanged.
26 Nov 2026
This release adds a preview of a card checkout that runs from a runtime hosted by Flopay, so checkout behaviour can be updated without a new SDK release. Existing checkouts are unchanged and no action is needed unless you want to try the preview.
What changed
- Hosted runtime loader.
@flopay/jsexportsloadCheckoutRuntime({ runtimeUrl, timeoutMs }), which loads the runtime script from the Flopay origin. If the script cannot load, or does not register within the timeout (10 seconds by default), it rejects with an error of typenetwork_errorand coderuntime_load_failedorruntime_load_timeout. The checkout is never left blank with no signal, and the next call tries again. - Runtime checkout component for React and Vue.
@flopay/reactand@flopay/vueeach export a runtime checkout preview component. It loads the runtime, mounts one checkout in your page, passes through yourappearanceandstringsoverrides, relays the checkout's events, and reports a runtime that cannot load toonError. It works with a session you create on your server (sessionIdandnonce) or with a session created inline (createSession). - Events. The
complete,decline,error,cancel,instruments,cardFieldsReadyandcardFieldsFailedevents keep their 1.x payloads. Two differences matter if you handle events:cancelnow fires when the buyer closes the 3-D Secure step, with{ status: 'cancelled', sessionId, reason: 'three_ds_closed' }(in 1.x,cancelwas PayPal only), anderrorfires withsession_unavailableorsession_missingwhen a session cannot start. - Card gateways Flopay adds later.
@flopay/sharedexportscardGatewayName, and any card gateway the session advertises, other than Stripe, PayPal or the legacy card vault signal, is now treated as handled on Flopay's servers. A session whose only card gateway is one the SDK has not seen before gets the same card-form recovery as a Worldpay session.
Integration notes
- No action is needed for existing 1.x checkouts, which behave as before.
- To try the preview, render the runtime checkout component with the
runtimeUrlFlopay gives you, and handleonErrorso your page can fall back if the runtime does not load. - If you handle
cancelorerrorevents, account for the two event differences above before you move a checkout to the runtime.