Skip to content
VPNDetection

Screen payments

Hold or review payments whose address hides its location behind a VPN, Tor or a proxy, or whose country contradicts the card's country.

Someone paying with a stolen card often hides their location behind a VPN, a proxy or Tor. This guide adds two checks to your payment flow: whether the payment's address is anonymized, and whether its country matches the card's. Neither should block on its own; together they decide which payments to hold for review.

How it works

When a customer submits a payment, your server looks up their address before it sends the charge. It compares the address's country with the card's issuing country, which your payment provider returns, and checks whether the address belongs to a VPN, a Tor exit or a hosting network. A payment with no signals proceeds; a payment with signals goes to review or asks for extra authentication, such as 3D Secure.

Before you begin

  • The card's issuing country from your payment provider.
  • A way to hold a payment for review, or to request extra authentication.

1. Collect the signals

Node.js
export async function paymentSignals(ip, cardCountry) {
    const r = await client.lookup(ip);
    const signals = [];
    if (r.isTor) {
        signals.push('tor');
    }
    if (r.isVpn) {
        signals.push('vpn');
    }
    if (r.asn?.type === 'hosting') {
        signals.push('hosting network');
    }
    if (r.location?.country && cardCountry && r.location.country !== cardCountry) {
        signals.push('country mismatch');
    }
    return signals;
}

2. Decide

  • No signals: send the charge.
  • One signal: request extra authentication if your provider supports it.
  • Two or more, or Tor: hold the payment for review.

A country mismatch alone is common: people travel, and shop from abroad. Weigh it together with the other signals rather than on its own. These signals add to your payment provider's own fraud checks; they don't replace them.

3. Handle a failed lookup

Never block a payment because the lookup failed. Send the charge as you would without VPNDetection, and let your payment provider's own checks decide. Record that the payment wasn't screened.

4. Review held payments

A reviewer decides faster with the evidence in front of them. Store the signals with each held payment, and show them beside the order:

  • The signals that held the payment, such as vpn and country mismatch.
  • The address's country and the card's issuing country.
  • The network that announces the address (asn.name) and its type (asn.type).

A VPN alone doesn't mean fraud. A reviewer who sees a VPN, a matching card country and an account with a history can usually release the payment quickly.

5. Test it

Submit a test payment from a VPN whose country differs from your test card's. The payment should be held or asked for authentication.

With a paid plan

A paid plan flags residential and mobile proxies, which fraudsters use precisely because they look like home connections, and adds the city, so you can compare the address with the billing address more closely than by country.

Next steps

Payments often follow a sign-up or a login. See Screen VPN and proxy sign-ups and Step up risky logins.