Geolocation-Based Pricing & Currency Localization

Show the right price in the right currency, without asking the user.

If you sell to more than one country, a USD-only price page leaves money on the table. European buyers see “$19” and mentally add 20% VAT uncertainty. Emerging-market buyers convert in their head, hit sticker shock, and bounce. Localizing price + currency at page-load lifts conversion by 15–35% in most B2B SaaS A/B tests.

The business problem

Hard-coded pricing in one currency is a conversion tax in every other market. The cheapest fix is to:

  1. Detect the visitor’s country on their first request.
  2. Map that country to its currency + local pricing tier.
  3. Render the price in-line, before the pricing page paints.

IP geolocation makes step 1 cost ~0,0001 EUR per visitor.

Implementation

1. Server-side (recommended — no layout shift)

// Next.js middleware (Edge runtime) or Express middleware
import { ipgeoLookup } from "./lib/ipgeo.js";

export async function middleware(req) {
  const ip = req.headers.get("x-forwarded-for")?.split(",")[0] || req.ip;
  const geo = await ipgeoLookup(ip);
  req.geo = geo; // { country_code, currency, is_eu, ... }
  return NextResponse.next({ request: { headers: req.headers } });
}

Then in your pricing page:

function PricingTable({ geo }) {
  const pricing = getPricingForCountry(geo.country_code); // your mapping
  return (
    <>
      <p>Showing prices in {pricing.currency} for {geo.country_name}</p>
      <p><a href="?currency=USD">Switch to USD →</a></p>
      {/* price cards */}
    </>
  );
}

2. Client-side (fallback for static sites)

<script>
  fetch("https://api.ipgeo.10b.app/v1/lookup/me", {
    headers: { Authorization: "Bearer pub_live_…" }
  })
  .then(r => r.json())
  .then(geo => {
    const curr = geo.currency || "USD";
    document.querySelectorAll("[data-price]").forEach(el => {
      el.textContent = formatMoney(el.dataset.price, curr, geo.country_code);
    });
  });
</script>

Note: client-side lookup exposes your API key to the browser. Use a public/restricted key with IP-lookup-only scope + referrer whitelisting. Never embed a server key.

Why IP Geo API for this use case

Pricing math for a pricing page

Monthly visitors Tier Cost/mo
< 30 K Free € 0
< 1 M Starter € 29
< 10 M Business € 99

A 10K-visitor/mo SaaS pricing page → € 0. A 1M/mo high-traffic marketing site → € 29. If geo-pricing lifts conversion 15% and your ARPU is € 50, that’s € 7,500 extra MRR for € 29/mo spend (break-even at 1 extra customer).

Honest trade-offs

Related use cases

Get started

Sign up at https://ipgeo.10b.app/pricing.


Get early access — 50% off for 12 months

First 100 signups lock in 50% off any paid plan for the first year. No credit card required — we’ll email you at launch.