Overview
Icon for Mailchimp

Mailchimp

Grow store engagement through Mailchimp campaigns

Mailchimp

Manage newsletter subscriptions in your commerce application with Mailchimp.

Mailchimp Plugin Documentation | Medusa Website | Medusa Repository

Features

  • Allow customers to subscribe to your newsletter.
  • Provides custom services and endpoints to give developers flexibility in how to implement newsletter subscription.

Prerequisites

How to Install

1. Run the following command in the directory of the Medusa backend:

npm install medusa-plugin-mailchimp

2. Set the following environment variables in Copy to clipboard.env:

MAILCHIMP_API_KEY=<YOUR_API_KEY>
MAILCHIMP_NEWSLETTER_LIST_ID=<YOUR_NEWSLETTER_LIST_ID>

3. In Copy to clipboardmedusa-config.js add the following at the end of the Copy to clipboardplugins array:

const plugins = [
// ...,
{
resolve: `medusa-plugin-mailchimp`,
options: {
api_key: process.env.MAILCHIMP_API_KEY,
newsletter_list_id: process.env.MAILCHIMP_NEWSLETTER_LIST_ID,
},
},
]

Test the Plugin

1. Run the following command in the directory of the Medusa backend to run the backend:

npm run start

2. Use the POST or PUT Copy to clipboard/mailchimp/subscribe endpoint or the Copy to clipboardMailchimpService to subscribe to the newsletter.

Additional Resources

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?