Skip to main content
Solved

api v1 entitlements null with test account in android


Forum|alt.badge.img+3

Hello Revenuecat Team,

I have successfully integrated and tested the iOS version, and it works perfectly. Now, I am testing with a real Android device and have made a test purchase for a subscription package. It was successful, but when my server calls the API to check customer info, I receive the following data:

{
"request_date": "2024-03-12T09:15:30Z",
"request_date_ms": 1710234930863,
"subscriber": {
"entitlements": {},
"original_application_version": null,
"original_purchase_date": null,
"other_purchases": {},
"subscriptions": {
"xxx12monthsub": {
"expires_date": "2024-03-12T09:34:17Z"
},
"xxxx.6monthsub": {
"expires_date": "2024-03-12T09:02:55Z"
}
}
}
}

*xxx represents the accurate subscription package code, which I have removed for security reasons.

My question is, if it is an Android device, do I need to check the "subscriptions" instead of "entitlements" as in iOS?

Here is my flow:
1: User clicks on the subscription button on the device -> sends a request to my server.
2: My server calls Revenuecat to retrieve customer info and checks in entitlements.

Please provide me with a solution.

Best answer by kaitlin

Hi @huynh-thanh-huy-3695c5,

Your flow sounds correct and if we are seeing the successful subscription purchase, we’d expect to see the granted entitlements listed as well on either platform. This might feel like an obvious suggestion if you’ve already checked, but are the Android products attached to the Entitlement as the iOS products were? It would be possible to import them, attach them to an Offering, and purchase them but without ever having attached an entitlement to the products, and that’s a situation that would produce this issue.

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

3 replies

kaitlin
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 378 replies
  • Answer
  • March 14, 2024

Hi @huynh-thanh-huy-3695c5,

Your flow sounds correct and if we are seeing the successful subscription purchase, we’d expect to see the granted entitlements listed as well on either platform. This might feel like an obvious suggestion if you’ve already checked, but are the Android products attached to the Entitlement as the iOS products were? It would be possible to import them, attach them to an Offering, and purchase them but without ever having attached an entitlement to the products, and that’s a situation that would produce this issue.


Forum|alt.badge.img+3
kaitlin wrote:

Hi @huynh-thanh-huy-3695c5,

Your flow sounds correct and if we are seeing the successful subscription purchase, we’d expect to see the granted entitlements listed as well on either platform. This might feel like an obvious suggestion if you’ve already checked, but are the Android products attached to the Entitlement as the iOS products were? It would be possible to import them, attach them to an Offering, and purchase them but without ever having attached an entitlement to the products, and that’s a situation that would produce this issue.

Thank you for responding so slowly. I had to spend a lot of time solving it myself.


kaitlin
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 378 replies
  • March 15, 2024

For time sensitive issues that you’d like a faster response to, I’d recommend submitting a support request through revenuecat.com/support. The community is designed as a place to engage with other developers about questions that are outside the scope of our support team, but if you’re ever unsure about where to ask your questions, we have a great article here: 

 


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