Set Up Waffo Payments in a Next.js SaaS (Step by Step)
By make1day
Waffo has two flavours and the setup differs between them. This tutorial covers both, because the make1day integration supports each through the same checkout and webhook contract.
1. Decide the flavour
Set WAFFO_FLAVOR to pancake (global MoR checkout) or acquiring (SE-Asia acquiring). The default is pancake; the adapter switches endpoints and signing accordingly.
2. Gather credentials
For Pancake you need a WAFFO_STORE_SLUG (or WAFFO_STORE_ID / WAFFO_MERCHANT_ID) and a WAFFO_PRIVATE_KEY. For Acquiring you need the merchant contract fields: WAFFO_ACQUIRING_MERCHANT_INFO, WAFFO_ACQUIRING_USER_INFO, WAFFO_ACQUIRING_PAYMENT_INFO, WAFFO_ACQUIRING_ORDER_CURRENCY and WAFFO_ACQUIRING_ORDER_DESCRIPTION, plus WAFFO_PRIVATE_KEY and the per-environment webhook public key.
3. Create products and prices
In the Waffo dashboard create a one-time product for Buyout and a recurring product for Care, then copy their price ids into WAFFO_PRICE_ID_BUYOUT and WAFFO_PRICE_ID_CARE. For a Black Friday or MGM promo, create separate price ids and set WAFFO_PRICE_ID_BUYOUT_BF / _MGM (the webhook plan inference recognises them automatically).
4. Configure the webhook
Point Waffo at your /api/payments/webhook/waffo endpoint. Pancake verifies with the platform RSA public key (WAFFO_WEBHOOK_PUBLIC_KEY, test / prod variants). Acquiring signs the request with RSA and needs the same public key. Always verify the signature server-side before trusting the payload — never skip it.
5. Set the provider
Set PAYMENT_PROVIDER=waffo and the Waffo env vars above. A checkout call resolves the right price id for the active plan, and the webhook grants the licence by inferring the plan from the price id.
6. Run a sandbox test
Use the Waffo test environment (WAFFO_ENVIRONMENT=test) and a test purchase. Confirm the webhook fires, the plan is inferred correctly, and the licence key is issued. Do not go live until a real sandbox round-trip is green.
If you are on make1day, the six adapters already share this contract, so the same code path works for Creem, Stripe, PayPal and Lemon Squeezy — only the env vars change.
FAQ
Which Waffo flavour should I use?+
Use pancake for a global Merchant-of-Record checkout. Use acquiring only if you already have a regional acquiring contract that requires its specific fields and RSA signing.
Do I need to verify the Waffo webhook signature?+
Yes. The integration verifies it server-side with the platform public key for both flavours. Skipping verification would let anyone forge a paid event.
How does the licence get issued?+
The webhook infers the plan from the price id (including BF and MGM ids) and calls the licence grant. Without a configured price id the checkout falls back to display mode.
All frequently asked questions · Markdown version (for AI agents)