Understanding refunds & Backend data processing

  • 4 October 2023
  • 1 reply

Badge +4

Inb4 great platform and docs ✋

Hi, I’m almost finished with my iOS app and i’m at the point where i want to integrate in-app purchases. So far so good with settings up my project in revenuecat. 

My in app purchases is a common case of ​​​​​

  • consumables - coin packages
  • non-consumable - lifetime access
  • auto-renewal subscriptions - silver / gold - monthly / yearly

I’m using firestore and cloud functions as db and backend, and i’ve also set up the revenuecat extension for firebase. 


And let’s say on the user profile in firebase I have a field called
active_subscription = silver / gold / free / lifetime


Even though i’ve read lots of article about this, official documentation, examples etc, I still have some questions about certain flows especially Refunds

  1.  I’m not sure how to handle them. If a refund is accepted by apple for a transaction, the cancellable event is triggered for the web hooks?
    1. if that is true, then in my backend hook i’ll update the profile active_subscription? then what’s the point of entitlements in my ios app? If I have realtime updates setup to listen for profile updates in firebase, they’d work in a similar manner
  2. If i have to set up hooks to define custom logic in order to update my db, i don’t see why do i need the firebase extension. Is it for analytics purposes?
  3. What happens if a user requests a refund for a consumable  that they used and the refund gets accepted? What do i need to do then? I can’t take back the coins if they used them already. 

I’m pretty much noob in the payment industry so please bear with me 🙏

Thank you



1 reply

Userlevel 4
Badge +8


  1. You will receive a CANCELLATION webhook with the cancellation reason CUSTOMER_SUPPORT when a refund occurs. The point of entitlements is to have a way to know if specific content in your app is unlocked for the user, which can definitely be done yourself if you’d like. One benefit is RevenueCat’s promotional entitlements here. You can see our docs here on entitlements to see if they meet your use case:
  2. The Firebase extension is required to setup the Firebase user identifies. 
  3. With iOS, refunds are handled by Apple so you’d want to ask them about this.

You can see our refund docs here for more info: