The production-ready Medusa DTC Starter is outRead the announcement
Wompi logo

Wompi

Wompi El Salvador payment provider plugin for MedusaJS v2

VerifiedVersion 1.1.0 on Medusa 2.22.2, Oct 30, 2026
npm install @mantissaio/medusa-payment-wompi
Category
Built by
Service
Version
1.1.0
Last updated
1 month ago
Monthly downloads
Loading downloads

@mantissaio/medusa-payment-wompi

Leer en Español

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

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

OptionRequiredDescription
YesApp ID from Wompi panel
YesAPI Secret for OAuth authentication
YesAPI Secret for webhook HMAC validation
No for development mode (default: )
NoURL where the customer is redirected after payment
NoWebhook URL for payment notifications
NoOverride 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_wompi

For local development:

  1. Run your Medusa backend:
  2. In a separate terminal:
  3. Set to

Wompi sends a header (HMAC-SHA256 of the body using your API Secret) which the plugin validates automatically.


Payment Flow

  1. Customer initiates checkout → Medusa calls → plugin creates an Enlace de Pago in Wompi
  2. Storefront calls with → receives
  3. Storefront redirects customer to → customer pays on Wompi's hosted page
  4. Wompi sends webhook to → plugin validates HMAC and confirms payment
  5. 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

  1. Run your Medusa backend:
  2. Enable Wompi in a region via the admin dashboard or Admin API
  3. Make sure your business is in development mode in the Wompi panel (transactions won't be real)
  4. To simulate a rejected payment in development mode, use CVV

Development

Local testing with a Medusa project


Additional Resources