Opening scheme with external redirect
The opening scheme defines how the checkout will be displayed to the user. Checkout Pro offers two modalities:
- Redirect (default): redirects the user within the same browser window
- External redirect: opens the checkout in a new window or tab
This configuration can be done via SDK or API. Select the option you prefer and follow the steps below.
Configure external redirect
To open the checkout in a new window or tab, use the redirectMode
property with the blank
value when initializing the checkout from the payment preference.
Value | Behavior |
self | Redirects in the same window (default behavior). |
blank | Opens the checkout in a new window or tab. |
You can use the following example to implement a payment in redirect mode:
mp.bricks().create("wallet", "wallet_container", {
initialization: {
preferenceId: "<PREFERENCE_ID>",
redirectMode: "blank"
},
});
<Wallet initialization={{ preferenceId: '<PREFERENCE_ID>', redirectMode: 'blank' }} />