Sorry if it was asked before, I searched but couldn’t find anything :(
What is the best way to calculate the price for annual subscription per month/week? I want to show user, how much he/she will pay for an annual subscription each month or week.
An app already implementing this, is Snapchat. I checked all over revenuecat documentation but didn’t find this feature.
How to show annual subscription price per month?
Hey
A great way of doing this would be calling the priceString property and dividing that number returned by the length of the subscription. For example, for the annual product diving that returned result by 12. This would return the monthly price of the annual product.
![Top Banana Badge](https://uploads-us-west-2.insided.com/revenuecat-en/attachment/71ea32f8-1374-4f64-bd08-64a064687cc3_thumb.png)
Also, for the denominator, is there a numbers somewhere for 1 (one month), 2 (two months), etc? This way it is more dynamic and we do not need to have a map for each length of subscription.
I think i see a property called `price` with the raw number so maybe that is better..
![Strength In Numbers Badge](https://uploads-us-west-2.insided.com/revenuecat-en/attachment/ad9785ad-84a4-4bde-98db-d0de530785fc_thumb.png)
I am trying to do the same and it’s anything but trivial with the limited information the react-native-purchases package provides.
The only method I see right now is dividing price by 12, and the using the currency code to create a price String myself. But I might still run into issues with rounding here? Also it’s super hard to test with all the different currencies without creating hundreds of sandbox users.
I see that for the paywall templates, RC provides a lot of helpful variables like “sub_price_per_month” etc. It would be super helpful to expose these to the Purchases.getOfferings() call in the react-native package.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.