While there is already a lot of information about iOS In-App purchases on the Internet, there are some more hints worth sharing about them. This blog post just intends to throw light on some less known aspects of the In-App purchases world, based on our experience developing numerous iOS applications at Mobile Jazz. However it is recommended to read Apple’s documentation for a full understanding of the topic.

 

tablet

 

Let’s go through the available In-App product types (note: the receipt for an application was introduced in iOS 7, you can read more about it here):

 

1. Consumables

How they work

The user can buy the same consumable product as many times as he wants. The app is responsible for providing for that consumable across devices (e.g. virtual currency).

Are they present in the receipt for the application?

They are only present right after the purchase has been successful. Then the app has to deal with the purchase and store that information conveniently. If you restore purchases, consumables won’t appear in the app’s receipt.

What kind of apps can offer them?

Any kind of app can offer consumables.

 

2. Non-consumables

How they work

The user can buy the same non-consumable product just once (e.g. a game level).

Are they present in the receipt for the application?

They are always present in the app’s receipt, so a user can restore purchases from any device and get his already purchased non-consumable products.

What kind of apps can offer them?

Any kind of app can offer non-consumables.

 

3. Subscriptions

How they work

The user buys the subscription. The app (or the app’s server) is the one responsible for knowing the period that the subscription is active for. The user can buy the same subscription again and again, even if he already has an active subscription. In that particular case the time of the new subscription will be added to the remaining time of the active subscription, but all this logic is the app’s responsibility.

Are they present in the receipt for the application?

Yes, they are always present in the app’s receipt, but in the receipt there is no expiration date for that type of subscriptions. The app has to provide the logic to know when the subscription will not be active anymore and warn the user that he has to renew it.

What kind of apps can offer them?

Any kind of app can offer subscriptions.

 

4. Auto-renewable subscriptions

How they work

The user buys a subscription (e.g. 1 month subscription) and it will get charged at the end of each period (after each month) to renew his subscription. This will go on until he cancels it or after Apple can not charge the user’s credit card anymore*. The user can cancel his subscriptions from his iTunes account. When a subscription is cancelled, it will still be valid until the end of the paid period. From the iTunes account he can also upgrade or downgrade to a subscription period (he could change the subscription from 1 month to 12 months) and that would take effect at the end of the current period. All the auto-renew process, takes place in Apple’s server, so the app doesn’t know anything about it. The new subscription payment will be added to the app’s receipt (iOS 7) but the app won’t see it until the receipt is refreshed. Therefore, the app (or the app’s server) has to check if the subscription is still active at the end of each period (the receipt has the expiration date for that subscription)**. Once the user has bought a subscription, it is not possible to modify or cancel it programmatically. One thing you can do, is take the user to the subscription manager view in the iTunes Store:

These are the screens where the user can manage his subscriptions:

 

manage_subs

 

 

Are they present in the receipt for the application?

Each renewed subscription is a new transaction and it is present in the receipt. In other words, in the case of a 1 month subscription, after 3 months there will be 3 transactions in the app’s receipt.

What kind of apps can offer them?

According to Apple’s app store review guidelines (this will keep changing over time): 11.15 Apps may only use auto renewing subscriptions for periodicals (newspapers, magazines), business Apps (enterprise, productivity, professional creative, cloud storage) and media Apps (video, audio, voice), or the App will be rejected. In the past, only magazines and newspapers alike apps were allowed to use auto-renewable subscriptions, but now more and more types of apps are allowed. There are also apps that offer auto-renewable subscriptions without fitting in any of the Apple’s mentioned categories (e.g. many dating apps are using them).


* Actually there is a special case in which Apple’s customer support could refund the user with the subscription amount, if the user claims he bought it by mistake. In that case there is another field (cancellation date) in the receipt to check whether the subscription is still active or not.

** BONUS TIP: For debugging purposes, if you need to check a receipt against Apple’s sandbox server, you can use this curl command:

The params file has to contain a json with one or two parameters: {“password”:””,”receipt-data”:””}

  • receipt-data: The app’s receipt base64 encoded.
  • password: The shared secret. You get it in the iTunes connect portal when you define your auto-renewable subscriptions.

You can add | python -mjson.tool if you want to format the output. In case you need it, Apple’s production server is: https://buy.itunes.apple.com/verifyReceipt .

Avatar

Mobile Jazz

One Step Ahead. We want to be at the top of what’s happening in technology, digital marketing and design. We continuously educate ourselves, and experiment with the latest trends to stay ahead of everyone else. That’s why we’re able to give you a competitive advantage in the market. On top of that, our way of working is quite unique in the industry. We're one step ahead.