Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

create customerId

Kiran K7f5d62f47318
diff --git a/apps/web/app/api/campaigns/webhooks/stripe/route.ts b/apps/web/app/api/campaigns/webhooks/stripe/route.ts
index 7c6da3057e..1194091501 100644
--- a/apps/web/app/api/campaigns/webhooks/stripe/route.ts
+++ b/apps/web/app/api/campaigns/webhooks/stripe/route.ts
@@ -170,8 +170,10 @@ async function customerCreated(event: Stripe.Event) {
.parse(clickEvent.data[0]);
// Create customer
+ const customerId = nanoid(16);
const customer = await prismaEdge.customer.create({
data: {
+ id: customerId,
name: stripeCustomer.name,
email: stripeCustomer.email,
stripeCustomerId: stripeCustomer.id,