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.

skip checkoutSessionCompleted if setup mode

Kiran K8582660cb204
diff --git a/apps/web/app/api/stripe/webhook/checkout-session-completed.ts b/apps/web/app/api/stripe/webhook/checkout-session-completed.ts
index 25fc8a4993..001869666c 100644
--- a/apps/web/app/api/stripe/webhook/checkout-session-completed.ts
+++ b/apps/web/app/api/stripe/webhook/checkout-session-completed.ts
@@ -15,6 +15,10 @@ import Stripe from "stripe";
export async function checkoutSessionCompleted(event: Stripe.Event) {
const checkoutSession = event.data.object as Stripe.Checkout.Session;
+ if (checkoutSession.mode === "setup") {
+ return;
+ }
+
if (
checkoutSession.client_reference_id === null ||
checkoutSession.customer === null