Docs Getting Started How it Works

How it Works

RefundShield acts as the middleman between the store (Apple or Google) and your app when a refund is requested. The core idea is the same on both platforms, a customer asks for a refund, the store notifies RefundShield, and RefundShield responds with a decision based on your strategy. The mechanics differ slightly per platform.

The Refund Flow

1. Customer Requests a Refund

A customer requests a refund for an in-app purchase or subscription, through reportaproblem.apple.com or the App Store on iOS, or through Google Play / the Play Store on Android.

2. The Store Sends a Notification

  • Apple sends an App Store Server Notification V2 of type CONSUMPTION_REQUEST to your webhook URL. This contains the transaction details and gives you 12 hours to respond.
  • Google sends a Real-time Developer Notification through Google Cloud Pub/Sub when a refund is requested or a purchase is voided.

3. RefundShield Analyzes the Transaction

RefundShield receives the notification, verifies the payload (Apple's signed JWS or Google's authenticated Pub/Sub message), and analyzes the transaction. Based on your chosen protection preset, it evaluates:

  • How many days since the current and/or the original purchase
  • How many times the subscription has renewed
  • Whether a free trial was used
  • Whether the paid content has been tried or shown
  • The refund reason provided by the customer

4. RefundShield Responds to the Store

  • Apple: RefundShield uses the App Store Server API to send consumption information back to Apple, helping Apple make a more informed decision.
  • Google: RefundShield calls orders.reviewrefund on the Google Play Developer API to submit a refund preference (approve, decline, or neutral).

5. The Store Makes a Decision

  • Apple processes the consumption data and sends a follow-up notification (REFUND or REFUND_DECLINED) with the outcome, which RefundShield logs.
  • Google does not send a second notification, so RefundShield polls the order status to record the final outcome for you.

RefundShield never accesses your customers' personal data. All analysis is done using transaction metadata provided by Apple or Google.