Command Palette

Search for a command to run...

Getting Started with Robokassa Payment

In this document, you'll learn how to install and configure the Robokassa payment provider for Medusa.

Requirements

Installation

yarn add @gorgo/medusa-payment-robokassa
# or
npm install @gorgo/medusa-payment-robokassa

Configuration

Add the provider configuration in your file of the Medusa admin application:

// ...
module.exports = defineConfig({
// ...
modules: [
{
resolve: "@medusajs/medusa/payment",
options: {
providers: [
{
resolve: "@gorgo/medusa-payment-robokassa/providers/payment-robokassa",
id: "robokassa",
options: {
merchantLogin: process.env.ROBOKASSA_MERCHANT_LOGIN,
hashAlgorithm: process.env.ROBOKASSA_HASH_ALGORITHM,
password1: process.env.ROBOKASSA_PASSWORD_1,
password2: process.env.ROBOKASSA_PASSWORD_2,
testPassword1: process.env.ROBOKASSA_TEST_PASSWORD_1,
testPassword2: process.env.ROBOKASSA_TEST_PASSWORD_2,
capture: false, // default is true
isTest: true, // default is false
},
}
]
}
}
]
})

Add environment variables with your shop identifier , hash calculation algorithm , secret passwords , , and secret passwords for testing , :

ROBOKASSA_MERCHANT_LOGIN=test-shop
ROBOKASSA_HASH_ALGORITHM=md5
ROBOKASSA_PASSWORD_1=supersecret
ROBOKASSA_PASSWORD_2=supersecret
ROBOKASSA_TEST_PASSWORD_1=supersecret
ROBOKASSA_TEST_PASSWORD_2=supersecret

Attention! must be one of the following values corresponding to the value in the Robokassa account: , , , , or (note, an error occurs for on the provider's side)

Provider Options

OptionDescriptionRequiredDefault
The Robokassa store ID that you created when creating the store.Yes-
Signature algorithm:
-
-
-
-
-
Yes-
Technical password #1 used to compute the signature when initiating a paymentYes-
Technical password #2 used to verify the signature in the payment notificationYes-
Test password #1 (from store settings) used to compute signatures in test mode.

Applicable only if =
No-
Test password #2 used to verify notifications in test mode.

Applicable only if =
No-
Automatic payment capture ( for one-step payment, for two-step payment)No
Enables test modeNo
Enable receipt generation according to Russian fiscal data format (FFD)No
Tax system type:
- — General
- — Simplified (income)
- — Simplified (income-expenses)
- — Agricultural
- — Patent

Applicable only if =
No-
Default VAT rate for products:
- — No VAT
- — 0%
- — 5%
- — 7%
- — 10%
- — 20%
- — 5/105
- — 7/107
- — 10/110
- — 20/120

Applicable only if =
No-
Default VAT rate for shipping, same options as

Applicable only if =
No-

Webhook Setup

To properly handle payment notifications from Robokassa, configure the webhook URL in your Robokassa account as following:

Under shop settings in your Robokassa account, set the Method of sending data to Result Url to or and supply a Result Url in the following format:

Robokassa will send payment status updates to this URL, allowing Medusa to update the payment status accordingly.

Getting Started with Robokassa Payment