Search for a command to run...
In this document, you'll learn how to install and configure the YooKassa payment provider for Medusa.
This guide covers configuring the legacy 1.x version, where you set the plugin options in . The current version 2 keeps these settings in the Integration Module, so a store admin edits them in Admin without changing configuration files or redeploying. For a new installation, follow Getting Started with YooKassa Payment for Medusa.
yarn add @gorgo/medusa-payment-yookassaAdd the provider configuration in your file of the Medusa Admin application:
medusa-config.js1// ...2module.exports = defineConfig({3 // ...4 modules: [5 {6 resolve: "@medusajs/medusa/payment",7 options: {8 providers: [9 {10 resolve: "@gorgo/medusa-payment-yookassa/providers/payment-yookassa",11 id: "yookassa",12 options: {13 shopId: process.env.YOOKASSA_SHOP_ID,14 secretKey: process.env.YOOKASSA_SECRET_KEY,15 capture: true,16 paymentDescription: "Test payment",17 useReceipt: true,18 useAtolOnlineFFD120: true,19 taxSystemCode: 1,20 taxItemDefault: 1,21 taxShippingDefault: 122 },23 }24 ]25 }26 }27 ]28})
Add environment variables with your shop identifier and a secret API key :
.env1YOOKASSA_SHOP_ID=12345672YOOKASSA_SECRET_KEY=live_secret_api_key
To properly handle payment notifications from YooKassa, configure the webhook URL in your YooKassa account as following:
Change with your medusa store domain.Webhook URLhttps://{YOUR_MEDUSA_DOMAIN}/hooks/payment/yookassa_yookassa
YooKassa will send payment status updates to this URL, allowing Medusa to update the payment status accordingly.
Default:
Default:
Default: