I would like to support this. The dollar-value to a customer in India is probably lower than in the USA.
Most big platforms (Udemy, App Store, Play Store) seem to solve this with a price tier matrix. They maintain a big table of prices per (tier, currency). The tier comes from the product, and the currency comes from ... the user's IP address? (See example matrix [2])
To build this from scratch, I would have to:
* Define a list of tiers, each with a hard-coded USD price.
* Maintain a list of Purchasing Power Parity multipliers for each currency. For example, regularly scrape OECD data.
* To get a tier's price in currency X, multiply by the current PPP.
* Somehow clamp the prices to "appealing" values, so we get e.g. £25 instead of £24.19.
* Ensure we never make a loss after subtracting Stripe fees!
* Detect a user's location. Presumably using IP. Map location to a country, and country to a currency.
* Probably many more things I haven't thought of.
This feels like a generic problem that I shouldn't be re-solving myself. So, questions:
* What libraries/services can I use instead?
* How do you do implement localized pricing?
* Are there complexities that explain why there's not an out-of-the-box solution?
[1]: https://news.ycombinator.com/item?id=32118530 [2]: https://s3.amazonaws.com/udemy-images/support/Udemy+Price+Tier+Matrix+-+EN+09-17+Matrix.pdf