Wompi
Wompi El Salvador payment provider plugin for MedusaJS v2
@mantissaio/medusa-payment-wompi
Receive payments on your Medusa commerce application using Wompi El Salvador.
Medusa Website | Wompi Docs | Wompi API
Note
This plugin supports the Enlace de Pago (hosted payment page) flow. Tokenization () and recurring payments are not yet supported. The WompiClient includes methods for these endpoints, ready to be wired into the provider in a future release.
Features
- Payment via Wompi hosted payment page (Enlace de Pago)
- All payment methods supported: credit/debit card, Puntos Agricola, cuotas, Bitcoin, QuickPay, Nequi (opt-in)
- Webhook validation via HMAC-SHA256
- Auto-capture (Wompi captures at the moment of payment)
- Single-use payment links (one successful payment per link)
Prerequisites
- Node.js v20+
- A Medusa v2 backend (v2.13.0 or later)
- A Wompi account with at least one business (negocio) configured
- For local testing, expose localhost via ngrok or similar
Wompi credentials
From the Wompi Panel, navigate to your business detail to find:
- App ID → used as
- API Secret → used as and
Installation
Configuration
Environment Variables
Medusa Configuration
In your :
Options
| Option | Required | Description |
|---|---|---|
| Yes | App ID from Wompi panel | |
| Yes | API Secret for OAuth authentication | |
| Yes | API Secret for webhook HMAC validation | |
| No | for development mode (default: ) | |
| No | URL where the customer is redirected after payment | |
| No | Webhook URL for payment notifications | |
| No | Override which payment methods are enabled on the payment page |
By default, card, Puntos Agricola, cuotas, Bitcoin and QuickPay are enabled. Nequi is opt-in:
Webhook Setup
Medusa automatically exposes a webhook endpoint at:
/hooks/payment/wompi_wompiFor local development:
- Run your Medusa backend:
- In a separate terminal:
- Set to
Wompi sends a header (HMAC-SHA256 of the body using your API Secret) which the plugin validates automatically.
Payment Flow
- Customer initiates checkout → Medusa calls → plugin creates an Enlace de Pago in Wompi
- Storefront calls with → receives
- Storefront redirects customer to → customer pays on Wompi's hosted page
- Wompi sends webhook to → plugin validates HMAC and confirms payment
- Wompi redirects customer to → storefront shows order confirmation
Store API
POST
Request:
Response:
Refunds
Wompi does not expose a refund API. When a refund is issued from the Medusa admin, the plugin records it in Medusa for traceability (with status ) but the actual fund return must be processed manually through the Wompi Panel or directly with Banco Agricola.
Test the Plugin
- Run your Medusa backend:
- Enable Wompi in a region via the admin dashboard or Admin API
- Make sure your business is in development mode in the Wompi panel (transactions won't be real)
- To simulate a rejected payment in development mode, use CVV

