• Модуль интеграций
  • Сообщество
  • Блог
Документация
Плагины и интеграцииВсе расширения для Medusa от сообществаСтартерыЗапускайте проекты быстрее с готовыми решениями
ЭкспертыПодберите специалиста для разработки и развития вашего проекта на MedusaКейсыПосмотрите примеры Medusa в продакшене и успешные внедрения
Представляем готовый к продакшену Medusa DTC Starter от Gorgo

26 августа 2026 г. · Продукт

Gorgo снижает затраты на адаптацию Medusa к локальным рынкам.

Мы разрабатываем плагины интеграции, осуществляем поддержку и развиваем сообщество разработчиков на Medusa в Telegram.

  • Ресурсы Medusa
  • Плагины и интеграции
  • Модуль интеграций
  • Стартеры
  • Эксперты
  • Кейсы
  • Medusa Чат в Telegram
  • Medusa Новости в Telegram
  • Документация Gorgo
  • Связаться с нами
  • TelegramGitHub
Плагины
P

Pay mpago

Платёжный провайдер MercadoPago для Medusa v2. Карты с рассрочкой, PIX, подписанные вебхуки, синхронизация возвратов со стороны провайдера, интерфейс настроек в Admin (pt-BR)

npm install @hewsos/medusa-pay-mpago
Категория
Платежи
Создано
Hewsos
Версия
0.1.4
Последнее обновление
1 день назад
Ежемесячные загрузки
Загрузка данных
Звезды на Github
0
npmNPMGitHubGithub

@hewsos/medusa-pay-mpago

MercadoPago (Mercado Pago) payment plugin for Medusa v2

MercadoPago payment provider for Medusa v2 — built for Brazilian stores.

  • Credit/debit cards with installments (parcelamento), BIN-based method detection
  • PIX with QR code, expiry countdown and a configurable PIX discount promotion
  • Signed webhooks (HMAC-SHA256, fail-closed, replay-window checked)
  • Provider-initiated refund/chargeback sync — refunds made in the MP dashboard are recorded back into Medusa automatically
  • Idempotent (safe under duplicate webhooks and races)
  • Admin settings UI (pt-BR): credentials, capture mode, per-method config, connection health checks, order-page live status widget

Install

needs both registrations:

The resulting provider id is and the webhook path segment is — configure in the MercadoPago developers panel. Both strings are public API of this plugin: they are persisted in the database and embedded in webhook URLs. Do not change the after going live.

Instance id convention

The instance encodes the axes along which provider accounts actually vary — not a fixed template:

  • MercadoPago accounts vary by brand and country (an MP Brasil seller cannot charge in ARS) → : , , .
  • A country-bound carrier (e.g. Correios in ) varies only by brand/contract → alone: . Appending there would encode a dimension with exactly one possible value.

Same rule, applied per provider. Whatever the value: frozen once live.

Host requirements

This plugin reaches into two host-owned resources. Both work out of the box on a standard Medusa installation, but they are requirements your environment must satisfy:

RequirementUsed forNotes
env varAtomic settings writes ( on Store metadata via a direct connection)Falls back to read-merge-write through Medusa's ORM if unavailable
env var (falls back to )AES-256-GCM encryption of stored MP credentialsRotating the effective key makes stored credentials undecryptable — re-enter them in the admin afterwards
PIX discount promotionThe advertised PIX discount is a real server-side promotionRun once per environment: (the merchant owns the promotion config afterwards)

Storefront contract

The plugin exposes these Store API routes for a storefront integration (publishable-key scoped):

  • — enabled methods, installment config
  • — the MP public key for MercadoPago.js
  • — PIX payment polling
  • — rejection telemetry
  • — apply/remove the PIX discount promotion

Removal semantics

The provider is provider-shaped: it defines no data models. Removing the plugin from config flips the row to (Medusa-owned); historical payments keep resolving. The plugin's persistent state lives in Store JSONB keys (, , rejection telemetry) which remain as inert residue after removal.

