Paket
Paket langganan STARTER dan lookup key per provider.
Paket membership SaaS ada di packages/payments/src/subscription-plans.ts (diekspor sebagai @repo/payments/plans). Tidak ada packages/payments/config.ts.
Produk one-time Solo/Pro marketing tidak didefinisikan di sini — lihat Checkout storefront.
Paket STARTER
Kit menyertakan satu paket langganan: SubscriptionPlanName.STARTER.
| Field | Nilai |
|---|---|
| Name | STARTER |
| Slug | starter |
| Harga tampilan (bulanan) | 200000 (unit IDR di config) |
| Harga tampilan (tahunan) | 150000 (unit IDR di config) |
Jumlah tampilan untuk UI; dashboard provider menentukan tagihan nyata.
Lookup key
Setiap paket membawa ID khusus provider di lookupKeys. NODE_ENV === "development" memilih placeholder sandbox; build production memakai placeholder production — ganti dengan ID nyata dari dashboard Anda.
lookupKeys: {
mayar: {
productId: /* … */,
tierIds: { monthly: /* … */, yearly: /* … */ },
},
polar: {
productIds: { monthly: /* … */, yearly: /* … */ },
},
midtrans: {
planIds: { monthly: /* … */, yearly: /* … */ },
},
doku: {
flexibillPlanIds: { monthly: /* … */, yearly: /* … */ },
},
}Helper seperti getLookupKey, getMayarProductId, dan getSubscriptionPlanFromLookupKey menyelesaikan key ini di adapter billing dan statistik admin.
Setelah membuat produk
- Buat produk/plan di dashboard provider aktif (Mayar, Polar, Midtrans, atau DOKU).
- Tempel ID ke cabang
lookupKeysyang cocok untuk sandbox dan production. - Setel
features.paymentsProviderdan env vars provider itu. - Uji checkout dari host SaaS (monorepo TurboJet penuh) — host marketing ini tidak menyertakan UI billing membership.