iOS in-app purchases and testing

At Solid GEAR we develop mobile applications for our customers. These applications are from sectors as financial, productivity, education or media, all of them with the same common topic: minimal incidents. In this blog post I will dive into the monetization of apps. The fact that someone purchases the product you have developed implies confidence in getting something worthwhile. Therefore, and for that trust to endure, we must ensure that the mechanism that supports purchases works correctly. And we have the choice to test it.

All those actions (purchases) that are carried out inside a mobile app are called “in-app”. We will review some interesting aspects about in-app purchases on the Apple platform, as well as the way to test it.

Different kinds of in-app purchases on iOS

First, we will review what types of purchases are available on iOS:

  • Consumable: This is a product that is purchased once, and when consumed it disappears. We can only enjoy it again with a new purchase, a new consumption and so on. It is a type of purchase quite associated with video games and similar products in which you can purchase lives, coins…
  • Non-consumable: This is a product that is purchased once for all. For example, some extra feature in your app that you will already have available without limit or expiration from now on.
  • Auto-Renewable subscription: As the name implies, you get access to a feature for a specific period of time that can range from one week to one year. When period is completed the renewal is automatic. If we do not want to renew the subscription, we must indicate it explicitly before expiration.
  • Non-Renewing subscription: The opposite of the previous type. In this case, the subscription is valid for a period and when it expires, the feature becomes unavailable with no choice of renewal. Only a new purchase will give access to the content again.

In the case of periodical subscriptions, the periods available are: weekly, monthly, bi-monthly, quarterly, semi-annual and annual.

Before publishing our in-app content, we must ensure that our application is working correctly, so a test stage is a must to avoid future problems. Luckily, to test in-app purchases it is not necessary to have a payment method, or perform real purchases with cost. Simply having an Apple ID and the application registered and accessible in the Apple account is enough.

How to test

The first thing is login using the Apple ID at AppStoreConnect

Here we will select the option:

users and access

In the side menu we will see all the options of user groups that we have set up, and then “Sandbox”. This is our option.

users options menu

We select the option “Testers” where we can create users to do tests. A Sandbox user is a user who runs in an isolated environment with testing purposes. Therefore, all the actions we perform (purchases) will not be real, but the responses of the app will be the same as if they were real.

To create a Sandbox user we will have to fill in several fields in a form:

form sandbox suer

It is not allowed to use the same email address in two different Sandbox accounts. Selecting different countries or zones will help us check if we correctly display the currency to be used.

Once the Sandbox account is created, in the Settings of our device we select “iTunes & App Store” and at the bottom we can enter the Sandbox user that we have previously created:

sandbox iphone

If this section does not appear, you must go to the app and try to make a purchase. When the Apple ID is requested, the Sandbox user created is typed in. From now on, the user should appear in the Device Settings.

At this point, everything is ready to test in-app features without any monetary costs!

Subscription Parameters

When testing the correct functioning of periodical subscriptions, we must take into account something very important. The duration of subscriptions for a Sandbox user is not the real duration, so it is rather shorter instead. This will help us test subscriptions without having to wait a minimum of one week to the first expiration.

In the following table we can check the correlation between the duration of a real subscription and a Sandbox one:

Real subscription renewal timeSandbox subscription renewal time
1 week3 minutes
1 month5 minutes
2 months10 minutes
3 months15 minutes
6 months30 minutes
1 year1 hour

Then, we can test if our app reacts correctly to expirations in a maximum of one hour.

Endpoints

  • We will have to think deeply which cost is appropriate depending on the type of features offered, the duration in case of subscription, and of course, our economic ambitions (if we need return on investment or any other economic parameter).
  • We must never ignore the testing part. Users always deserve quality, but in the case of having paid, even more so.

Happy testing !!

Apple in-app reference

Leave a Comment

¿Necesitas una estimación?

Calcula ahora