STREAMVAULT
Back
Pricing powered by Cloudflare Workers · request.cf.country

Watch everywhere.
Pay in your currency.

Prices detected automatically from your location via Cloudflare. No geo-IP API. Zero extra latency.

Detecting your location…

Change currency

Auto-detected from your location · override anytime

How it works

request.cf.country — free on every request

🌏

request.cf.country

Cloudflare adds the visitor's country code to every request header — for free. No geo-IP API subscription needed.

Worker intercepts

A Worker reads cf.country, looks up the local currency rate, and rewrites the price before the HTML reaches the browser.

0ms

Zero added latency

Conversion happens at the nearest PoP, microseconds before response is sent. No round-trip to a pricing microservice.

$0

No API cost

MaxMind charges per lookup. IP-API charges per lookup. request.cf.country is included on every Cloudflare plan at no extra cost.

worker.ts — geo-pricing
export default {
  async fetch(request) {
    // request.cf.country is FREE on every request — no geo-IP API needed
    const country = request.cf?.country || 'US'

    const rates = {
      TH: { symbol: '\u0E3F', rate: 35.00  },
      SG: { symbol: 'S$',     rate: 1.35   },
      ID: { symbol: 'Rp',     rate: 16250  },
      MY: { symbol: 'RM',     rate: 4.72   },
      PH: { symbol: '\u20B1', rate: 56.80  },
      VN: { symbol: '\u20AB', rate: 25450  },
      JP: { symbol: '\u00A5', rate: 149.50 },
    }

    const cur = rates[country] || { symbol: '$', rate: 1 }

    // Rewrite the price element in the HTML response
    const res = await fetch(request)
    return new HTMLRewriter()
      .on('[data-usd-price]', {
        element(el) {
          const usd = parseFloat(el.getAttribute('data-usd-price'))
          el.setInnerContent(cur.symbol + Math.round(usd * cur.rate).toLocaleString() + '/mo')
        }
      })
      .transform(res)
  }
}

Pricing in all markets

Premium plan · monthly price