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

Payu

Medusa PayU Payment Provider

npm install @tax1driver/medusa-payu
Category
Built by
Version
1.0.0
Last updated
8 months ago
Monthly downloads
Loading downloads

Medusa logo

Medusa PayU Payment Provider

MedusaJS | PayU Homepage | PayU Docs | npm

Compatibility

This plugin is compatible with Medusa v2.4.0+.

Overview

This plugin provides PayU payment integration for Medusa commerce platform.

Installation

Configuration

Add the payment provider configuration to your :

Usage

Overview

Once configured, PayU will be available as a payment provider in your Medusa store. The plugin integrates seamlessly with Medusa's payment workflow to handle the complete payment lifecycle.

Required Data

The following data is required from your checkout flow and needs to be provided in the call in order to create a PayU transaction:

Payment Flow

When a customer selects PayU as their payment method during checkout, the plugin creates a new transaction with PayU and returns a payment URL.

  1. Redirect: Redirect the customer to the provided PayU payment URL to let them complete the payment on PayU's payment page.

  2. Payment Processing: After completing or canceling the payment, the customer is redirected back to your store via the configured values.

  3. Webhook Notification: PayU sends a webhook notification to your configured endpoint to confirm the payment status. The plugin automatically validates and processes these webhooks.

  4. Order Completion: Based on the webhook data, Medusa updates the payment and order status accordingly.

Webhook Configuration

The webhook endpoint is automatically registered at . Ensure that:

  • Your points to this endpoint (e.g., )
  • The endpoint is publicly accessible
  • Your firewall allows incoming requests from PayU's servers

Refunds

Refunds can be processed through Medusa's admin panel or API. The plugin will:

  • Create a refund request with PayU
  • Process partial or full refunds
  • Update the order status in Medusa accordingly

You can customize the refund description using the option in the plugin configuration.