The checkout.min.js JavaScript library allows simple payment integrations for merchant sites.


Prepare the library before payment.
Show a hosted payment form embedded into the merchant site.
Redirect to a hosted payment page to complete payment.
A default implementation of a beforeRedirect callback.
A default implementation of an afterRedirect callback.


Invoked when errors occur during payment.
Invoked when payment has been completed.
When the payer cancels the payment interaction.Note: Cancel callback can only be used with payment page, it will not work with embedded page.
Invoked when the payment is not completed within the duration available to the payer to make the payment.
Invoked before browser is redirected away from page.
Invoked when browser returns to page after redirect.


        <script src=""

        <script type="text/javascript">
            function errorCallback(error) {
            function cancelCallback() {
                  console.log('Payment cancelled');

                session: { 
                    id:  '<your_initiate_checkout_session_ID>'
                order: {
                    description: 'Ordered goods',
                    id: '<unique_order_id>'
                interaction: {
                    merchant: {
                        name: 'Your merchant name',
                        address: {
                            line1: '200 Sample St',
                            line2: '1234 Example Town'
        <div id="embed-target"> </div> 
        <input type="button" value="Pay with Embedded Page" onclick="Checkout.showEmbeddedPage('#embed-target');" />
        <input type="button" value="Pay with Payment Page" onclick="Checkout.showPaymentPage();" />

Copyright © 2022 Suncorp