The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update customer-updated.ts
Kiran Kb28e839ef332
diff --git a/apps/web/app/api/stripe/integration/webhook/customer-updated.ts b/apps/web/app/api/stripe/integration/webhook/customer-updated.tsindex d8bb5742a1..d86f14480f 100644--- a/apps/web/app/api/stripe/integration/webhook/customer-updated.ts+++ b/apps/web/app/api/stripe/integration/webhook/customer-updated.ts@@ -21,14 +21,15 @@ export async function customerUpdated(event: Stripe.Event) {id: customerFound.id,},data: {- externalId,name: stripeCustomer.name,email: stripeCustomer.email,+ ...(externalId && { externalId }),},});return `Dub customer with ID ${customerFound.id} updated.`;}+ // otherwise create a new customerreturn await createNewCustomer(event);}