Открыта бета 1С:ПредприятияОставить заявку
Monei logo

Monei

Платёжный провайдер MONEI для Medusa v2. Принимайте карты, Bizum, PayPal, Google Pay, Apple Pay и другие способы оплаты.

npm install medusa-payment-monei
Категория
Создано
Регионы
Сервис
Версия
0.1.1
Последнее обновление
3 месяца назад
Ежемесячные загрузки
Загрузка данных

medusa-payment-monei

MONEI payment provider for Medusa v2. Accept Cards, Bizum, PayPal, Google Pay, Apple Pay, BNPL, MB Way, SEPA Direct Debit and more through MONEI — a licensed European Payment Institution (Banco de España #6911).

Features

  • Full payment lifecycle: initiate → authorize → capture → refund → cancel
  • Auth + Capture flow: pre-authorize and capture when ready (default), or auto-capture on authorization
  • Webhook support: real-time payment status updates with HMAC signature verification
  • Multi-payment methods: all MONEI payment methods available automatically (Cards, Bizum, PayPal, Google Pay, Apple Pay, etc.)
  • Hosted Payment Page: redirect customers to MONEI's secure PCI-compliant payment page
  • monei.js integration: storefront can use MONEI JS SDK for embedded payment components
  • Partial capture & refund: supported via MONEI API

Prerequisites

  • Medusa v2 application
  • MONEI account (sign up)
  • API Key from MONEI Dashboard → Settings → API Access

Installation

Configuration

1. Add to

2. Set environment variables

3. Enable in Medusa Admin

Go to Settings → Regions and enable the MONEI payment provider for your region(s).

The provider registers as (format: ).

Payment Flows

  1. Customer selects MONEI → creates a MONEI payment with
  2. Customer completes payment → redirected to MONEI hosted page or uses monei.js component, completes 3DS if needed
  3. MONEI webhook → receives status, completes the cart
  4. Admin captures → calls MONEI capture API

⏰ Capture window: Card payments must be captured within 7 days, Bizum within 30 days.

Auto-capture (set )

  1. Customer selects MONEI → payment created with
  2. Customer completes payment → funds are captured immediately
  3. Webhook receives status → order is created

Webhooks

MONEI sends asynchronous webhook notifications to your Medusa server. Medusa provides a built-in webhook endpoint:

{your_server_url}/hooks/payment/monei_monei

Setting up webhooks

Configure the callback URL in MONEI Dashboard → Settings → Webhooks, or pass it dynamically via in the payment creation.

The plugin verifies the header using the MONEI Node SDK's built-in signature verification.

Storefront Integration

Option A: Hosted Payment Page (simplest)

After , the session data contains . Redirect the customer:

Option B: monei.js Embedded Components

Use the MONEI JS SDK to embed payment components directly in your checkout:

Payment Methods

All payment methods enabled in your MONEI Dashboard are automatically available:

MethodDescription
CardsVisa, Mastercard, Amex via 3D Secure
BizumSpain's #1 mobile payment (direct acquiring)
PayPalGlobal digital wallet
Google PayAndroid/Chrome payments
Apple PayiOS/Safari payments
Click to PayVisa/Mastercard secure remote commerce
BNPLBuy now, pay later (Cofidis, Klarna)
MB WayPortuguese mobile payments
MultibancoPortuguese bank transfers
SEPA DDEuro direct debit

API Reference

Provider Options

OptionTypeDefaultDescription
requiredMONEI API Key
Auto-capture payments on authorization
-Optional webhook signing secret

Session Data

The object stored in the payment session contains:

FieldDescription
MONEI payment ID
Current MONEI payment status
URL for hosted payment page
Reference for monei.js (same as payment ID)
Medusa session tracking ID

Testing

Use test mode credentials from MONEI Dashboard. Test card numbers and Bizum phone numbers are available in the MONEI Testing documentation.

Common test cards:

  • Success:
  • 3DS Required:
  • Declined:

Development

Using as a local module in Medusa

During development, you can place the plugin source directly in your Medusa app:

Then in :

About MONEI

MONEI is a licensed Payment Institution regulated by Banco de España (#6911) and a SWIFT member (BIC: MDIPES22). MONEI provides a unified payments platform for European merchants with direct acquiring for Bizum and multi-acquirer card processing.

License

MIT