stubkit docs

Feature · Paywall · Conversion

Regional pricing

Showing a Turkish user "$9.99/month" when their local equivalent would be ~300 TL is a conversion killer. Showing "99 TL/month" — about 30% cheaper in US-dollar terms — lifts conversion 5-10×. Stubkit supports per-country price overrides on every product.

Define the overrides

await stubkitAdmin.updateProduct(productId, {
  prices_by_country: {
    US: { amount_cents: 999,   currency: 'USD' },  // $9.99
    TR: { amount_cents: 9990,  currency: 'TRY' },  // ₺99.90
    IN: { amount_cents: 19900, currency: 'INR' },  // ₹199
    BR: { amount_cents: 1990,  currency: 'BRL' },  // R$19.90
    GB: { amount_cents: 799,   currency: 'GBP' },  // £7.99
    EU: { amount_cents: 899,   currency: 'EUR' },  // €8.99 (fallback for EU countries)
  },
});

Keys are ISO 3166-1 alpha-2 country codes. Amounts are in the smallest currency unit (cents for most; whole-yen for JPY, kuruş for TRY). Missing country = fall back to the default price_usd_cents on the product.

Paywall picks automatically

The public offerings endpoint reads the CF-IPCountry edge geolocation header (or accepts an explicit ?country= query for testing) and returns display_price_cents + display_currency matching the user's region:

GET /v1/offerings/taskpomo/default
CF-IPCountry: TR   # injected at the edge — no SDK work needed

{
  "country": "TR",
  "products": [
    {
      "product_id": "pro_monthly",
      "price_usd_cents": 999,            // original default
      "display_price_cents": 9990,       // regional override
      "display_currency": "TRY",
      ...
    }
  ]
}

Checkout uses the right currency

When a user clicks "Subscribe" and you call POST /v1/checkout/sessions, pass the Stripe price ID that matches the region's currency. Create multi-currency prices in Stripe once (Stripe Prices → Add another currency), then on stubkit side just set the country map.

What about Apple/Google?

Apple and Google Play handle regional pricing natively via their own pricing tier systems (you configure prices per App Store / Play Console country). Stubkit doesn't override that — the user sees whatever Apple or Google quotes them at purchase time. Our regional pricing is specifically for the stubkit-hosted web checkout flow.

Fallback chain

  1. Country code in prices_by_country[CF-IPCountry]
  2. Explicit ?country= query override (useful for testing)
  3. Product's default price_usd_cents in USD