Checkout embed

Next.js + Mailchimp integration

Next.js hosts the buying action, Plandalf takes payment, and native steps put the buyer in a Mailchimp audience with tags and an event.

No credit card required. No coding required.

Does Next.js integrate with Mailchimp?

Mailchimp connects to the checkout, not to Next.js. Your app loads the Plandalf SDK and opens the offer; a Plandalf sequence then runs native Mailchimp steps: add or update the contact, add tags, record an event. Mailchimp subscribe events can start a Plandalf sequence.

What moves between Next.js and Mailchimp

EventFrom and toThroughWhat happens
Checkout openedNext.jsPlandalfCheckout embedClient components render the buying action once the provider reports the SDK ready.
Checkout completedPlandalfMailchimpNative stepAdd or Update Contact fills first name, last name and merge fields. New contacts get the status you choose: Subscribed, Pending for double opt-in, or Transactional.
Record eventPlandalfMailchimpNative stepThe event name must match the Customer Journey starting point exactly. Spaces turn into underscores.
Contact subscribedMailchimpPlandalfNative stepSaving the trigger adds a webhook to the audience, visible in Mailchimp under Audience, Settings, Webhooks.
Invoice refundedPlandalfMailchimpNative stepRemove Tags from Contact takes the purchase tags back after a full refund in Stripe.

Mailchimp tags and a journey from a Next.js sale

The Mailchimp key is the only secret. It goes into Plandalf, not into your Next.js environment.

  1. Load the SDK in a client provider

    Use next/script inside a 'use client' component and wait for plandalf('ready', ...). Never read window during server rendering.

  2. Render a button or inline checkout

    Use data-plandalf-present for a modal or sdk.mount() in an effect for an inline form, and return the handle's close() from the effect cleanup.

  3. Create the Mailchimp key

    Mailchimp's Extras menu has API keys. Create one and copy it whole, including the -us21 style suffix.

  4. Connect and add the contact

    Connect Mailchimp under Automation, Marketplace. On a Checkout Completed sequence add Mailchimp, Add or Update Contact with your Audience and {{trigger.customer_email}}. Create any merge field in Mailchimp first.

  5. Record the event and build the journey

    Add Record Event named plan_purchased with a plan property from {{trigger.line_items_summary}}. In Mailchimp start a Customer Journey on that event name.

  6. Test, then switch off test runs

    Enable Run on test purchases, buy with a Stripe test card, check the contact in the audience, then turn the option off.

What sellers do with Next.js and Mailchimp

Product-led apps with plan upgrades

An app sells upgrade plans through its pricing route. The plan name rides along as an event property, so a journey can send the right onboarding for each plan.

Agencies selling retainers from a custom site

A Next.js site sells monthly retainers. The audience tag keeps clients out of prospecting campaigns, and renewals refresh the PLAN merge field.

Limits and gotchas

  • Mailchimp events carry no revenue and are not Mailchimp orders. Put the amount into a property if reports need it.
  • Existing contacts keep their status, so a step never resubscribes someone who unsubscribed.
  • Signed customer identity in Next.js prefills the checkout. It does not by itself guarantee which email the sequence sees, so test with a logged-in user.
  • Mailchimp permits 10 simultaneous connections per key, and Plandalf retries twice before a step fails.
  • Your server, not a Mailchimp tag, should decide who gets paid access.

Next.js and Mailchimp: common questions

Does Next.js integrate with Mailchimp?
Through Plandalf rather than directly. The Next.js app opens the checkout, and Plandalf's native Mailchimp steps handle the audience, tags and events.
How do I add Next.js customers to a Mailchimp audience?
Connect Mailchimp with an API key under Automation, then add Add or Update Contact to a sequence that starts on Checkout Completed for your offer.
Why is the Mailchimp Record Event not starting my journey?
The event name must match the journey's starting point exactly, including the underscores Plandalf adds in place of spaces. Check the run's Events view for the name that was sent.

Feature detail