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.

SDK JS - ES Module - Client-side - Mercado Pago Developers
Which documentation are you looking for?

Do not know how to start integrating? 

Check the first steps

SDK JS - ES Module

Version 2 of the client-side SDK has functions based on Promises. In addition, it has a renewed interface for developers and handles errors more efficiently.
Element for view
Compatible browsers

Compatible navigators

Fraud prevention This version has a functionality that, based on the analysis of the buyer's behavior, identifies if a transaction is fraudulent or suspicious. This analysis is intended to improve the approval of payments. If you wish, you can turn off this feature. Check our [technical reference](https://github.com/mercadopago/sdk-js#api).
      Installation

      To install the frontend SDK, include MercadoPago.js in your application's HTML or install the package on npm according to the code below.

                
      <body>
        <script src="https://sdk.mercadopago.com/js/v2"></script>
      </body>
      
              
                
      npm install @mercadopago/sdk-js
      
      
              

      Then, add the Public key of the account being integrated so that it can be identified when connecting to Mercado Pago. Learn more about Public key in Credentials.

                
      <script>
        const mp = new MercadoPago("YOUR_PUBLIC_KEY");
      </script>
      
              
                
      import { loadMercadoPago } from "@mercadopago/sdk-js";
      
      
      await loadMercadoPago();
      const mp = new window.MercadoPago("YOUR_PUBLIC_KEY");