Skip to main content
Solved

Best Practice - Handling Subscription Cancellations/Refunds/Reactivations

  • 18 January 2022
  • 1 reply
  • 199 views

Hello, I was wondering what the best practice is to handle an app with subscriptions when a user cancels the subscription, gets a refund and then possibly reactivates the subscription.  Are webhooks the best practice for this?

 

1 reply

Userlevel 5
Badge +9

Checking the PurchaserInfo object in the SDK to see if an entitlement is active or not is typically the easiest approach and automatically handles all of these cases so you don’t need to think about it.

 

Something like:

if purchaserInfo.entitlements["your_entitlement_id"]?.isActive == true {
// Unlock that great "pro" content
}

 

Reply