Платёжный провайдер MONEI для Medusa v2. Принимайте карты, Bizum, PayPal, Google Pay, Apple Pay и другие способы оплаты.
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).
Go to Settings → Regions and enable the MONEI payment provider for your region(s).
The provider registers as (format: ).
⏰ Capture window: Card payments must be captured within 7 days, Bizum within 30 days.
MONEI sends asynchronous webhook notifications to your Medusa server. Medusa provides a built-in webhook endpoint:
{your_server_url}/hooks/payment/monei_moneiConfigure 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.
After , the session data contains . Redirect the customer:
Use the MONEI JS SDK to embed payment components directly in your checkout:
All payment methods enabled in your MONEI Dashboard are automatically available:
| Method | Description |
|---|---|
| Cards | Visa, Mastercard, Amex via 3D Secure |
| Bizum | Spain's #1 mobile payment (direct acquiring) |
| PayPal | Global digital wallet |
| Google Pay | Android/Chrome payments |
| Apple Pay | iOS/Safari payments |
| Click to Pay | Visa/Mastercard secure remote commerce |
| BNPL | Buy now, pay later (Cofidis, Klarna) |
| MB Way | Portuguese mobile payments |
| Multibanco | Portuguese bank transfers |
| SEPA DD | Euro direct debit |
| Option | Type | Default | Description |
|---|---|---|---|
| required | MONEI API Key | ||
| Auto-capture payments on authorization | |||
| - | Optional webhook signing secret |
The object stored in the payment session contains:
| Field | Description |
|---|---|
| MONEI payment ID | |
| Current MONEI payment status | |
| URL for hosted payment page | |
| Reference for monei.js (same as payment ID) | |
| Medusa session tracking ID |
Use test mode credentials from MONEI Dashboard. Test card numbers and Bizum phone numbers are available in the MONEI Testing documentation.
Common test cards:
During development, you can place the plugin source directly in your Medusa app:
Then in :
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.
MIT
1npm install medusa-payment-monei2# or3yarn add medusa-payment-monei1import { defineConfig } from "@medusajs/framework/utils"2
3export default defineConfig({4 // ...5 modules: [6 {7 resolve: "@medusajs/medusa/payment",8 options: {9 providers: [10 {11 resolve: "medusa-payment-monei",12 id: "monei",13 options: {14 apiKey: process.env.MONEI_API_KEY,15 // Optional: auto-capture payments (default: false)16 // When false, payments use AUTH + manual capture flow17 // When true, payments use SALE flow (captured immediately)18 capture: false,19 },20 },21 ],22 },23 },24 ],25})1# .env2MONEI_API_KEY=pk_test_xxxxxxxxxxxxxxxxxxxxx1// In your checkout component2const paymentSession = cart.payment_collection?.payment_sessions?.[0]3
4if (paymentSession?.data?.redirect_url) {5 window.location.href = paymentSession.data.redirect_url6}1import monei from "@monei-js/components"2
3// The payment ID from the session data serves as the client reference4const paymentId = paymentSession.data.id5
6// Render card input7const cardInput = monei.CardInput({8 paymentId,9 onChange: (event) => {10 // Handle validation11 },12})13cardInput.render("#card-input")14
15// Confirm payment16const result = await monei.confirmPayment({17 paymentId,18 paymentToken: token, // from cardInput.getToken()19})1# Clone and install2git clone https://github.com/MONEI/medusa-payment-monei.git3cd medusa-payment-monei4npm install5
6# Build7npm run build8
9# Watch mode10npm run watch1your-medusa-app/2 src/3 modules/4 monei-payment/5 service.ts ← copy from src/service.ts6 index.ts ← copy from src/index.ts1{2 resolve: "@medusajs/medusa/payment",3 options: {4 providers: [5 {6 resolve: "./src/modules/monei-payment",7 id: "monei",8 options: {9 apiKey: process.env.MONEI_API_KEY,10 },11 },12 ],13 },14}