The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Merge branch 'main' into lemonsqueezy-importer
Pedro Ladeira8617af2a81d5
diff --cc apps/web/app/(ee)/api/stripe/integration/webhook/checkout-session-completed.tsindex 5930f69871,7ba2693410..8303548317--- a/apps/web/app/(ee)/api/stripe/integration/webhook/checkout-session-completed.ts+++ b/apps/web/app/(ee)/api/stripe/integration/webhook/checkout-session-completed.ts@@@ -36,17 -35,17 +36,17 @@@ export async function checkoutSessionComode,workspace,}: WebhookHandlerInput<Stripe.CheckoutSessionCompletedEvent>): Promise<WebhookHandlerResponse> {- let charge = event.data.object;+ let checkoutSession = event.data.object;- let dubCustomerExternalId =- checkoutSession.metadata?.dubCustomerExternalId ||- checkoutSession.metadata?.dubCustomerId;+ let dubCustomerExternalId = getDubCustomerExternalIdFromMetadata(- charge.metadata,++ checkoutSession.metadata,+ );- const clientReferenceId = charge.client_reference_id;+ const clientReferenceId = checkoutSession.client_reference_id;const stripeAccountId = event.account as string;- const stripeCustomerId = charge.customer as string;- const stripeCustomerName = charge.customer_details?.name;- const stripeCustomerEmail = charge.customer_details?.email;- const invoiceId = charge.invoice as string;- const promotionCodeId = charge.discounts?.[0]?.promotion_code as+ const stripeCustomerId = checkoutSession.customer as string;+ const stripeCustomerName = checkoutSession.customer_details?.name;+ const stripeCustomerEmail = checkoutSession.customer_details?.email;+ const invoiceId = checkoutSession.invoice as string;+ const promotionCodeId = checkoutSession.discounts?.[0]?.promotion_code as| string| null| undefined;