Skip to main content

The API does not return savings


Forum|alt.badge.img+1

Is there a method to refund the saved money on each subscription as a percentage? (without having to use metadata, which would entail recalculating everything, for instance, when changing the subscription price from the Play Console).

As in the following image from the doc

 

2 replies

cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 487 replies
  • August 23, 2023

Hey @gauvain-robert-81fadb!

This isn’t built into our SDK, but shouldn’t be too difficult to calculate on your own. I’d recommend using the `price` property on each product inside a package, and manually calculate the difference between two packages: https://github.com/RevenueCat/purchases-hybrid-common/blob/main/typescript/src/offerings.ts#L87


Forum|alt.badge.img+1

Hello Cody,

   Thank you for your answer. Additionally, in the image, you can also see the trial duration of the subscription, which can vary if desired (this is how it can be done in the Play Console). However, in each package item returned by the SDK, I don't see this field. Is this normal?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings