Search for a command to run...
In this document, you'll learn how to install and configure the Robokassa payment provider for Medusa.
yarn add @gorgo/medusa-payment-robokassa# ornpm install @gorgo/medusa-payment-robokassa
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 trueisTest: 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-shopROBOKASSA_HASH_ALGORITHM=md5ROBOKASSA_PASSWORD_1=supersecretROBOKASSA_PASSWORD_2=supersecretROBOKASSA_TEST_PASSWORD_1=supersecretROBOKASSA_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)
| Option | Description | Required | Default |
|---|---|---|---|
| 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 payment | Yes | - | |
| Technical password #2 used to verify the signature in the payment notification | Yes | - | |
| 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 mode | No | ||
| 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 | - |
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.