When I make a purchase from the SDK, my backend calls a method to validate the purchase with the subscribers api.
The response returned has a body like this:
{
"request_date": "2022-06-21T11:55:20Z",
"request_date_ms": 1655812520624,
"subscriber": {
"entitlements": {
"active": {
"expires_date": "2022-06-14T06:23:52Z",
"grace_period_expires_date": null,
"product_identifier": "onemonthusd899",
"purchase_date": "2022-06-14T06:18:52Z"
}
},
"first_seen": "2022-06-21T11:11:25Z",
"last_seen": "2022-06-21T11:11:38Z",
"management_url": null,
"non_subscriptions": {},
"original_app_user_id": "$RCAnonymousID:e7d81c263043488bb14c909718f83508",
"original_application_version": "1.0",
"original_purchase_date": "2013-08-01T07:00:00Z",
"other_purchases": {},
"subscriptions": {
"onemonthusd899": {
"billing_issues_detected_at": null,
"expires_date": "2022-06-14T06:23:52Z",
"grace_period_expires_date": null,
"is_sandbox": true,
"original_purchase_date": "2022-06-14T05:21:38Z",
"ownership_type": "PURCHASED",
"period_type": "normal",
"purchase_date": "2022-06-14T06:18:52Z",
"store": "app_store",
"unsubscribe_detected_at": "2022-06-14T08:53:49Z"
}
}
}
}
The problem here is that the active entitlement (which I named “active”), which was just granted a few seconds before this API call, says that it was both granted and expired 7 days ago, so my code rightly detects it as expired and does not grant product access.
Is this normal for the sandbox / a corrupted sandbox user? I feel like I might be overlooking something, but it feels odd to me that a just-granted entitlement would expire a week before being granted.
An Apple Sandbox subscription purchase gives back an entitlement that expired a week ago on a new account.
Page 1 / 1
Looks like sandbox weirdness… I’d suggest starting with a new sandbox account and re-test. By the way, any reason of manually polling instead of relying on RevenueCat’s webhooks?
I need to validate on the backend + grant some claims with firebase tokens immediately so the app can use a bunch of distributed services. :)
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.