AI resources

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, available for websites.

In the integration through the Card Payment for websites, 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 Frontend
    participant MercadoPago.js
    participant Integrator Backend
    participant Mercado Pago API

    Buyer's Browser->>Integrator Frontend: 1. The buyer accesses the payment screen.
    Integrator Frontend->>MercadoPago.js: 2. The integrator's frontend downloads and initializes Mercado Pago's JS SDK.
    Integrator Frontend->>Buyer's Browser: 3. The integrator's frontend displays the payment form.
    Buyer's Browser->>Integrator Frontend: 4. The buyer completes the form and submits the payment.
    Integrator Frontend->>MercadoPago.js: 5. The integrator's frontend uses the JS SDK to create a token containing the card data securely.
    Integrator Frontend->>Integrator Backend: 6. The integrator's frontend sends the card token and payment data to its backend.
    Integrator Backend->>Mercado Pago API: 7. The backend calls Mercado Pago services to create the payment.
    Mercado Pago API->>Buyer's Browser: 8. The integrator's frontend shows the buyer the result of the transaction.
    Mercado Pago API->>Integrator Backend: 9. Mercado Pago may send notifications via Webhook with payment status updates.
    Integrator Backend->>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, follow the steps below.

Remember: before setting up the payment methods, choose the way you will process your transactions. The processing mode, whether manual or automatic, will be defined at the time of order creation, using the processing_mode parameter. For more information, visit the section Integration model.