The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update charge-succeeded.ts
Kiran K55bcbb8aac61
diff --git a/apps/web/app/api/stripe/webhook/charge-succeeded.ts b/apps/web/app/api/stripe/webhook/charge-succeeded.tsindex 48060975f1..7677596029 100644--- a/apps/web/app/api/stripe/webhook/charge-succeeded.ts+++ b/apps/web/app/api/stripe/webhook/charge-succeeded.ts@@ -45,6 +45,11 @@ export async function chargeSucceeded(event: Stripe.Event) {return;}+ if (invoice.payouts.length === 0) {+ console.log("No payouts found with status not completed, skipping...");+ return;+ }+for (const payout of invoice.payouts) {const transfer = await stripe.transfers.create({amount: payout.amount,