Built by

Medusa

Category

Payment

Version

1.1.47

Last updated

Jul 18, 2024, 08:57:32 AM4 days ago

Adyen

Receive payments on your Medusa commerce application using Adyen.
This plugin is not ready for production use. Community contributions are highly appreciated. You can learn more about contributing in our repository.

Features

  • Authorize payments on orders from any sales channel.
  • Support for MobilePay.
  • Capture payments from the admin dashboard.
  • Support for Webhooks.

Prerequisites


How to Install

1. Run the following command in the directory of the Medusa backend:
npm install medusa-payment-adyen
2. Set the following environment variables in Copy to clipboard.env:
ADYEN_API_KEY=<YOUR_API_KEY>
ADYEN_NOTIFICATION_HMAC=<YOUR_NOTIFICATION_HMAC>
ADYEN_RETURN_URL=<YOUR_RETURN_URL>
ADYEN_MERCHANT_ACCOUNT=<YOUR_MERCHANT_ACCOUNT>
ADYEN_ORIGIN=<YOUR_ORIGIN>
ADYEN_ENVIRONMENT=<YOUR_ENVIRONMENT>
ADYEN_LIVE_ENDPOINT_PREFIX=<YOUR_LIVE_ENDPOINT_PREFIX>
ADYEN_PAYMENT_ENDPOINT=<YOUR_PAYMENT_ENDPOINT>
3. In Copy to clipboardmedusa-config.js add the following at the end of the Copy to clipboardplugins array:
const plugins = [
// ...
{
resolve: `medusa-payment-adyen`,
options: {
api_key: process.env.STRIPE_API_KEY,
notification_hmac: process.env.ADYEN_NOTIFICATION_HMAC,
return_url: process.env.ADYEN_RETURN_URL,
merchant_account: process.env.ADYEN_MERCHANT_ACCOUNT,
origin: process.env.ADYEN_ORIGIN,
environment: process.env.ADYEN_ENVIRONMENT,
live_endpoint_prefix: process.env.ADYEN_LIVE_ENDPOINT_PREFIX,
payment_endpoint: process.env.ADYEN_PAYMENT_ENDPOINT,
},
},
]

Test the Plugin

1. Run the following command in the directory of the Medusa backend to run the backend:
npm run start
2. Enable Adyen in a region in the admin. You can refer to this User Guide to learn how to do that. Alternatively, you can use the Admin APIs.
3. Place an order using a storefront or the Store APIs. You should be able to use Stripe as a payment method.

Build your own plugins

Develop your own plugins with our API to speed up your processes.

Make your plugin available via npm for it to be shared in our Plugin Library with the broader Medusa community.