Skip to main content
Solved

How to handle expired subscription with billing error that can be renewed?

  • October 2, 2021
  • 1 reply
  • 188 views

Forum|alt.badge.img+1

Hello there!

 

I’ve stumbled upon a quite odd behavior while managing permissions of a subscriber. I give promotional entitlements based on some special users and I handle it by checking whether the subscription is expired or not.

In the case I’ve observed, after receiving a webhook containing information of a BILLING_ISSUE event, my routine waited for it to expire to check if the subscription was still active, and it wasn’t, so I revoked the promotional entitlement.

However, the user latter came to complain, and when I checked their profile on RevenueCat’s dashboard, their subscription was active, but without any events on new subscription or renewals. I immediately returned their promotional entitlement, but I was lost with no information to why they were still active.

I’ve used the expiration_at_ms to wait after it to check through the API if the subscription was active.

 

Here is the webhook I received:

{
  "api_version": "1.0",
  "event": {
    "aliases": [
      "..."
    ],
    "app_id": "...",
    "app_user_id": "...",
    "currency": "BRL",
    "entitlement_id": null,
    "entitlement_ids": [
      "..."
    ],
    "environment": "PRODUCTION",
    "event_timestamp_ms": 1629289127246,
    "expiration_at_ms": 1629375526420,
    "grace_period_expiration_at_ms": 1629893059552,
    "id": "...",
    "is_family_share": false,
    "original_app_user_id": "...",
    "original_transaction_id": "...",
    "period_type": "NORMAL",
    "presented_offering_id": null,
    "price": 0,
    "price_in_purchased_currency": 0,
    "product_id": "...",
    "purchased_at_ms": 1629288259552,
    "store": "PLAY_STORE",
    "subscriber_attributes": {...},
    "takehome_percentage": 0.85,
    "transaction_id": "...",
    "type": "BILLING_ISSUE"
  }
}

 

Best answer by ryan

Hey @Bernardo!

I think this is related to a case where Google extends the expiration date while in a grace period, and there isn’t a corresponding RevenueCat event to push the expiration date out. A workaround to handle this could be to use the grace_period_expiration_at_ms, if present, instead of the expiration_date to set entitlement access. Does that look like it would’ve helped here?

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

ryan
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • October 5, 2021

Hey @Bernardo!

I think this is related to a case where Google extends the expiration date while in a grace period, and there isn’t a corresponding RevenueCat event to push the expiration date out. A workaround to handle this could be to use the grace_period_expiration_at_ms, if present, instead of the expiration_date to set entitlement access. Does that look like it would’ve helped 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