パッケージの詳細

medusa-payment-yookassa

sergkudinov263MIT0.1.7

YooKassa payment provider for Medusa

medusa, medusa-v2, medusa-plugin, medusa-plugin-integration

readme

<picture> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/9a99f9e8-f80e-4411-9bed-6e2032b1ab1c"> <source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/9a99f9e8-f80e-4411-9bed-6e2032b1ab1c"> Medusa logo </picture>

YooKassa Payments for Medusa

A Medusa plugin that provides YooKassa payments.

Join on Telegram

Medusa Medusa

Prerequisites

  • Medusa server v2.7.0 or later
  • Node.js v20 or later
  • A YooKassa account, a shop identifier shopId and a secret API key secretKey.

Installation

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

Configuration

Add the provider configuration in your medusa-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 examples/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.