Question

SUBSCRIPTION_EXTENDED: Expiration date in REST API and Webhook event

  • 11 April 2024
  • 2 replies
  • 21 views

Badge +2

Hi there!

We encountered a peculiar situation with the SUBSCRIPTION_EXTENDED event (PlayStore). Here's the user flow:

  1. 2024/03/15: The user subscribes (INITIAL_PURCHASE) with an expiration date of 2024/03/22.
  2. 2024/03/22: The subscription is extended (SUBSCRIPTION_EXTENDED) to a new expiration date of 2024/03/23.
  3. 2024/03/23: A grace period begins due to a BILLING_ISSUE/CANCELLATION, with a new expiration date set for 2024/04/06.
  4. 2024/03/25: The subscription expires (EXPIRATION), with an expiration date of 2024/03/22.

However, the /subscribers/${userId} REST API method began returning an expiration date of 2024/04/06 after the third step and didn't update beyond that.

 

Given these events, when did the user lose their entitlement?

  • Was it on 2024/03/25, after the EXPIRATION event?
  • Or on 2024/04/06, after the grace period ended?

If the entitlement was lost after the EXPIRATION event, why does the REST API continue to report 2024/04/06 as the expiration date?


This post has been closed for comments

2 replies

Userlevel 5
Badge +9

Hi @whisk-developer,

If ever in doubt, I would take the API response over the webhook. The API is always up to date and isn’t susceptible to things such as failed webhook deliveries, simultaneous subscription status changes, etc.

But this is definitely a strange case, it seems there should be a renewal or other purchase event that happened after the expiration. Try looking through the entire history and see if there is a purchase event with an event timestamp that is after the expiration date. It can sometimes be ordered unintuitively so that even though in the customer history the purchase event appears to have happened before the expiration event, in reality it happened after. That would be the missing purchase event you’re looking for.

If you can’t find the event, can I ask you to open a support ticket with the specific event/customer in question so that we can investigate?

Badge +2

Hi @sharif!

Thanks for replying!

 

» Try looking through the entire history and see if there is a purchase event with an event timestamp that is after the expiration date. 

I have found no events recorded after the EXPIRATION.

 

» If you can’t find the event, can I ask you to open a support ticket with the specific event/customer in question so that we can investigate?

I have already opened the ticket.

 

Also, it seems according to the PlayStore that the user lost their entitlements on 03/25 right after the EXPIRATION event:

 

RevCat UI shows 03/23:

but the REST API still returns 04/06:

{
  "request_date": "2024-04-17T06:27:14Z",
  "request_date_ms": 1713335234127,
  "subscriber": {
    "entitlements": {
      "premium_v0": {
        "expires_date": "2024-04-06T04:06:14Z",
        "grace_period_expires_date": "2024-04-06T04:06:14Z",
        "purchase_date": "2024-03-23T04:06:14Z",

        ...
      }
    },
   ...
}