Customize Redirect and Retry Behavior
If you are using Hosted Checkout, you can customize the redirect and retry behavior as it allows you to limit the retry attempts and redirect the users from the checkout page to the merchant application. The customizations are defined in Initiate Checkout operation.
If you have a checkout integration that uses an embedded form or payment page, you can customize the Mastercard Checkout user experience by redirecting your customers after they encounter a successful or failed payment.
Existing merchants remain unaffected and they can extend the functionality by simply passing the redirectMerchantUrl
and retryAttemptCount
in Initiate Checkout call while creating the session. The payer redirects to the merchant portal only if both the new variables are passed in Initiate Checkout.
You can customize the redirect and retry behavior for the following options:
Successful transaction
The merchant can always redirect the customers or reside on the checkout disabling redirects.
To redirect, the merchant needs to share theinteraction.returnUrl
in Initiate Checkout.Failed transaction
The merchant has three options:
- Always redirect customers.
- Allow up to three retry attempts before redirecting.
- Disable redirects entirely during checkout.
To redirect, the merchant needs to share theinteraction.redirectMerchantUrl
andinteraction.retryAttemptCount
in Initiate Checkout.
If the interaction.redirectMerchantUrl
and interaction.retryAttemptCount
are not passed in Initiate Checkout then, the merchant can choose to limit the retry attempts up to three times without making the payer to redirect to the merchant application by toggling on "Limit session payment attempts.
Frequently asked questions
Which pages the changes are applicable to?
The changes are only applicable to "Modern" Hosted Checkout. The changes are applicable to the Payment page, embedded mode, payment link, and the Initiate Checkout API call.
Which version the changes are available from?
The changes are available from version 63 and later.