SDK JS - React - Client-side - Mercado Pago Developers

SDK JS - React

Our React SDK is compatible with the most updated standard for web development, as well as providing functions and components that allow for simplified integration with Mercado Pago.

To use the React SDK, install it via npm using the code below.

          
npm install @mercadopago/sdk-react


        

Next, add the public key of the account being integrated so that it can be identified when connecting to Mercado Pago.

Important
See Credentials for more details on the public key.
          
import { initMercadoPago } from '@mercadopago/sdk-react'
initMercadoPago('YOUR_PUBLIC_KEY');


        

After completing the SDK installation, you can use the following modules to create the Checkout.

Payment Brick

AVAILABLE

Offer different payment methods from which your customers can choose, with the ability to save card details for future purchases.
Learn more
Wallet Brick

AVAILABLE

Link Mercado Pago Wallet and allow logged payments.
Learn more
Card Payment Brick

AVAILABLE

Offer credit and debit card payments.
Learn more
Status Screen Brick

AVAILABLE

Inform your customers of the results of the purchase process, after making the payment.
Learn more
Important
If it is necessary to add or modify any logic in the flow of Core methods in React, please check the documentation Core Methods in our SDK library.