How to test Billing Grace Period and Billing Retry for a Subscription

Oscar de la Hera Gomez
Three flowers that represent StoreKit, Swift and XCode side by side. Beneath them sits the text “Billing Grace Period and Grace Period.”

A step by step guide on testing a billing grace period and billing retry for an Auto-Renewable Subscription 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.

The following walkthrough assumes that you have already setup StoreKit with an offering, have developed a UI that allows an app to display and buy products.

Please consult the guides below to learn how to setup StoreKit, create a StoreKit offering, design a UI that considers all StoreKit scenarios or make StoreKit product purchases.

Step One: Enable Billing Grace Period

A screenshot of Xcode highlighting the location of the Editor tab in the Xcode menu and Enable Billing Grace Period. If Billing Grace Period is already enabled, this will say Disable Billing Grace Period.

In XCode, enable billing grace period.

Step Two: Enable Billing Retry

A screenshot of Xcode highlighting the location of the Editor tab in the Xcode menu and Enable Billing Retry on Renewal. If Billing Retry on Renewal is already enabled, this will say Disable Billing Retry on Renewal.

In XCode, enable billing retry.

Step Three: Change the Subscription Renewal Rate

A screenshot of Xcode highlighting the location of the Editor tab in the Xcode menu, the Subscription Renewal Rate menu option and the menu that appears where you can select a Subscription Renewal Rate.

In XCode, change the simulated Subscription renewal rate.

Step Four: Run the app

A screenshot of Xcode with a highlight on the play button on the top left. Press this button to run the app.

Run the app.

You might need to clean the build folder by pressing command + shift + k to register the changes.

Step Five: Buy an Auto-Renewable Subscription

A screenshot of an iOS app showing a completed purchase.

In order for the simulated conditions to apply, you must make a new purchase.

Step Six: Verify

A screenshot of the StoreKit Transaction Manager showing a transaction in a billing grace period.

Verify that the app enters the billing grace period and billing retry using the StoreKit Transaction Manager.

The transaction should transform from purchased to billing grace period to billing retry, and finally to expired.

To test resolved payments, click the card icon to resolve issues in the StoreKit Transaction Manager.

A screenshot of the StoreKit Transaction Manager showing a transaction in billing retry.

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.

Any Questions?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.
delasign logo

Book a Free Consultation.

An icon of an email.

Click here to email us.

Fill in the details below to book a free consultation or to let us know about something else. Whatever it is, we are here to help.

How can we help you ?

Contact Details