Solved

[REST API] How can I get my current offering's packages data?

  • 2 August 2021
  • 2 replies
  • 44 views

Badge

Hello guys, I’m currently building a landing page and in my backend I want to render a page that lists my current offering’s packages prices.

 

But I can’t seem to get that data or find an endpoint that returns it.

What am I missing?

 

Thanks in advance!

icon

Best answer by sharif 3 August 2021, 02:40

I love your browser theme!

So RevenueCat doesn’t store any prices for your products. That information is fetched from Apple/Google/Stripe at the time of purchase. In the case of Apple and Google, it’s fetched from the on-device APIs of each platform and sent along with every purchase so that we know how much the user paid for their purchase.

This means that you’ll have to get the pricing data from outside of RevenueCat. Fortunately for you, as the developer you know all of you product’s prices so you can simply store a map of products to prices somewhere on your backend. Then use RevenueCat’s API to get the current offering’s packages and use the platform_product_identifier to look up the price on your backend.

View original

2 replies

Userlevel 3
Badge +6

I love your browser theme!

So RevenueCat doesn’t store any prices for your products. That information is fetched from Apple/Google/Stripe at the time of purchase. In the case of Apple and Google, it’s fetched from the on-device APIs of each platform and sent along with every purchase so that we know how much the user paid for their purchase.

This means that you’ll have to get the pricing data from outside of RevenueCat. Fortunately for you, as the developer you know all of you product’s prices so you can simply store a map of products to prices somewhere on your backend. Then use RevenueCat’s API to get the current offering’s packages and use the platform_product_identifier to look up the price on your backend.

Badge

I see, I see.


Thank you sharif!

 

Reply