Accept payments across Latin America
Receive payments on your Medusa commerce application using Mercado Pago.
Medusa Payment Mercadopago Repository | Medusa Website | Medusa Repository
[!WARNING] This plugin is a WIP and has only been tested for Credit / Debit Card methods following Mercado Pago docs for Uruguay. You can sumbit issues through GitHub Issues. Feel free to make contributions by making pull requests and proposing ideas / new flows to implement via Discussions
1. Run the following command in the directory of the Medusa backend using your package manager (for example for npm):
npm install @nicogorga/medusa-payment-mercadopago
2. Set the following environment variables in :
1# Access Token available in your Mercado Pago application Test Credentials section2MERCADOPAGO_ACCESS_TOKEN=3# (Optional) Webhook secret available in your Mercado Pago application Webhooks section4MERCADOPAGO_WEBHOOK_SECRET=
3. In add the following at the end of the array in your project config object:
1projectConfig: {2 plugins = [3 // ...4 {5 resolve: `@nicogorga/medusa-payment-mercadopago`,6 options: {7 accessToken: process.env.MERCADOPAGO_ACCESS_TOKEN,8 webhookSecret: process.env.MERCADOPAGO_WEBHOOK_SECRET,9 },10 },11]12}
4. In add the following to the array in your project config object:
1modules: [2 {3 resolve: '@medusajs/medusa/payment',4 options: {5 providers: [6 {7 resolve: '@nicogorga/medusa-payment-mercadopago/providers/mercado-pago',8 id: 'mercadopago',9 options: {10 accessToken: process.env.MERCADOPAGO_ACCESS_TOKEN,11 webhookSecret: process.env.MERCADOPAGO_WEBHOOK_SECRET,12 },13 dependencies: [14 ContainerRegistrationKeys.LOGGER15 ]16 }17 ],18 }19 }20 ],
1. Run the following command in the directory of the Medusa backend to run the backend:
npm run dev
2. Enable Mercadopago in a region in the admin. Alternatively, you can use the Admin APIs.
3. Place an order using a frontend that collects payment data using Mercadopago Payment brick like this. Send a POST to with a body that adheres to validator