Home
Documentation
Resources
Partners
Community

Partners

Discover our program for agencies or developers that offer integration services and sellers who want to hire them.

Community

Get the latest news, ask others for help and share your knowledge.

Opening mode - Advanced features - Mercado Pago Developers

Intelligent search powered by OpenAI 

Opening mode

The opening scheme allows you to define how the checkout will open for the user. By default, Checkout Bricks is opened in a redirect way, that is, with user redirection within the same page. However, it is possible to customize the opening so that the opening is on an external page.

Attention
It is extremely important to pay attention, when creating the preference, to the back_urls configuration, as they will be responsible for guiding the return flow to your website when the checkout is completed. For more information, see the Callback URLs. section.

Redirection scheme to another page

Changing the redirection behavior is done by the redirectMode property, which can assume the values self or blank.

ValorDescrição
selfKeeps the redirect on the same page.
blankExternalizes the redirect to a new page.
The code blocks below implement checkout in redirect mode to another page.
          
const renderComponent = async (bricksBuilder) => {
 const settings = {
   initialization: {
     preferenceId: '<PREFERENCE_ID>',
     redirectMode: 'blank'
   }
 };
 const brickController = await bricksBuilder.create(
   'wallet',
   'wallet_container',
   settings
 );
};
renderComponent (bricksBuilder);

        
          
<Wallet initialization={{ preferenceId: '<PREFERENCE_ID>', redirectMode: 'blank' }} />