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.

handle more edge cases

Steven Tey2ba3d02b107b
diff --git a/apps/web/lib/rewardful/import-referrals.ts b/apps/web/lib/rewardful/import-referrals.ts
index fda46ff55d..f412e629a1 100644
--- a/apps/web/lib/rewardful/import-referrals.ts
+++ b/apps/web/lib/rewardful/import-referrals.ts
@@ -131,8 +131,11 @@ async function createReferral({
return;
}
- if (!referral.stripe_customer_id) {
- console.log("No Stripe customer ID provided for referral");
+ if (
+ !referral.stripe_customer_id ||
+ !referral.stripe_customer_id.startsWith("cus_")
+ ) {
+ console.log("No Stripe customer ID provided for referral", referral);
return;
}