Checkout Widget
Place the Checkout Widget component on your site if the order value is subject to change after the Express Checkout flow. The widget displays the customer payment schedule and can be updated as the total changes (e.g. in response to shipping costs and promo codes).
You can also use the widget to enable dynamic order total updates on a review page for both Express Checkout and standard Afterpay, Clearpay (UK) and Cash App Afterpay (US) Checkout.
It serves several purposes:
-
To ensure the customer has seen and agreed to an accurate payment schedule
-
To verify that the final amount captured matches what the customer has seen
-
To inform the merchant of any barriers to purchase, for instance the customer having gone over their payment limit with Afterpay, Clearpay (UK), or Cash App Afterpay (US)
Rendering the Checkout Widget
The widget can be rendered into a target container on your page using Javascript. It is responsive and fits any container with a minimum width of 300 pixels.
Updating the Order Total
Any time the order total changes (e.g. a change of shipping option, promo code, or cart contents), the widget must be notified of the new amount. Make an initial update in the onReady callback to initialize the widget.
Note
The information on this page also applies to Cash App Afterpay (US) and Clearpay (UK).