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.

Add saved cards - Advanced features - Mercado Pago Developers

Intelligent search powered by OpenAI 

Include saved cards

Client-Side

In order for Payment Brick to be able to display the saved cards of a given buyer, it is necessary to send the customer ID and card IDs to Brick at the time of its initialization, as in the example below.

          
settings = {
   initialization: {
       ...,
       payer: {
           ...,
           customerId: '209277402-FqRqgEc3XItrxs',
           cardsIds: [ '1518023392627', '1518023332143' ]
       },
   },
   ...
}

        
          
const initialization = {
 ...,
 payer: {
   ...,
   customerId: '209277402-FqRqgEc3XItrxs',
   cardsIds: [ '1518023392627', '1518023332143' ]
 },
};

        

Just passing these two properties, Brick will automatically give the user the option to make the payment with their saved cards.

Attention
Only no expired cards will be shown to the buyer, expired cards will not be made available.

payment-Brick-cc

To learn how to create, modify and get the customerId and cardsIds, see the Cards and customers management section of the Checkout API documentation.