Supported countries

MercadoPago operates across Latin America and the core of this plugin (Orders API, webhooks, refund sync, credentials) is country-agnostic — but the checkout finish is currently built for Brazil:

CountryStatusNotes
🇧🇷 BrazilSupportedCards + installments, PIX (QR/polling/expiry/discount), CPF payer id, pt-BR UI. All testing against MP Brasil.
🇦🇷 🇲🇽 🇺🇾 🇵🇪 Argentina, Mexico, Uruguay, PeruPlannedCards should work in principle, but payer identification is hardcoded to CPF (needs DNI/CURP/CI/DNI per country) and UI strings are pt-BR only. Untested.
🇨🇱 🇨🇴 Chile, ColombiaPlanned, known blockerEverything above plus amounts are formatted with 2 decimals — wrong for zero-decimal CLP/COP. Do not use until fixed.

Known Brazil-isms to generalize before multi-country support: payer identification type (CPF-only today), currency decimal handling (2-decimal assumption), i18n (pt-BR only), per-country payment methods (PIX is Brazil-only; local methods elsewhere are not implemented), semantics assume BRL magnitudes.

Multi-country stores are already modeled by the instance convention (, one provider entry + MP account per country) — the per-country work above is what remains to make non-BR instances real.

Compatibility

PluginMedusa
0.1.x^2.13.1

Development

If your host app runs in Docker with in a named volume, run the yalc loop inside the container (mount this repo into it) — a host-side will land in a the container never sees.

See DEVELOPMENT.md for the full Docker-host dev loop as actually exercised (yalc paths, compose mount, hot-patch loop, gotchas).

MercadoPago references

This plugin integrates the MercadoPago Orders API () and Payments API. Official documentation (not mirrored here — MP copyright):

  • Developers portal: https://www.mercadopago.com.br/developers/pt
  • Orders API reference: https://www.mercadopago.com.br/developers/pt/reference/orders/online-payments/create/post
  • Webhooks: https://www.mercadopago.com.br/developers/pt/docs/your-integrations/notifications/webhooks
  • Test cards & users: https://www.mercadopago.com.br/developers/pt/docs/your-integrations/test/cards

License

MIT © Hewsos

Еще в этой категории

Посмотреть все
Платежи
Braintree logo

Braintree

От Lambda Curry

Поддержка платежей и 3D Secure через Braintree

Загрузка данных
GitHubnpm
Платежи
Pay. logo

Pay.

От Webbers

Принимайте кредитные карты, цифровые платежи и купи сейчас, плати потом

Загрузка данных
GitHubnpm
Платежи
Mollie logo

Mollie

От Variable Vic

Легко принимайте мультивалютные платежи через Mollie

Загрузка данных
GitHubnpm
npm install @hewsos/medusa-pay-mpago
1module.exports = defineConfig({
2 plugins: [
3 { resolve: "@hewsos/medusa-pay-mpago", options: {} },
4 ],
5 modules: [
6 {
7 resolve: "@medusajs/medusa/payment",
8 key: Modules.PAYMENT,
9 options: {
10 providers: [
11 {
12 resolve: "@hewsos/medusa-pay-mpago/providers/mercadopago",
13 id: "regia-br", // {brand}-{country} — your instance label
14 options: {
15 // env fallbacks only — credentials are normally entered in the
16 // admin (Settings → MercadoPago → Conexão) and stored encrypted
17 accessToken: process.env.MERCADOPAGO_ACCESS_TOKEN || "",
18 webhookSecret: process.env.MERCADOPAGO_WEBHOOK_SECRET || "",
19 },
20 },
21 ],
22 },
23 },
24 ],
25})
1npm install
2npx medusa plugin:build # compile check
3npx medusa plugin:publish # yalc-publish into a local host app
4npx medusa plugin:develop # watch mode