Question

Cross-platform get billing amount

  • 14 February 2024
  • 1 reply
  • 6 views

Badge

Hello,

So I have my app set up and working very nicely using revenueCat, however there is one tiny issue that I hope someone here can help with.

I have a subscription management page where I am displaying some details, where ‘next billed amount’ is one of them, that is displaying the amount billed string that I can only find in the offerings object.

So far I have been fine with just comparing the productId found in the offering object with the id in the active subscriptions from the customer info object. The thing is, if the user purchases that product on an android device but then switches to iPhone, then I can’t currently get the billed amount, because the offering is now returning the product Id of the iPhone product which is different to the android one. So comparing the two returns falsy and therefor an undefined amount.

 

So I am wondering how others may have gone around this. One solution I do have in mind is naming the identifiers for android and iOS products exactly the same, but we are planning on having a lot of different products for different apps in future and this way leaves it open to human error. So hoping there is a better way. 


This post has been closed for comments

1 reply

Userlevel 3
Badge +5

Hi! Have you looked into using the Offering Metadata tool in order to perform this check? It would require some further configuration in the RevenueCat dashboard, but if I am understanding what you are attempting to do correctly, it would allow you to pass the information that you need cross-platform.