Skip to main content
Question

How to get price paid from user/subscription


Forum|alt.badge.img+1

Hi all, looking to use the Revenue Cat API to dynamically set the price of a subscription within my app - looking at the API docs I’m struggling to find a way to make a GET request with either a UserId or SubscriptionId to get the price of a subscription. Is there a way to do this currently, and if so - how?

9 replies

kaitlin
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 342 replies
  • June 14, 2023

Hi @bradyash 

Unfortunately, price information is not currently available from our REST API, either to set it or to get it. This is something that our team is working on for the v2 API, but unfortunately I don’t have an ETA for it to be covered. 

In the meantime, I’d recommend using webhooks to get the price a user paid for their subscription. 


Forum|alt.badge.img+3

hey @kaitlin , one year later.. has this been solved? Don’t see it in API v2.. and seems like a pretty trivial request/capability

LMK thanks!


Forum|alt.badge.img+5
  • Active Member
  • 12 replies
  • August 22, 2024

I’m looking for this too. My use case is that I want to show the user the price that they paid so they can can compare with the current price. The goal is to reduce churn.


Any update on this? I need this too, and is there any option to get the promo code used by the user while subscribing?


Forum|alt.badge.img+2
  • Member
  • 5 replies
  • October 28, 2024

I’m also curious about this. I couldn’t locate any API endpoint in V2 that provides the price of a subscription. It would be nice if we would easily fetch the price.


joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 208 replies
  • October 29, 2024

Hi @hayata-sue,

If you have the purchase id, you can get the price through this endpoint.

Let me know if this works!


Forum|alt.badge.img+2
  • Member
  • 5 replies
  • October 29, 2024

thank you for your response @joan-cardona! I’ll try that!


Forum|alt.badge.img+2
  • Member
  • 5 replies
  • October 30, 2024

Hi @joan-cardona, I tried this endpoint → v2/projects/{project_id}/customers/{customer_id}/purchases

with a customer ID who just started a subscription. I’m testing in the sandbox environment, but this endpoint returned an empty array for items.

Does the purchases endpoints return the price of subscriptions, too?


joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 208 replies
  • November 5, 2024

Hi @hayata-sue,

That endpoint should return an array that contains `revenue_in_usd` - which is an object that contains currency, gross revenue, proceeds, commission and tax. See here the documentation.

You should be able to get the price of the subscription. Have you tried with a production user? I’m going to check if there’s a limitation in sandbox but I know that testing environment can have issues with pricing and currencies.

Best,


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