Back to Plugins

Robokassa Payment Provider

A comprehensive Robokassa payment integration plugin for Medusa commerce platforms, enabling Russian merchants to accept online payments with full compliance to Russian regulations.


Overview

This plugin provides seamless integration with the Robokassa payment system, a popular payment gateway in Russia. It includes support for online receipt generation compliant with Russian Federal Law No. 54 (54-ФЗ), making it ideal for businesses operating in the Russian market.

Features

Requirements

Installation

Install the plugin using npm:

npm install @gorgo/medusa-payment-robokassa

Configuration

Add the plugin to your medusa-config.js:

const plugins = [
  // ... other plugins
  {
    resolve: "@gorgo/medusa-payment-robokassa",
    options: {
      // Your Robokassa merchant configuration
      merchant_login: process.env.ROBOKASSA_MERCHANT_LOGIN,
      password1: process.env.ROBOKASSA_PASSWORD_1,
      password2: process.env.ROBOKASSA_PASSWORD_2,
      test_mode: process.env.NODE_ENV !== "production",
      // Receipt generation settings for 54-ФЗ compliance
      receipt: {
        sno: "osn", // Tax system
        // Additional receipt settings
      },
    },
  },
]

Environment Variables

Create a .env file with your Robokassa credentials:

ROBOKASSA_MERCHANT_LOGIN=your_merchant_login
ROBOKASSA_PASSWORD_1=your_password_1
ROBOKASSA_PASSWORD_2=your_password_2

Usage

Single-Stage Payments (Autocapture)

Single-stage payments automatically capture funds when the customer completes payment:

  1. Customer initiates checkout
  2. Payment is processed through Robokassa
  3. Funds are automatically captured
  4. Webhook notification updates order status

Two-Stage Payments (Authorization & Capture)

Two-stage payments allow you to authorize first and capture later:

  1. Customer initiates checkout
  2. Payment is authorized (funds are held)
  3. Merchant manually captures payment when ready to fulfill
  4. Funds are transferred to merchant account

Refunds

The plugin supports full refund functionality:

Webhooks

Configure webhooks in your Robokassa account to receive real-time payment status updates:

https://your-domain.com/hooks/payment/robokassa

The plugin automatically:

Test Mode

Enable test mode for development:

{
  resolve: "@gorgo/medusa-payment-robokassa",
  options: {
    test_mode: true,
    // ... other options
  },
}

In test mode, you can simulate various payment scenarios without processing real transactions.

Receipt Generation (54-ФЗ Compliance)

The plugin automatically generates online receipts compliant with Russian Federal Law No. 54. Configure receipt settings in the plugin options to match your business requirements.


Explore More Medusa Plugins

Find more powerful plugins and integrations to enhance your Medusa store. Browse our collection of community-driven solutions.

Free & Open Source
Community Driven
Easy Integration