A Flutter in app purchase refund never reaches your Dart code, so your server has to catch it
Flutter's in_app_purchase plugin has no refunded status, and on iOS it passes every updated transaction to Dart as purchased. Here's where a Flutter in app purchase refund actually shows up, what missing it costs, and the server setup that catches it.

Key takeaways
- Flutter's in_app_purchase plugin reports five purchase statuses, pending, purchased, error, restored and canceled, and none of them means refunded.
- On iOS, the in_app_purchase_storekit source listens to StoreKit 2's Transaction.updates and forwards every verified transaction to Dart with the status purchased, including a transaction Apple has just revoked.
- Flutter's restorePurchases only returns what the store still considers owned: StoreKit 2's Transaction.currentEntitlements on iOS and Google's queryPurchasesAsync on Android. A refunded product simply stops appearing, and no event announces it.
- Consumable refunds are invisible to a Flutter app, because restorePurchases never returns consumed products and the App Store has no API for querying consumables.
- The reliable refund signals are server-side: Apple's REFUND notification in App Store Server Notifications, and Google Play's voided purchase notification plus the Voided Purchases API, which covers the past 30 days.
- For Google Play orders placed after August 3, 2026, a chargeback costs the developer the purchase price minus Google's service fee, plus the bank's chargeback fees.
- Only two refund flows accept a developer's evidence: Apple's CONSUMPTION_REQUEST, answered within 12 hours, and Google Play's chargeback review through orders.reviewrefund, answered within 24 hours.
Flutter's official in_app_purchase plugin has no way to tell your Dart code that a purchase was refunded. There's no refunded status, no refund callback, and on iOS a revoked transaction reaches Dart labeled as purchased. So a Flutter in app purchase refund, unless something outside the app catches it, leaves the buyer with the money back and the unlock still on.
That isn't a bug in the plugin. It's a design boundary. Apple and Google send refund news to your server, and the plugin is a client library. The trouble starts when an app treats the plugin's stream as the whole truth about who paid.
What the in_app_purchase plugin reports, and what it leaves out
The plugin's PurchaseStatus enum has five values: pending, purchased, error, restored and canceled. Every purchase you'll ever see in Dart arrives with one of them. Canceled means the buyer backed out of the purchase sheet. It doesn't mean refunded, and nothing in the enum does.
Version 3.3.1 of in_app_purchase uses StoreKit 2 by default on iOS and macOS. StoreKit 2 does know about refunds. Apple's documentation says a refunded or revoked transaction carries a revocationDate, and it's delivered through Transaction.updates while the app runs. The catch is in the bridge. In the current in_app_purchase_storekit source, the listener on Transaction.updates sends every verified transaction to Dart with the status purchased. The message type it sends has no revocation field at all. The revocation date exists only inside the raw signed transaction data, which your code would have to decode itself.
Why does restorePurchases still show my refunded purchase?
On iOS it usually won't, and that's the trap in a different shape. Under StoreKit 2, the plugin's restorePurchases walks Transaction.currentEntitlements, and Apple says refunded or revoked products don't appear there. On Android, restorePurchases calls Google's queryPurchasesAsync, which Google documents as returning only active subscriptions and non-consumed one-time purchases. In both cases the refunded product just isn't in the list. Restore emits what exists. It never emits a removal. An app that grants access on restored and does nothing when an item is missing keeps the refunded unlock switched on.
Can a Flutter app detect a consumable refund at all?
Not on the device. The plugin's README says restorePurchases doesn't return consumed products, and that the App Store has no API for querying consumable products. Coins, credits and extra lives you've already consumed are gone from every client-side query. Apple's REFUND notification covers consumable, non-consumable and non-renewing subscription purchases, so for consumables your server is the only place a refund can surface.
Is react-native-iap any different?
Not in the way that matters. The react-native-iap guide says getAvailablePurchases returns every purchase the native store still considers active, which is the same absence-only signal. Its iOS subscription status does include a revoked state, which the guide ties to refunds from Apple support. That covers one platform and one product type. Any wrapper that sits on top of StoreKit and the Play Billing Library inherits the same limit: the phone learns about a refund only if it asks, and only in some cases.
Where a refund actually shows up
Here's every place a refund can surface for a Flutter app, and whether it works when the app is closed. The app is closed most of the time.
| Signal | Store | Reaches | Works while the app is closed | Covers consumables |
|---|---|---|---|---|
PurchaseStatus on purchaseStream | Both | Dart | No | No, there's no refunded value |
Item missing from restorePurchases | Both | Dart | No | No |
revocationDate inside the raw StoreKit 2 transaction | Apple | Native code or your server, after decoding | No | Yes, if it reaches you |
REFUND notification, App Store Server Notifications | Apple | Your server | Yes | Yes |
| Voided purchase notification, Real-time developer notifications | Google Play | Your server | Yes | Yes |
| Voided Purchases API, past 30 days | Google Play | Your server, on a schedule | Yes | Yes |
What a missed refund costs in money
A missed refund isn't free just because the store already took the money back. The buyer keeps whatever the purchase unlocked, and whatever it unlocked usually costs you something to run.
Take a hypothetical Flutter app that sells a $9.99 lifetime Pro unlock on both stores. Pro turns on AI image generation, and assume each image costs you about $0.02 in model API calls. A refunded buyer who keeps Pro and generates 20 images a day runs up roughly $12 a month in compute. That's more than the purchase price within the first month, paid by you, for someone who paid nothing.
| Cost line | Refund caught by your server | Refund missed by the app |
|---|---|---|
| Sale proceeds | Returned to the store | Returned to the store |
| AI API calls at 20 images a day | Stop at the refund | About $12 a month, open-ended |
| Storage for generated images | Stops growing | Keeps growing |
| Google Play chargeback, orders after August 3, 2026 | Purchase price minus Google's fee, plus bank fees | The same, plus the costs above |
The last row is the expensive one. For Google Play orders placed after August 3, 2026, Google says the developer covers the item's price minus Play's service fee, plus the chargeback fees the bank charges. Chargebacks are bank-final, so a lost one doesn't come back. Pay that, then keep paying for the buyer's API calls, and one dispute costs you several times the sale.
How to catch a Flutter in app purchase refund
None of this requires leaving Flutter. It requires a small backend that owns the answer to one question: does this account still own this product?
Record every purchase against an account
- When
purchaseStreamdelivers apurchasedorrestoreditem, send its verification data to your server before you unlock anything. - On iOS, set an
appAccountTokenwhen the purchase starts. Apple requires it to be a UUID, and it lets your server map an Apple transaction back to your user. - On Android, call
completePurchasepromptly. The plugin's README warns that a purchase not completed within 3 days is refunded on Android, which is Google's acknowledgement rule in plugin form.
Turn on the store notifications
- Point App Store Server Notifications V2 at your server, and treat
REFUNDas a revocation for that transaction. Apple says you're responsible for storing, monitoring and acting on each refunded transaction. - Connect Google Play's Real-time developer notifications to a Pub/Sub topic your server reads, and handle the voided purchase notification.
- Run the Voided Purchases API on a schedule as a safety net for anything the notifications missed.

