Please select your page

AfterPay Elements

AfterPay elements are informational components for customers and should be displayed on product page to ensure the customer is informed about AfterPay purchase option. They are hosted in Content Delivery Network (CDN) to ensure the best performance and availability for your website. Furthermore, you do not have to take care of changes. That is all done by AfterPay.

How to use AfterPay Elements

Include the scripts from AfterPay CDN. Add these two lines to your HTML (for instance, at the end of the head element).
Why two lines? It's a performance optimization called Differential Serving. Only older browsers will load the second script file - modern browsers use the first one, which is smaller and faster.

<script type="module" src="https://cdn.myafterpay.com/elements/v1/build/afterpay-elements.esm.js" async="true"></script>
<script nomodule src="https://cdn.myafterpay.com/elements/v1/build/afterpay-elements.js" async="true"></script>