• Сообщество
  • Блог
Документация
Плагины и интеграцииВсе расширения для Medusa от сообществаСтартерыЗапускайте проекты быстрее с готовыми решениями
ЭкспертыПодберите специалиста для разработки и развития вашего проекта на MedusaКейсыПосмотрите примеры Medusa в продакшене и успешные внедрения
Меч Moscow
Комплексная e-commerce платформа на Medusa для московского fashion-бренда

Меч Moscow · Fashion

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

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

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

Nmi

Medusa v2 payment provider plugin for the NMI Gateway — card + ACH/eCheck + Apple/Google Pay via the NmiPayments tokenization component

npm install medusa-payment-nmi
Категория
Платежи
Создано
Beefedup
Версия
0.2.0
Последнее обновление
3 дня назад
Ежемесячные загрузки
Загрузка данных
Звезды на Github
0
npmNPMGitHubGithub

medusa-payment-nmi

A Medusa v2 payment provider for the NMI Gateway — card, ACH/eCheck, and Apple/Google Pay through one provider, collected with NMI's official component (). The card PAN / bank number is tokenized in the browser and never touches your server.

You register a single NMI payment method; the customer picks card or bank (or a wallet) inside the payment element, and the provider runs the right lifecycle:

  • Card / Apple Pay / Google Pay authorize synchronously — the backend charges the token via the Payment API and knows the result immediately.
  • ACH is asynchronous — the backend submits the debit (); a settlement webhook captures it, an ACH return fails it.

Install

npm install medusa-payment-nmi

Or straight from GitHub (the script builds on install):

npm install github:Kaelbroersma/medusa-payment-nmi

Requires: Medusa , Node .

This package is a standard Medusa plugin built with , so it follows the official exports layout — resolves the payment module provider.

Configure ()

1module.exports = defineConfig({
2 modules: [
3 {
4 resolve: "@medusajs/medusa/payment",
5 options: {
6 providers: [
7 {
8 resolve: "medusa-payment-nmi/providers/nmi",
9 options: {
10 securityKey: process.env.NMI_SECURITY_KEY,
11 tokenizationKey: process.env.NMI_TOKENIZATION_KEY,
12 webhookSecret: process.env.NMI_WEBHOOK_SECRET,
13 captureMethod: "auth", // card/wallet: "auth" or "sale"
14 secCode: "WEB", // ACH SEC code (internet-initiated consumer debit)
15 sandbox: process.env.NODE_ENV !== "production",
16 },
17 },
18 ],
19 },
20 },
21 ],
22})
OptionRequiredNotes
✅Private API key for .
✅Public key; sent to the storefront component.
✅Webhook signing key (HMAC-SHA256).
—Card/wallet: (default) or .
—ACH: (default), , , .
—Use .

How a payment flows

  1. returns to the storefront.
  2. tokenizes the chosen method → a single-use token; the storefront writes onto the payment session and completes the cart.
  3. charges the token:
    • card/wallet → or (per ) → / .
    • ach → → (not yet settled).
  4. For ACH, the settlement webhook → ; an ACH return → .

Webhooks

Medusa exposes one webhook route for the provider:

In NMI Merchant Portal → Settings → Webhooks, add that URL, paste the signing key (your ), and subscribe to these events:

Events
, , , , , ,

The handler verifies the HMAC and maps each event to the right action, disambiguating card vs ACH by the event body. NMI requires public HTTPS — for local dev, tunnel (e.g. , ) to your backend.

Note on async outcomes: Medusa's built-in payment-webhook subscriber acts on the and outcomes. ACH settlement (→ captured) works out of the box. ACH returns and voids are detected and mapped by this provider but, like all / webhook outcomes in current Medusa core, do not auto-transition the payment — add your own subscriber on the event if you need automated return/void reconciliation.

Storefront

See for the copy-paste component and checkout wiring.

Local development

The repo uses the official Medusa plugin toolchain:

1npm install # also builds .medusa/server via prepare
2npm run dev # medusa plugin:develop — watch + publish to the local registry
3npm test # vitest unit tests

To try local changes inside a Medusa app, use the local plugin workflow:

1# in this repo
2npx medusa plugin:publish
3
4# in your Medusa app
5npx medusa plugin:add medusa-payment-nmi

Not in v1

Saved cards / NMI Customer Vault. The account-holder methods are implemented as no-ops around a synthetic holder; no card is stored. (Easy to add later.)

License

MIT

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

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

Braintree

От Lambda Curry

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

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

Pay.

От Webbers

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

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

Mollie

От Variable Vic

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

Загрузка данных
GitHubnpm