The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update charge-failed.ts
Kiran K09c3122b3279
diff --git a/apps/web/app/(ee)/api/stripe/webhook/charge-failed.ts b/apps/web/app/(ee)/api/stripe/webhook/charge-failed.tsindex 26765fa526..462c3e323b 100644--- a/apps/web/app/(ee)/api/stripe/webhook/charge-failed.ts+++ b/apps/web/app/(ee)/api/stripe/webhook/charge-failed.ts@@ -218,6 +218,8 @@ async function processRenewalInvoice({ invoice }: { invoice: Invoice }) {},});+ // if invoice failed attempts is less than 3, retry in 3 days+ // otherwise, turn off auto-renew for the domainsif (invoice.failedAttempts < 3) {await qstash.publishJSON({url: `${APP_DOMAIN_WITH_NGROK}/api/cron/invoices/retry-failed`,