> A Next.js app opens the Plandalf checkout, then a native MailerLite step adds the paid buyer to a group. No route handler or Zapier required.

Source: https://plandalf.com/apps/nextjs/integrations/mailerlite
Last modified: 2026-10-26

Checkout embed

# Next.js + MailerLite integration

Next.js hosts the buying action, Plandalf takes the payment, and MailerLite gets the buyer in a group through native steps.

[Start your 14-day free trial](https://admin.plandalf.dev/signup)[Jump to the setup](#setup)

No credit card required. No coding required.

**Next.js**

**MailerLite**

## Does Next.js integrate with MailerLite?

The checkout and MailerLite connect through Plandalf, not through Next.js. Your app loads the SDK and opens the offer; after payment a Plandalf sequence runs native MailerLite steps to find or create the subscriber and add them to a group. Your app needs no code for the MailerLite side.

## What moves between Next.js and MailerLite

Event

From and to

Through

What happens

Checkout opened

Next.jsPlandalf

Checkout embed

A client provider loads the SDK, and a client component renders a button with `data-plandalf-present` or calls the SDK's `present()`.

Checkout completed

PlandalfMailerLite

Native step

Find or Create Subscriber and Add Subscriber to Group run on the server side of Plandalf, so no MailerLite token touches your Next.js bundle.

Invoice paid

PlandalfMailerLite

Native step

Renewals and invoices you send fire this too, which lets Update Subscriber Fields keep a `plan` field current.

Subscriber created

MailerLitePlandalf

Native step

Plandalf registers the webhook with MailerLite when you save the trigger. A group filter limits which new subscribers start the sequence.

Purchase confirmation to your app

PlandalfNext.js

Webhook

A Send Webhook step can call a route handler of yours when the app itself must grant access, since MailerLite group membership proves nothing about payment.

## Group assignment for Next.js buyers

Only the MailerLite token and the SDK URL are needed here. Neither lives in your repository.

1.  ### Set up the provider
    
    Add a client component with `'use client'` that renders `next/script` after interaction and hands the ready SDK to context. Mount it under your root layout so route changes reuse one script.
    
2.  ### Open checkout from a client component
    
    Render the button once the SDK is ready. If the offer or promo can change at runtime, key the component on those values so React builds a fresh bound element.
    
3.  ### Generate a MailerLite token
    
    In MailerLite go to Integrations, MailerLite API, Use, Generate new token. The token appears once, so copy it before closing the dialog.
    
4.  ### Connect and build the sequence
    
    In Plandalf connect MailerLite under Automation, Marketplace. Start a sequence on Checkout Completed with Find or Create Subscriber (email from `{{trigger.customer_email}}`), then Add Subscriber to Group using the returned `subscriber_id`.
    
5.  ### Rehearse in test mode
    
    Turn on Run on test purchases, buy once with a Stripe test card from your Next.js page, and confirm the group membership in MailerLite. Switch the setting off before launch.
    

## What sellers do with Next.js and MailerLite

### Indie developers selling a template or boilerplate

A buyer of a Next.js starter kit lands in a Customers group, and a MailerLite automation sends the repo invite steps and later release notes.

### Paid newsletter or community apps

A custom Next.js site sells a yearly pass. The group drives a welcome automation, while your server grants the logged-in area from a verified invoice.

## Limits and gotchas

-   Group membership in MailerLite is not an entitlement. Grant access in your own app from a server-side check of the paid purchase.
-   Only current MailerLite works. Classic accounts use a different API.
-   The Next.js guide documents the App Router. Pages Router needs separate verification, and some SDK cleanup repairs it mentions were unreleased when written.
-   Adding a buyer to a group does not record marketing consent.

## Next.js and MailerLite: common questions

Does Next.js integrate with MailerLite?

Not directly. Next.js opens the Plandalf checkout, and Plandalf's native MailerLite steps add the buyer to a group after payment. Your app does not call MailerLite.

How do I connect MailerLite to a Next.js checkout?

Load the Plandalf script in a client provider, connect MailerLite with an API token under Automation, and use Find or Create Subscriber then Add Subscriber to Group on Checkout Completed.

Do I need an API route to use MailerLite with Plandalf?

No. The MailerLite steps run inside Plandalf. You only need a route if your app must grant access or store the order itself.

## Guides for this pair

-   [Plandalf with Next.js](https://plandalf.com/platforms/nextjs)
-   [Plandalf with MailerLite](https://plandalf.com/platforms/mailerlite)
-   [Next.js setup guide](https://plandalf.com/docs/platforms/nextjs)
-   [MailerLite setup guide](https://plandalf.com/docs/integrations/mailerlite)
-   [Identify customers](https://plandalf.com/docs/sdk/identity)

[Start your 14-day free trial](https://admin.plandalf.dev/signup)

## More from Next.js and MailerLite

-   [**Next.js + Mailchimp**Next.js hosts the buying action, Plandalf takes payment, and native steps put the buyer in a Mailchimp audience with tags and an event.](https://plandalf.com/apps/nextjs/integrations/mailchimp)
-   [**PayPal + Next.js**A client component opens the Plandalf checkout, PayPal is a payment option there, and your server confirms the paid invoice.](https://plandalf.com/apps/paypal/integrations/nextjs)
-   [**Stripe + Next.js**In a Next.js app the Plandalf SDK runs in client components, and the checkout it opens charges your connected Stripe account.](https://plandalf.com/apps/stripe/integrations/nextjs)
-   [**Stripe + MailerLite**A paid Plandalf checkout puts the buyer into a MailerLite group, and a refund in Stripe takes them back out, so the group matches who actually paid.](https://plandalf.com/apps/stripe/integrations/mailerlite)
-   [**Webflow + MailerLite**Webflow hosts the buy button, Plandalf takes payment, and MailerLite gets each buyer in the group that starts your emails.](https://plandalf.com/apps/webflow/integrations/mailerlite)
-   [**WordPress + MailerLite**MailerLite's plugin collects signups on WordPress. A Plandalf button on the page puts paid buyers into a MailerLite group, which can start an automation.](https://plandalf.com/apps/wordpress/integrations/mailerlite)

Checked October 26, 2026 against Plandalf's own setup guides and the vendor documentation: [Next.js: load and optimize scripts](https://nextjs.org/docs/app/guides/scripts).
