İçeriğe atla
ÖzelliklerFiyatlandırmaİş OrtaklığıBlogYardımHakkımızdaİletişim
BaşlaGiriş Yap
Bloga Dön
industry2026-05-2312 dk okuma

Aboneligim bugun charge oldu yenilenme uyarisi gelmedi — invoice.upcoming handler eksikti (PR #651 VII F5)

Sivas Merkez Cumhuriyet Caddesi Sivas Koftecisi sahibi Erhan (39), uc ay once thMenu Diamond aboneligini denemek uzere yukseltmis (masadan-siparis + Hotel Room Service). 1 ay sonra Platinum a dusurmek istemis ama dinner rush + cocugun veli toplantisi + ertesi gun unutmus. Bugun sabah Stripe kart-charge $99 thMenu Diamond. Erhan support a yazdi: "Niye yenilenme oncesi reminder maili gondermediniz?" Support 2 wrong theory (Erhan kacirdi, spam folder) busted. 3. theory dogru: thMenu HIC 7-day reminder gondermiyordu — invoice.upcoming event handler bir switch case ti, switch case EKSIKTI. Webhook handler apps/web-admin/src/app/api/stripe/webhook/route.ts switch event.type: checkout.session.completed + customer.subscription.updated + customer.subscription.deleted + invoice.paid + charge.dispute.created VAR, ama invoice.upcoming + paused/resumed + payment_action_required + payment_failed YOK. invoice.upcoming default branch e dustu silent 200 OK return → Stripe Dashboard "delivered" gosterdi → ama hicbir downstream automation. Pattern: thMenu Stripe webhook handler 2024 te shipped, Customer Portal modern UX (pause/resume, scheduled plan changes, invoice.upcoming) sonradan eklendi → handler incremental update lar bu event leri atladi. **PR #651 batch VII F5** iki katmanli fix: (1) webhook switch case invoice.upcoming branch eklendi — InvoiceUpcomingSchema parse + Supabase user mapping + sendInvoiceUpcomingReminder. (2) Resend locale-aware template (TR + EN + DE + FR + IT + ES) — subject "Aboneliginiz 7 gun sonra yenilenecek — $99 Diamond [Manage Subscription]" + idempotency column user_profiles.invoice_upcoming_email_sent_at duplicate reminder onler. Erhan $40 credit + sonraki ay Platinum scheduled. Fix shipped sonraki invoice.upcoming Erhan email aldi, action almadi, renewal smooth gerceklesti. Pattern: Stripe webhook handler her Customer Portal lifecycle event ini parse + handle etmeli — customer.subscription.created/updated/deleted + paused/resumed + trial_will_end + pending_update_applied/expired + invoice.upcoming + invoice.payment_action_required + invoice.payment_failed + charge.dispute.created + radar.early_fraud_warning.created + payment_intent.payment_failed. Default branch silent 200 OK degil "unhandled_event" warning Sentry e cikarmali → coverage gap loud detect.

th

thMenu Ekibi

thmenu.com

Faydalı buldunuz mu? Paylaşın.