Base44 SDK PayPal Checkout Is Now Created on Click
The Base44 SDK's mountCheckout() now accepts a PayPalCheckoutOnClick object, so a PayPal checkout is created only when the buyer clicks the button. Visitors who do not buy no longer leave unused checkouts behind. The mounted checkout also gains setDisabled(boolean) to gray out the PayPal button, for example while a form is incomplete.
Key Takeaways
- PayPal checkouts are now created only on click, so abandoned page visits no longer leave unused checkouts.
mountCheckout()takes aPayPalCheckoutOnClickobject instead of a pre-created checkout.- The new
setDisabled(boolean)method lets developers gray out the PayPal button, for example while a required form is incomplete. - The
checkoutandproviderparameters now use explicit union types rather thanany. - The payments reference docs were updated to match.
PayPal Checkout Created on Click
Base44 updated the payments module of its SDK so that PayPal checkouts are created at the moment of purchase intent instead of in advance.
Checkout Created Only When the Buyer Clicks
mountCheckout() now accepts a PayPalCheckoutOnClick object in place of a pre-created checkout. The SDK creates the checkout only when the buyer clicks the PayPal button. Visitors who load the page but never buy no longer leave unused checkouts behind.
New setDisabled() Method
The mounted checkout now exposes setDisabled(boolean), which grays out the PayPal button. A typical use is disabling the button while a required form on the page is incomplete, then enabling it once the buyer has filled it in.
Typing and Documentation
The checkout and provider parameters now show explicit union types instead of any, which gives better editor hints and type checking. The payments reference was updated to cover these changes.