Preference on startup - Advanced features - Mercado Pago Developers
What are you looking for?

Do not know how to start integrating? 

Check the first steps

Preference on startup

If you prefer, you can also add the preference at Brick startup. This can be useful if you already have your payment information when loading Brick. To do this, add the preference ID to Brick's initialization object.

          
const settings = {
 ...,
 initialization: {
   preferenceId: '<PREFERENCE_ID>',
 },
customization: {
 texts: {
  valueProp: 'smart_option',
 },
};

        
          
const initialization = {
  preferenceId: '<PREFERENCE_ID>',
}

const customization = {
texts: {
  valueProp: 'smart_option',
 },
}

        

In this case, it is not necessary to pass the preference onSubmit.