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 charge-failed.ts

Kiran K12f705966953
diff --git a/apps/web/app/(ee)/api/stripe/webhook/charge-failed.ts b/apps/web/app/(ee)/api/stripe/webhook/charge-failed.ts
index 47638be8b5..3909fef019 100644
--- a/apps/web/app/(ee)/api/stripe/webhook/charge-failed.ts
+++ b/apps/web/app/(ee)/api/stripe/webhook/charge-failed.ts
@@ -89,7 +89,7 @@ export async function chargeFailed(event: Stripe.Event) {
const paymentMethod = paymentMethods.data[0];
const shouldChargeFailureFee =
- charge.payment_method_details?.type === "ach_debit";
+ charge.payment_method_details?.type === "us_bank_account";
// Charge failure fee for ACH payment failures
if (shouldChargeFailureFee) {
@@ -104,6 +104,12 @@ export async function chargeFailed(event: Stripe.Event) {
statement_descriptor: "Dub Partners",
description: `Dub Partners payout failure fee for invoice ${invoice.id}`,
});
+
+ log({
+ message: `Charged a failure fee of $${PAYOUT_FAILURE_FEE_CENTS / 100} to ${workspace.slug}.`,
+ type: "errors",
+ mention: true,
+ });
}
waitUntil(