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.

add back minimum withdrawal threshold check

Steven Tey7c5baa33b9f0
diff --git a/apps/web/app/(ee)/api/cron/trigger-withdrawal/route.ts b/apps/web/app/(ee)/api/cron/trigger-withdrawal/route.ts
index e4560b3fee..07c757411f 100644
--- a/apps/web/app/(ee)/api/cron/trigger-withdrawal/route.ts
+++ b/apps/web/app/(ee)/api/cron/trigger-withdrawal/route.ts
@@ -55,6 +55,12 @@ export async function GET(req: Request) {
const balanceToWithdraw = currentNetBalance - reservedBalance;
+ if (balanceToWithdraw <= 10000) {
+ return NextResponse.json({
+ message: "Balance to withdraw is less than $100, skipping...",
+ });
+ }
+
const createdPayout = await stripe.payouts.create({
amount: balanceToWithdraw,
currency: "usd",