feat: yıllık abonelik (varsayılan) — Stripe yıllık fiyatlar + periyot checkout'a geçiyor

This commit is contained in:
2026-08-29 11:58:46 +03:00
parent f04401031c
commit 8bb3d6ee48
3 changed files with 36 additions and 14 deletions
+1 -1
View File
@@ -757,7 +757,7 @@ const server = http.createServer(async (req, res) => {
if (!user) return json(res, 401, { success: false, error: 'oturum yok' });
try {
const body = await readBody(req);
const out = await createCheckoutSession({ planId: body.planId, email: user.email });
const out = await createCheckoutSession({ planId: body.planId, email: user.email, periyot: body.periyot === 'aylik' ? 'aylik' : 'yillik' });
return json(res, 200, { success: true, ...out });
} catch (e) {
return json(res, billingConfigured() ? 400 : 503, { success: false, error: e.message });