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.

limit stripe promotionCodes to first_time_transaction

Steven Tey564533f4944e
diff --git a/apps/web/lib/stripe/create-stripe-discount-code.ts b/apps/web/lib/stripe/create-stripe-discount-code.ts
index 2af45cec94..443cea7f16 100644
--- a/apps/web/lib/stripe/create-stripe-discount-code.ts
+++ b/apps/web/lib/stripe/create-stripe-discount-code.ts
@@ -38,6 +38,9 @@ export async function createStripeDiscountCode({
{
coupon: discount.couponId,
code: currentCode.toUpperCase(),
+ restrictions: {
+ first_time_transaction: true,
+ },
},
{
stripeAccount: stripeConnectId,