As per the subject, how is the USD value calculated for the webhook ‘price’ field if the purchase is made in a different currency?
Building for both the App Store and Google Play.
Thanks
As per the subject, how is the USD value calculated for the webhook ‘price’ field if the purchase is made in a different currency?
Building for both the App Store and Google Play.
Thanks
Hi there,
Thanks for the question!
When you see the price
field in a RevenueCat webhook payload, you’re looking at the USD-equivalent of whatever local price your customer actually paid. Here’s how we get that number:
Exchange-Rate Table
We maintain an internal lookup table of currency exchange rates (for example, EUR→USD, JPY→USD, etc.).
Rate at Purchase Time
At the moment a purchase, we grab the exchange rate for that customer’s currency on that day.
Conversion
We multiply the local purchase price (e.g. €4.99 or ¥600) by the day’s USD exchange rate.
Webhook Field
The result of that calculation is what you see in the webhook’s "price"
field.
Hope that clears things up! Let me know if you need help with anything else.
Best,
Hussain
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.