REST API v2 /subscriptions is empty

  • 29 March 2024
  • 4 replies

Userlevel 1
Badge +3

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 \
--header 'Authorization: Bearer sk_xxxxxxxxxxxxxxxxxx'

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

"items": [],
"next_page": null,
"object": "list",
"url": ""

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 29 March 2024, 11:14

View original

This post has been closed for comments

4 replies

Userlevel 1
Badge +3

V1 /subscribers works...

Badge +1

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.  

Userlevel 1
Badge +3

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. 

Badge +1

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.