Skip to main content
Question

Grant an Entitlement does not work as expected

  • November 12, 2024
  • 1 reply
  • 151 views

Forum|alt.badge.img

Hello,

We are encountering an issue when attempting to grant an entitlement to users. The entitlement works as expected the first time, but when we revoke it and grant it again (as part of our test suite), the entitlement does not update correctly. Specifically, the old entitlement is still showing, and the expiry dates are incorrect.

 

Could you please provide some guidance on this issue?

 

As you can see below, the start and end dates do not match as expected.

 

https://api.revenuecat.com/v1/subscribers/2SANDBOX768/entitlements/Referrals/promotional

{
    "start_time_ms":1731403098690,
    "end_time_ms":1731403598690
}


{
    "request_date": "2024-11-12T09:11:30Z",
    "request_date_ms": 1731402690493,
    "subscriber": {
        "entitlements": {
            "Referrals": {
                "expires_date": "2024-11-12T08:56:32Z",
                "grace_period_expires_date": null,
                "product_identifier": "rc_promo_Referrals_custom",
                "purchase_date": "2024-11-12T08:48:35Z"
            }
        },
        "first_seen": "2024-11-12T08:46:00Z",
        "last_seen": "2024-11-12T08:46:00Z",
        "management_url": null,
        "non_subscriptions": {},
        "original_app_user_id": "2SANDBOX768",
        "original_application_version": null,
        "original_purchase_date": null,
        "other_purchases": {},
        "subscriptions": {
            "rc_promo_Referrals_custom": {
                "auto_resume_date": null,
                "billing_issues_detected_at": null,
                "expires_date": "2024-11-12T08:56:32Z",
                "grace_period_expires_date": null,
                "is_sandbox": false,
                "original_purchase_date": "2024-11-12T08:48:35Z",
                "period_type": "normal",
                "purchase_date": "2024-11-12T08:48:35Z",
                "refunded_at": null,
                "store": "promotional",
                "store_transaction_id": "3ed1acb5319f2a32c37458f0f8b34c5a",
                "unsubscribe_detected_at": null
            }
        }
    }
}

 

This post has been closed for comments

1 reply

joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 353 replies
  • November 14, 2024

Hi ​@dragos-722fae,

How long do you wait between the revoking and granting it again? I’m assuming that you do it through the API, correct? If you fetch the customerInfo after re-granting it, does it look correct or is it the same?

 

Best,


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