timeout Callback

The timeout callback is invoked when the payment is not completed within the duration (in seconds) available to the payer to make the payment. This will either be the time you specified in interaction.timeout when you sent the CREATE_CHECKOUT_SESSION request or or the gateway default timeout value.

Usage

The timeout callback must be defined using the data-timeout attribute on the Checkout script tag. The attribute value may be the name of a global function or a URL string.

Example

<html>
    <head>
        <script src="https://na.gateway.mastercard.com/checkout/version/59/checkout.js"
                data-timeout="timeoutCallback"></script>

        <script type="text/javascript">
            function timeoutCallback() {
                //handle payment timeout
            }
        </script>
    </head>
    ...
</html>
<html>
    <head>
        <script src="https://na.gateway.mastercard.com/checkout/version/59/checkout.js"
                data-timeout="http://[your domain]/timeoutPage"></script>
    </head>
    ...
</html>

Arguments

None

Return Value

None

Copyright © 2023 Mastercard