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.

Update payout.ts

Steven Tey92b58ac4d9bb
diff --git a/apps/web/lib/api/sales/payout.ts b/apps/web/lib/api/sales/payout.ts
index c1c777551f..377235dea1 100644
--- a/apps/web/lib/api/sales/payout.ts
+++ b/apps/web/lib/api/sales/payout.ts
@@ -38,6 +38,7 @@ export const createPartnerPayouts = async ({
programId,
partnerId,
payoutId: null,
+ status: "pending", // We only want to pay out sales that are pending (not refunded / fraud / duplicate)
createdAt: {
lte: subDays(new Date(), 30), // Referral commissions are held for 30 days before becoming available.
},