How to simulate a StoreKit Transaction refund in XCode
A two step guide on simulating StoreKit Transaction refunds in XCode.
The guide was made using our Free iOS StoreKit 2 Open Source project which is recommended for developers or business folk wishing to learn about how In-App Purchases or Subscriptions work and the code behind them.
In order to be able to simulate transaction refunds, you need to have a project that has StoreKit setup with a coordinator that can make purchases, have StoreKit testing enabled and have made at least one successful purchase in the XCode environment.
To learn how to do this consult the guides below.
Step One: Open the StoreKit Transaction Manager
Open the StoreKit Transaction Manager.
For a guide on how to do so, use the link below.
Step Two: Simulate a Transaction Refund
Select a purchased transaction and click the curved arrow icon to simulate a refund.
The transaction will update to refunded and will trigger an update in your app's StoreKit transaction listener.
Looking to learn more about developing apps with StoreKit 2?
Read our comprehensive development guide linked below to learn about all the secrets behind developing In-App Purchases and Subscriptions with StoreKit 2.