Home
Documentation
Resources
Certifications
Community

Resources

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

Community

Get the latest news, ask others for help and share your knowledge.

SDK JS - ES Module - Client-side - Mercado Pago Developers

Intelligent search powered by OpenAI 

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

Important
It is important to note that while Internet Explorer 11 is compatible with some Checkout API, flows, the browser is not officially supported by Mercado Pago.
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");