title: What is the standard approach to checking an Android Play Store in app purchase has been cancelled?
body: <p>My app uses an in-app purchase to enable a 'pro' version, through the Android BillingClient library. This makes it painless to get pricing details, accept payment and mark the upgrade as purchased.</p>
  
  <p>However, if I go into the console as the app owner and refund a purchase, I can't figure out how I am supposed to disable the pro features in my app. There doesn't seem to be anything in the <code>getPurchasesList()</code> result that indicates the status of the purchase, but also as far as I can tell this is cached on the local device so it isn't updated automatically.</p>
  
  <p>Currently my check looks like this:</p>
  
  <pre><code>Purchase.PurchasesResult purchases = billingClient.queryPurchases(BillingClient.SkuType.INAPP);
          if (purchases != null)
          {
              List&lt;Purchase&gt; bought = purchases.getPurchasesList();
              if ( bought != null &amp;&amp; 0 &lt; bought.size() )
              {
                  for (int i=0;i&lt;bought.size(); i++)
                  {
                      if ( bought.get(i).getSku().equals(PRO_VERSION) )
                      {
                          purchased = true;
                      }
                  }
              }
          }
  </code></pre>
  
  <p>Is there something I can do here to check whether the purchase has been refunded or a way to make a secondary background check later? I don't want to routinely remove the purchase notification from the cache because the app is likely to be used in areas of limited or patchy signal and I don't want anyone who has legitimately purchased it to suddenly lose their 'pro' version at a time they need it. At the same time if someone has purchased it and then been refunded, I would like to be able to reflect that in the app.</p>
  
  <p>I am not currently running any back-end infrastructure of my own and I would prefer to keep it that way.</p>