Skip to main content
Solved

REST API v2 /subscriptions is empty


Forum|alt.badge.img+5

I’m trying to synchronize a users subscriptions to my backend. I have a user with a sandbox subscriptions, I’m i’m trying to get information on their subscription status via:

curl --request GET \
  --url https://api.revenuecat.com/v2/projects/xxxxxxxx/customers/xxxx04c3-9caa-456f-9afc-f84cea6f2bf6/subscriptions \
  --header 'Authorization: Bearer sk_xxxxxxxxxxxxxxxxxx'

I get a 200 OK, but the items array is empty.

{
	"items": [],
	"next_page": null,
	"object": "list",
	"url": "https://api.revenuecat.com/v2/projects/xxxxxxx/customers/xxxxxxx-9caa-456f-9afc-f84cea6f2bf6/subscriptions"
}

Both the RC dashboard and SDK show me that the user has an active entitlement.

The endpoint has an optional query parameter “environment” which can be set to “sandbox” (doesn’t make a difference) but at least it tells me it should work for sandbox? What am I missing here? Is there a secret query parameter similar to V1 that I need to set to get the sandbox purchases included here as well?

Best answer by antonio

This endpoint is publicly available only for RC Billing subscriptions, as stated in the docs. We also offer support for Apple, Google, and Stripe, but it’s currently in Beta. If you’d like to join the beta, you can request access here.  

 

UPDATE: API V2 Subscriptions and Purchases endpoints are no longer in a private beta (since September 2024), and it supports all stores. 

View original
Did this post help you find an answer to your question?
This post has been closed for comments

4 replies

Forum|alt.badge.img+5
  • Author
  • Member
  • 7 replies
  • March 29, 2024

V1 /subscribers works...


antonio
RevenueCat Staff
Forum|alt.badge.img+3
  • RevenueCat Staff
  • 28 replies
  • Answer
  • March 29, 2024

This endpoint is publicly available only for RC Billing subscriptions, as stated in the docs. We also offer support for Apple, Google, and Stripe, but it’s currently in Beta. If you’d like to join the beta, you can request access here.  

 

UPDATE: API V2 Subscriptions and Purchases endpoints are no longer in a private beta (since September 2024), and it supports all stores. 


Forum|alt.badge.img+5
  • Author
  • Member
  • 7 replies
  • March 29, 2024

Got it, thank you for the quick reply. Honestly I read “RevenueCat Billing” and just didn’t know what is meant by that.  Even did a quick google search but didn’t find anything right away. Felt like i’m doing both “RevenueCat” and “Billing”, and it’s not a term that was familiar after working through the integration. 

//edit: also please consider actually telling us what the V2 API is not capable of yet. In the docs it just says “REST API v2 is currently under development and does not yet cover all use cases from API v1. For those missing use cases, please use v1 in the meantime.” What use cases are not covered? Paired with the fact that V1 is flagged as “Legacy” is just confusing and a huge potential time dump when you then discover somewhere down the road that what you want to do is not supported. 


antonio
RevenueCat Staff
Forum|alt.badge.img+3
  • RevenueCat Staff
  • 28 replies
  • March 29, 2024

Fair point. RevenueCat Billing is a brand new product so that probably didn’t help on your search. We’ll make the documentation clearer. Thank you for the feedback. 


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