Adding subscriptions to your own app is time-consuming and more than a hassle. Especially when you develop an app with flutter that is intended for several platforms by nature. Here is a brief overview of the existing problems with in-app subscriptions and how you can fix them.
When a user buys a subscription in your app, there may be a successful purchase event. But what happens if the user cancels the subscription in the App Store without using your app and gets the full amount back?
Your app and your server don't know about it at first because the App Store is only connected to your running app, and even then only when the app is active and the app code asks for it.
Example:
A user purchases the annual subscription for €9.99 with a successful purchase event. The app unlocks all purchased premium features for the user. The user then cancels the subscription in the App Store (the user gets 100% back if they cancel within 15 minutes). The premium functions are still activated inside the app and the user can still use the premium functions for a year without any costs.
Now you might think: If the user uses the app, I can simply ask the App Store whether the purchase is still active or not, right? Well, first of all it's a bit more complicated than that because, for example, Apple requires a subscription key plus the purchase receipt to communicate with the Apple API. Then you can ask whether the subscription purchase is still valid or not.
But what if the user doesn't open the app after cancelling the purchase and only uses the web version or another platform like Android? Yes, then you no longer have a chance to find out if a purchase is still valid with you only having an app-only implementation. You would need a server that either regularly checks whether a purchase is still valid or you use the server to server notifications offered by Apple, Google or Stripe (which LinkFive uses).
LinkFive automatically validates all App Store purchases made through the LinkFive platform. When the user manually cancels a purchase, the LinkFive server immediately receives a notification from Apple, Google or Stripe that the user has cancelled the purchase. The subscription is immediately inactive for all connected user sessions and the app or website receives updated information and deactivates its premium content.
Apple, Google and Stripe offer server-to-server notifications in addition to their API. The notifications enable the app servers to map the entire subscription lifecycle without interacting with the API. You receive a notification when a user buys, ends, cancels or renews a subscription. By adding each of these notifications to the user session, you can always be sure that the purchased subscription is active, valid and not a false positive.
When a user purchases a subscription in your app, the purchase is initially only available on the device to which your App Store account is linked. So how do the premium features get onto other devices?
Example:
Your user purchases a subscription from the Google Play Store on the Android device in your Flutter app. The user not only uses their Android device, but also the web version of the app. If the user now uses the web version, no premium features are available. The same applies to the iOS version.
The most common use case for cross-platform subscriptions is not iOS and Android, as not many users use an Android and an iOS device at the same time. The most common use case is to use an Android or iOS device with the web version. This means that an iPhone user is most likely active in the web version and on the iPhone at the same time.
The purchase must be linked to the user. If the user logs on to another platform, the premium content can be unlocked for the user. However, it is important to know that you do not necessarily need to have an account to buy a subscription. LinkFive therefore uses user sessions to link a purchase to an ID.
When a user purchases a subscription, the subscription is initially associated with a user session that exists only on the current device and is unique. The user session can then be linked to an internal user ID (this ID usually comes from your authentication system). If a user now logs in with the same account on another device, the user session on the other device is also linked to the internal user ID, so that both user sessions are now linked to one internal user ID. The purchased subscription is now active for all platforms and it really doesn't matter whether it is used on Android, iOS, Web, Mac or Windows.
A great offer is only a great offer if the user makes a purchase. If someone is offered two subscriptions at the same time and one of them is not eligible, they will choose the one that is eligible or none at all. If a user is offered with two subscriptions which are eligible, the user will usually choose one of the two offers rather than none of them.
One of our customers told me that a subscription with a long term, e.g. 12 months plan, sells better in Germany than the same offer in Italy. This is because the buying behaviour of customers in Germany is different than in Italy. Italians are more likely to opt for a shorter term than a longer one and in Germany, people are more likely to choose the longer term than the shorter one.
It therefore only makes sense to have a different subscription offer in Germany than in Italy. So in Germany you would for example offer a subscription of 1 month and 12 months and in Italy of 1 month and 3 months or 6 months.
The subscription offer must be dynamically adjustable for each country or for each user. This is not possible if the subscriptions are written into the code. You can solve this problem by asking your server which subscriptions should be displayed and your server will respond with the correct subscription offer.
If you use the LinkFive plugin, each user receives their own subscription offer. You can configure this inside the Subscription-Playout section on the LinkFive Web-App. You can define which subscriptions are displayed in Germany, Italy or anywhere in the world. This way you can make a different offer for customers in Italy and in Germany. You can even activate an offer for a specific period only, launching a Summer Sale, Winter Sale or even a Weekend Sale and offering subscriptions at a reduced price.