A Medusa plugin for Mollie payments.
A comprehensive payment provider plugin that enables Mollie payments on Medusa V2 projects.
Multiple Payment Methods: Supports a wide range of Mollie payment methods including:
Easily Extendable: The modular architecture makes it easy to add support for additional Mollie payment methods.
Webhook Support: Full support for Mollie webhooks for real-time payment status updates.
Automatic Capture: Configurable automatic capture of payments.
[!WARNING] This plugin has not been tested on a live store. Please conduct thorough testing before using it in a production environment. I am not responsible for any missed or failed payments resulting from the use of this plugin. If you encounter any issues, please report them here.
[!NOTE] You can get an API key from your Mollie dashboard: click Browse > Developers > API keys
yarn add @variablevic/mollie-payments-medusa
Add the provider to the module in your file:
modules: [// ... other modules{resolve: "@medusajs/payment",options: {providers: [// ... other providers{resolve: "@variablevic/mollie-payments-medusa/providers/mollie",id: "mollie",options: {apiKey: process.env.MOLLIE_API_KEY,redirectUrl: process.env.MOLLIE_REDIRECT_URL,medusaUrl: process.env.MEDUSA_URL,},},],},}]
| Option | Description | Default |
|---|---|---|
| Your Mollie API key | Required | |
| The URL to redirect to after payment | Required | |
| The URL of your Medusa server | Required | |
| Whether to automatically capture payments | ||
| The description that appears on the payment. | ||
| Whether to enable debug mode |
Create or update your file with the following variables:
MOLLIE_API_KEY=your_mollie_api_keyMOLLIE_REDIRECT_URL=https://your-store.com/checkout/paymentMEDUSA_URL=https://your-medusa-server.com
Once installed and configured, the Mollie payment methods will be available in your Medusa admin. To enable them, log in to you Medusa Admin, browse to Settings > Regions, add or edit a region and select the desired Mollie providers from the dropdown.
Make sure that the selected payment methods are enabled in your Mollie origanization settings as well.
To integrate with your storefront, you'll need to implement the payment flow according to Mollie's and Medusa's documentation. Here's a basic example:
Example integration using the Medusa Next.js Starter:
https://github.com/user-attachments/assets/742ee261-5e41-4e33-9a72-faf1a424fc52
The plugin currently supports the following Mollie payment methods:
| Payment Method | Provider ID |
|---|---|
| Hosted Checkout | |
| iDEAL | |
| Credit Card | |
| Bancontact | |
| Gift Card | |
| PayPal | |
| Apple Pay |
To add support for additional Mollie payment methods, create a new service in that extends the class:
import { PaymentMethod } from "@mollie/api-client";import MollieBase from "../core/mollie-base";import { PaymentOptions, PaymentProviderKeys } from "../types";class MollieNewMethodService extends MollieBase {static identifier = "mollie-new-method";get paymentCreateOptions(): PaymentOptions {return {method: PaymentMethod.newMethod,};}}export default MollieNewMethodService;
Make sure to replace with the actual Mollie payment method ID.
Export your new service from . Then add your new service to the list of services in .
In case you want to customize and test the plugin locally, refer to the Medusa Plugin docs.
TBD