Overview
Icon for YooKassa

YooKassa

Handle payments through YooKassa

YooKassa Payments for Medusa

A Medusa plugin that provides YooKassa payments.

Prerequisites

  • Medusa server v2.7.0 or later
  • Node.js v20 or later
  • A YooKassa account, a shop identifier Copy to clipboardshopId and a secret API key Copy to clipboardsecretKey.

Installation

yarn add medusa-payment-yookassa
# or
npm install medusa-payment-yookassa

Configuration

Add the provider configuration in your Copy to clipboardmedusa-config.js file of the Medusa admin application:

# ...
module.exports = defineConfig({
# ...
modules: [
{
resolve: "@medusajs/medusa/payment",
options: {
providers: [
{
resolve: "medusa-payment-yookassa/providers/payment-yookassa",
id: "yookassa",
options: {
shopId: process.env.YOOKASSA_SHOP_ID,
secretKey: process.env.YOOKASSA_SECRET_KEY,
capture: true,
paymentDescription: "Test payment"
},
}
]
}

Add environment variables:

YOOKASSA_SHOP_ID=1234567
YOOKASSA_SECRET_KEY=live_secret_api_key

Then, set up a webhook URL for notifications from YooKassa here. The URL should be in the following format:

https://{YOUR_MEDUSA_DOMAIN}/hooks/payment/yookassa_yookassa

Storefront Integration

Make the necessary changes to your Medusa storefront. You can refer to the modifications made in the Medusa Next.js Starter Template, which are located in the Copy to clipboardexamples/medusa-storefront directory. To see the exact differences, check the comparison page.

Development

Find documentation on bootstrapping a development environment here.

💬 Support & Community on Telegram

Join the Medusa Telegram community chat to discuss features, get support, and connect with developers building on Medusa.

License

Licensed under the MIT License.

You may also like

Browse all integrations

Build your own

Develop your own custom integraiton

Build your own integration with our API to speed up your processes. Make your integration available via npm for it to be shared in our Library with the broader Medusa community.

gift card interface

Ready to build your custom commerce setup?