# Set Up Creem Payments in a Next.js SaaS (Step by Step)

> Connect Creem's hosted checkout to a Next.js app: API key, products and prices, webhook signatures and a sandbox test.

- Author / publisher: make1day (company)
- Published: 2026-11-08
- Canonical: /blog/creem-payment-setup-tutorial
- Category: Tutorial
- Tags: Creem payment setup, Creem tutorial, Creem webhook, Next.js SaaS checkout
- Language: en

Creem is the closest thing to a Stripe-like hosted checkout with a Merchant of Record. This tutorial gets a Next.js SaaS taking real payments through it.

## 1. Create the account and API key

Sign up at Creem, switch to test mode, and create an API key. Store it as **CREEM_API_KEY**. Set **CREEM_ENV=test** for development and **live** only after your sandbox round-trip is green.

## 2. Create products and prices

In the Creem dashboard create a one-time product for Buyout and a recurring product for Care. Copy their price ids into **CREEM_PRICE_ID_PRO** (one-time Buyout maps to the PRO slot, recurring Care maps to SCALE) — or, if your integration separates them, **CREEM_PRICE_ID_BUYOUT** / **CREEM_PRICE_ID_CARE**. For a Black Friday or MGM promo, create separate price ids and set **CREEM_PRICE_ID_BUYOUT_BF** / **_MGM**; the webhook plan inference already recognises them.

## 3. Set the webhook

Point Creem at your **/api/payments/webhook/creem** endpoint and copy the webhook secret into **CREEM_WEBHOOK_SECRET**. The integration verifies the signature on every event before trusting it. A checkout event resolves the plan from the product / price id and grants the licence; a refund or cancellation event revokes it.

## 4. Set the provider

Set **PAYMENT_PROVIDER=creem** plus **CREEM_API_KEY** and **CREEM_WEBHOOK_SECRET**. A checkout call picks the right price id for the active plan (or the BF / MGM price id when the promo is on), and redirects to Creem's hosted checkout.

## 5. Run a sandbox test

Use test mode and a test purchase. Confirm the webhook fires, the plan is inferred correctly, the licence key is issued, and a test refund revokes it. Go live (CREEM_ENV=live with live keys) only after that round-trip is green.

Because Creem, Waffo, Stripe, PayPal and Lemon Squeezy all sit behind the same checkout and webhook contract in make1day, switching providers is a config change — not a rewrite.

## FAQ

### Is Creem a Merchant of Record?

Yes — Creem handles sales tax / VAT and compliance for you, which is why its fee is higher than a raw processor. Verify the current rate on Creem's pricing page.

### Do I need to verify the Creem webhook signature?

Yes. The integration verifies it with CREEM_WEBHOOK_SECRET on every event. Skipping it would let anyone forge a paid event.

### What happens on a refund?

The webhook sees the cancellation / refund event and revokes the licence so a refunded customer cannot keep access.

---

Source: make1day. See /llms.txt and /llms-full.txt for the full machine-readable product description.
