Plans
STARTER subscription plans and per-provider lookup keys.
SaaS membership plans live in packages/payments/src/subscription-plans.ts (exported as @repo/payments/plans). There is no packages/payments/config.ts.
Marketing Solo/Pro one-time products are not defined here — see Storefront checkout.
STARTER plan
The kit ships one subscription plan: SubscriptionPlanName.STARTER.
| Field | Value |
|---|---|
| Name | STARTER |
| Slug | starter |
| Display price (monthly) | 200000 (IDR units in config) |
| Display price (yearly) | 150000 (IDR units in config) |
Display amounts are for UI; the provider dashboard owns the real charge amount.
Lookup keys
Each plan carries provider-specific IDs under lookupKeys. NODE_ENV === "development" selects sandbox placeholders; production builds use production placeholders — replace them with real IDs from your dashboards.
lookupKeys: {
mayar: {
productId: /* … */,
tierIds: { monthly: /* … */, yearly: /* … */ },
},
polar: {
productIds: { monthly: /* … */, yearly: /* … */ },
},
midtrans: {
planIds: { monthly: /* … */, yearly: /* … */ },
},
doku: {
flexibillPlanIds: { monthly: /* … */, yearly: /* … */ },
},
}Helpers such as getLookupKey, getMayarProductId, and getSubscriptionPlanFromLookupKey resolve these keys in billing adapters and admin stats.
After creating products
- Create the product/plan in the active provider’s dashboard (Mayar, Polar, Midtrans, or DOKU).
- Paste IDs into the matching
lookupKeysbranch for sandbox and production. - Set
features.paymentsProviderand that provider’s env vars. - Exercise checkout from the SaaS host (full TurboJet monorepo) — this marketing host does not ship the membership billing UI.