The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update checkout-session-completed.ts
Steven Tey22cd4f6d182e
diff --git a/apps/web/app/api/stripe/connect/webhook/checkout-session-completed.ts b/apps/web/app/api/stripe/connect/webhook/checkout-session-completed.tsindex 1831386de7..048a0cc9de 100644--- a/apps/web/app/api/stripe/connect/webhook/checkout-session-completed.ts+++ b/apps/web/app/api/stripe/connect/webhook/checkout-session-completed.ts@@ -7,12 +7,12 @@ import type Stripe from "stripe";// Handle event "checkout.session.completed"export async function checkoutSessionCompleted(event: Stripe.Event) {const charge = event.data.object as Stripe.Checkout.Session;- const externalId = charge.metadata?.dubCustomerId;+ const dubCustomerId = charge.metadata?.dubCustomerId;const stripeAccountId = event.account as string;const stripeCustomerId = charge.customer as string;const invoiceId = charge.invoice as string;- if (!externalId) {+ if (!dubCustomerId) {return;}@@ -21,7 +21,7 @@ export async function checkoutSessionCompleted(event: Stripe.Event) {where: {projectConnectId_externalId: {projectConnectId: stripeAccountId,- externalId,+ externalId: dubCustomerId,},},data: {