Memberships & Stripe
Zine uses Stripe Connect Express so you receive payments directly under your own Stripe account. Zine takes a 5% application fee on each transaction; payouts, refunds, taxes, and disputes all go through your account, not ours.
Connect your Stripe account
- In Settings → Membership, click Connect Stripe.
- Stripe walks you through onboarding: basic business info, bank account, identity verification.
- Once Stripe flips
chargesEnabledandpayoutsEnabledto true, the membership UI unlocks.
You can disconnect at any time. Active subscriptions keep billing through Stripe regardless; readers continue to manage them via their customer portal.
Define your tiers
Free tier is auto-created when you first visit Settings → Membership. You can’t delete it. Add paid tiers and set prices.
Behind the scenes: when you save a tier with monthly or yearly pricing, Zine creates a matching Stripe Product + Prices on your connected account. Editing price requires Stripe to archive the old Price and create a new one (Stripe doesn’t allow editing active prices in place); existing subscribers stay on the price they signed up with.
Embed the checkout button
Use the public REST API. Wire a button on your site that POSTs:
// app/components/subscribe-button.tsx
'use client';
export function SubscribeButton({ tierId }: { tierId: string }) {
return (
<button
onClick={async () => {
const res = await fetch('/api/zine/checkout', {
method: 'POST',
body: JSON.stringify({ tierId, interval: 'month' }),
});
const { url } = await res.json();
window.location.href = url;
}}
>
Subscribe
</button>
);
}
…and a thin server route that proxies to Zine with your secret key:
// app/api/zine/checkout/route.ts
export async function POST(request: Request) {
const body = await request.json();
const res = await fetch(`${process.env.ZINE_API_URL}/api/v1/checkout`, {
method: 'POST',
headers: {
authorization: `Bearer ${process.env.ZINE_PUBLIC_KEY}`,
'content-type': 'application/json',
},
body: JSON.stringify({
...body,
email: request.headers.get('x-user-email')!,
successUrl: `${process.env.NEXT_PUBLIC_SITE_URL}/welcome`,
cancelUrl: `${process.env.NEXT_PUBLIC_SITE_URL}/pricing`,
}),
});
return Response.json(await res.json());
}
Reader hits the route, gets redirected to Stripe Checkout, completes payment, lands on /welcome. Stripe webhooks fire to Zine, which mirrors the subscription to the member’s row. Their access flips to paid automatically.
Customer portal
Readers manage their subscription (update card, change plan, cancel) via the Stripe Customer Portal. They request a magic link from your site:
await fetch('/api/zine/portal', {
method: 'POST',
body: JSON.stringify({ email: 'reader@example.com' }),
});
…which proxies to POST /api/v1/portal. Zine emails the reader a one-time link that opens their portal session.
Content gating
Set a post’s Access to Members or Paid (or a specific tier) in the post editor. The public API automatically:
- returns a teaser body for non-entitled readers,
- surfaces
access: { granted: false, required: 'paid' }so your page renders<PaywallNotice />, - caches gated responses as
private, no-store(no shared edge cache for paywall state).
Webhook setup
In your Stripe dashboard, create a Connect application webhook pointing at:
{your-zine-admin}/api/stripe/webhook
Subscribe to:
customer.subscription.createdcustomer.subscription.updatedcustomer.subscription.deletedcustomer.subscription.pausedcustomer.subscription.resumed
Copy the signing secret into your admin’s env as STRIPE_WEBHOOK_SECRET_CONNECT.
Fees
Zine takes 5% as a Stripe application_fee_percent on each subscription. Stripe also takes their standard 2.9% + 30¢ per transaction. The remaining ~92% lands in your bank account on Stripe’s normal payout schedule.