Solved

api v1 entitlements null with test account in android

  • 12 March 2024
  • 3 replies
  • 16 views

Badge +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.

icon

Best answer by kaitlin 14 March 2024, 16:01

View original

This post has been closed for comments

3 replies

Userlevel 4
Badge +6

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.

Badge +3

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.

Userlevel 4
Badge +6

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: