Home
Documentation
Resources
Partners
Community

Resources

Check for updates on our solutions and system performance, or request technical support.

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.

Online payments
In-person payments
Tools and resources
APIs and SDKs
Cards - Configure payment methods - Mercado Pago Developers

Cards

The integration of payments with credit and/or debit cards in Checkout API can be done in two ways. The recommended integration is through the Card Payment Brick, where the Brick takes care of retrieving the necessary information to process the payment. However, if you prefer to be responsible for determining how this information will be retrieved, you can perform your integration using Core Methods.

In the integration through the Card Payment Brick, the MercadoPago.js library, included in your project during the configuration of the development environment, is responsible for obtaining the information required for processing a payment. This means it searches for the types of documents available for the corresponding country, and as the card data is entered, it also retrieves information related to the issuer and the available installments.

All information involved in processing the transaction is stored in the backend, in compliance with PCI security standards.

In addition, the component provides the ability to guide the user with alerts for incomplete fields or possible errors when filling out the data, optimizing the purchasing process.

With this, the implementation of the flow is transparent for those who are performing the integration, as shown in the diagram below.

  sequenceDiagram
    participant Buyer's Browser
    participant Integrator Front-end
    participant MercadoPago.js
    participant Integrator Back-end
    participant Mercado Pago API

    Buyer's Browser->>Integrator Front-end: 1. The buyer accesses the payment screen.
    Integrator Front-end->>MercadoPago.js: 2. The integrator's front-end downloads and initializes Mercado Pago's JS SDK.
    Integrator Front-end->>Buyer's Browser: 3. The integrator's front-end displays the payment form.
    Buyer's Browser->>Integrator Front-end: 4. The buyer completes the form and submits the payment.
    Integrator Front-end->>MercadoPago.js: 5. The integrator's front-end uses the JS SDK to create a token containing the card data securely.
    Integrator Front-end->>Integrator Back-end: 6. The integrator's front-end sends the card token and payment data to its back-end.
    Integrator Back-end->>Mercado Pago API: 7. The back-end calls Mercado Pago services to create the payment.
    Mercado Pago API->>Buyer's Browser: 8. The integrator's front-end shows the buyer the result of the transaction.
    Mercado Pago API->>Integrator Back-end: 9. Mercado Pago may send notifications via Webhook with payment status updates.
    Integrator Back-end->>Buyer's Browser: 10. If applicable, the buyer is notified about the payment update.

To proceed with the setup of debit and/or credit card payments via Card Payment Brick, follow the steps below.

Lembre-se: antes de configurar os meios de pagamento, escolha o modo em que irá processar as suas transações. Para mais informações, acesse a seção Modelo de integração.