Klaviyo events, consent sync, and newsletter subscribe for Medusa v2.
Klaviyo for Medusa v2: Started Checkout / Placed Order events, consent sync, and a honeypot newsletter endpoint.
Authored by Billy Mahmood. Maintained by Hollowpoint. MIT licensed.
npm install @hollowpoint-io/medusa-plugin-klaviyo1// medusa-config.ts2module.exports = defineConfig({3 plugins: [4 {5 resolve: "@hollowpoint-io/medusa-plugin-klaviyo",6 options: {7 api_key: process.env.KLAVIYO_API_KEY,8 list_id: process.env.KLAVIYO_LIST_ID,9 storefront_url: process.env.STOREFRONT_URL,10 // revision: "2026-07-15",11 // source_name: "Medusa",12 // product_path: "/products/{handle}",13 // checkout_path: "/checkout",14 // order_path: "/account/orders/{order_id}",15 // rate_limit: { max: 5, window_ms: 60_000 },16 },17 },18 ],19})No migrations. If the plugin is installed without / / , subscribers no-op and the subscribe route returns 503.
Built and tested against Medusa .
| Option | Required | Default | Notes |
|---|---|---|---|
| yes* | Klaviyo private key | ||
| yes* | list for subscribe/unsubscribe jobs | ||
| yes* | used to build product/checkout/order URLs | ||
| no | Klaviyo API revision | ||
| no | prefix for | ||
| no | placeholder | ||
| no | |||
| no | placeholder | ||
| no | off | in-memory per-IP; single-process only — prefer an edge limiter |
*Required for the plugin to actually send. Missing options degrade silently.
1POST /store/klaviyo/subscribe2{ "email": "a@b.com", "source": "homepage", "company": "" }is or . A non-empty is treated as a bot and returns without calling Klaviyo.
This package does not ship a shared rate-limiter. Rate-limit at your edge, or set for a naive in-memory cap (not safe across multiple backend instances).
1npm install2npm test3npm run build4npm run devNeed this installed and wired on a live Medusa store? Hollowpoint does Medusa migrations and plugin work.