medusa-payment-yookassa
YooKassa payment provider for Medusa
YooKassa Payments for Medusa
A Medusa plugin that provides YooKassa (aka YooMoney) payments.
Prerequisites
- Medusa server v2.7.0 or later
- Node.js v20 or later
- A YooKassa account, a shop identifier Copy to clipboard
shopId
and a secret API key Copy to clipboardsecretKey
.
Installation
123yarn add medusa-payment-yookassa# ornpm install medusa-payment-yookassa
Configuration
Add the provider configuration in your Copy to clipboardmedusa-config.js
file of the Medusa admin application:
1234567891011121314151617181920# ...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:
12YOOKASSA_SHOP_ID=1234567YOOKASSA_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:
1https://{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.
References
License
Licensed under the MIT License.