Make the app ask your server
On launch and when the app returns to the foreground, fetch entitlements from your server and let that answer overrule anything cached on the phone. Keep the local value as an offline fallback only. If your server says a product was refunded, switch it off, and tell the buyer why. Apple asks developers to explain any action taken after a refund with contextual messaging in the app, and Google asks you to apply your revocation policy uniformly.
Can you fight the refund before it lands?
Rarely, and never from Dart. Apple sends a CONSUMPTION_REQUEST to your server when a customer asks for a refund, and you have 12 hours to answer with consumption data. Google Play asks for your side only in a chargeback review, answered through orders.reviewrefund within 24 hours. Both arrive server-side, so an app without a backend can't take part in either. Everything else, the 48-hour Play self-service refund, support refunds and voided purchases, is decided without you. What you can always control is whether the refunded buyer keeps the product.
Frequently asked questions
- Does Flutter's in_app_purchase plugin notify the app about refunds?
- No. Its PurchaseStatus values are pending, purchased, error, restored and canceled, and none means refunded. Refunds reach your server through Apple's REFUND notification and Google Play's voided purchase notification.
- Why does a refunded purchase still unlock features in my Flutter app?
- Usually because the app saved the unlock locally and only ever grants it. restorePurchases returns what the store still considers owned, so a refunded product just goes missing from the list, and an app that never removes access on a missing item keeps it on.
- How do I detect a refund in Flutter on iOS?
- Use your server. App Store Server Notifications V2 sends a REFUND notification for consumable, non-consumable and non-renewing purchases. On the device, StoreKit 2 marks the transaction with a revocationDate, but the in_app_purchase bridge forwards updated transactions to Dart as purchased without that field.
- How do I detect a refund in Flutter on Android?
- Subscribe your server to Google Play's Real-time developer notifications and handle the voided purchase notification, then run the Voided Purchases API on a schedule. It lists refunds, cancellations and chargebacks from the past 30 days.
- Do I need RevenueCat or another service to handle refunds in Flutter?
- No. Any backend that receives Apple's and Google's server notifications and stores purchases per account can do it. What you can't do is handle refunds reliably with the plugin and no server at all.
Sources and further reading
- pub.dev: in_app_purchase package (README, version 3.3.1)
- pub.dev: PurchaseStatus enum
- GitHub, flutter/packages: in_app_purchase_storekit StoreKit 2 plugin source (checked November 24, 2026)
- Apple Developer: Handling refund notifications
- Apple Developer: Transaction.currentEntitlements
- Android Developers: BillingClient.queryPurchasesAsync
- Google Play Developer API: Voided Purchases API
- Play Console Help: Chargeback policy changes
- react-native-iap: Subscription validation guide
RefundHalt
The refund autopilot for the App Store and Google Play
Keep reading
A refunded remove ads purchase should switch the ads back on, and most apps never notice
Most apps save a remove ads purchase as one flag on the phone, and a refund never clears it. Apple and Google take the money back while the customer keeps an ad-free app. Here's what that costs, which refund signals exist, and how to turn the ads back on.
The EU withdrawal button has been law since June 19, and your app's web checkout is the part that needs one
Since June 19, 2026, EU law requires a 'withdraw from contract here' button wherever consumers can withdraw from an online purchase. Apple and Google run it for store purchases. Your own web checkout is yours, and here's what it costs and how to build it.