Skip to content

Commit 9477538

Browse files
committed
Block riskier payments for new subscriptions
1 parent 74aa27c commit 9477538

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/model/account/account-store.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,26 @@ export class AccountStore {
152152
const selectedPlan: SubscriptionPlanCode | undefined = yield this.pickPlan();
153153
if (!selectedPlan) return;
154154

155+
const isRiskyPayment = this.subscriptionPlans[selectedPlan].prices?.currency === 'BRL';
156+
157+
if (!this.isLoggedIn && isRiskyPayment) {
158+
// This is annoying, I wish we didn't have to do this, but fraudulent BRL payments are now 80% of chargebacks,
159+
// and we need to tighten this up and block that somehow or payment platforms will eventually block
160+
// HTTP Toolkit globally. This error message is left intentionally vague to try and discourage fraudsters
161+
// from using a VPN to work around it. We do still allow this for existing customers, who are already
162+
// logged in - we're attempting to just block the creation of new accounts here.
163+
164+
trackEvent({ category: 'Account', action: 'Blocked purchase', label: selectedPlan });
165+
166+
alert(
167+
"Unfortunately, due to high levels of recent chargebacks & fraud, subscriptions for new accounts "+
168+
"will temporarily require manual validation & processing before setup.\n\n" +
169+
"Please email [email protected] to begin this process."
170+
);
171+
172+
return;
173+
}
174+
155175
if (!this.isLoggedIn) yield this.logIn();
156176

157177
// If we cancelled login, or we've already got a plan, we're done.

src/model/account/subscriptions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export interface SubscriptionPlan {
66
id: number;
77
name: string;
88
prices?: {
9+
currency: string;
910
monthly: string;
1011
total: string;
1112
};
@@ -59,6 +60,7 @@ async function loadPlanPrices() {
5960
: totalPrice;
6061

6162
plan.prices = {
63+
currency: currency,
6264
total: formatPrice(currency, totalPrice),
6365
monthly: formatPrice(currency, monthlyPrice)
6466
};

0 commit comments

Comments
 (0)