Waffo Pancake Configuration
Configure Waffo Pancake payments (Merchant of Record model)
Waffo Pancake is a global payment platform that operates as a Merchant of Record. It handles tax, compliance, refunds, and related merchant obligations for developers, with a hosted checkout page — a good fit for SaaS and digital products sold globally.
Application Flow
-
Register a Waffo account
- Visit the Merchant Dashboard
- Sign up with Google, GitHub, or Magic Link
-
Get API credentials
- Go to Dashboard → "API & Development" → copy the Merchant ID, which starts with
MER_ - API Keys → Create API Key, and choose the Test (local development) or Production environment
- Download the private key immediately — it is shown only once
- Go to Dashboard → "API & Development" → copy the Merchant ID, which starts with
-
Create products
- Create products from the Dashboard "Products" page
- Choose Subscription for recurring billing or One-Time for one-time payments / credit packs
- Configure price and currency
- Copy the product ID, which starts with
PROD_, and use it aswaffoProductId
-
Configure Webhooks
- Go to "Store Settings" → "Webhooks"
- Add the Webhook URL:
https://yourdomain.com/api/payment/webhook/waffo - Subscribe to the order and subscription events (see the list below)
- Verification uses an RSA public key: the SDK has the Test / Prod public keys built in, so usually no configuration is needed. Only copy the Dashboard public key into
WAFFO_WEBHOOK_PUBLIC_KEYwhen rotating keys
Environment Variables
Add to your .env file:
# Waffo Pancake configuration
WAFFO_MERCHANT_ID=MER_xxxxxxxxxx
WAFFO_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----"API keys are bound to the Test or Production environment at creation time — no extra TEST_MODE switch is needed.
Webhook Configuration
Events to Subscribe
When configuring the webhook in the Waffo Dashboard, subscribe to the following events:
- order: order events
order.completed: payment succeeded (one-time payments and credit top-ups)
- subscription: subscription events
subscription.activated: subscription activatedsubscription.payment_succeeded: subscription renewal succeededsubscription.canceling/subscription.uncanceled: subscription canceling / resumedsubscription.canceled: subscription canceledsubscription.past_due: subscription past due
- refund: refund events
refund.succeeded: refund succeeded
Plan Configuration Examples
The config/payment.ts configuration below only applies to static pricing mode (the default). With dynamic pricing, you don't edit this file — create plans in the admin panel at /admin/pricing and fill in the corresponding IDs there.
Subscription Plan
monthlyWaffo: {
provider: 'waffo',
id: 'monthlyWaffo',
amount: 10,
currency: 'USD',
duration: {
months: 1,
type: 'recurring'
},
waffoProductId: 'PROD_xxxxxxxxxxxxxxxxxxxxx',
i18n: {
'en': {
name: 'Waffo Monthly Plan',
description: 'Monthly recurring subscription via Waffo Pancake',
duration: 'month',
features: ['All premium features', 'Priority support']
},
'zh-CN': {
name: 'Waffo 月度订阅',
description: '通过 Waffo Pancake 的月度循环订阅',
duration: '月',
features: ['所有高级功能', '优先支持']
}
}
}One-Time Plan
monthlyWaffoOneTime: {
provider: 'waffo',
id: 'monthlyWaffoOneTime',
amount: 10,
currency: 'USD',
duration: {
months: 1,
type: 'one_time'
},
waffoProductId: 'PROD_xxxxxxxxxxxxxxxxxxxxx',
i18n: {
'en': {
name: 'Waffo Monthly Plan (One Time)',
description: 'One-time payment for monthly access via Waffo Pancake',
duration: 'month',
features: ['All premium features', 'Priority support']
},
'zh-CN': {
name: 'Waffo 月度 (一次性)',
description: '通过 Waffo Pancake 的一次性月度付费',
duration: '月',
features: ['所有高级功能', '优先支持']
}
}
}Credits Plan
creditsWaffo: {
provider: 'waffo',
id: 'creditsWaffo',
amount: 5,
currency: 'USD',
duration: { type: 'credits' },
credits: 100,
waffoProductId: 'PROD_xxxxxxxxxxxxxxxxxxxxx',
i18n: {
'en': {
name: '100 Credits Waffo',
description: 'Purchase 100 AI credits via Waffo Pancake',
duration: 'one-time',
features: ['100 AI conversations', '100 image generations']
},
'zh-CN': {
name: '100 积分包 Waffo',
description: '通过 Waffo Pancake 购买的 100 个 AI 积分',
duration: '一次性',
features: ['100 次 AI 对话', '100 次图片生成']
}
}
}Back to Payment Configuration Overview