Altova MobileTogether Designer

In-App Purchases

Home Prev Top Next

In-app purchases are content or subscriptions that you buy from inside an app on a mobile device. For example, you can buy coins from inside a game app or a subscription from inside a music app. The coins and the subscription are in-app purchases—because they have been purchased from inside an app.

 

MobileTogether Designer enables you to add in-app purchases as a feature of your AppStore Apps.

 

In this section, we describe the mechanisms to add the in-app purchase functionality to the MobileTogether design of your AppStore App. After adding in-app purchases to your design, you would generate your AppStore App (from the design) for one or more of the supported platforms (Android, iOS, Windows). Note that the in-app purchase functionality only works in AppStore Apps; it will not work in MobileTogether solutions that run in MobileTogether Client—because of app-store restrictions.

 

You must of course make sure that the in-app purchases—the products that you want end users to buy—have been registered with the respective app store/s and are available for sale there. The end user of your AppStore App can then buy from the app store. In your MobileTogether design, you will design the interactions between your AppStore App and the app store so as to correctly transact an in-app purchase.

MTDInAppArchitecture

Below, we first provide an overview of the categories of in-app purchases and then outline the broad steps for setting up in-app purchases in a MobileTogether design. In the sub-sections of this section, we describe these steps in detail. The section is rounded off with a description of an example project, which is delivered with your installation of MobileTogether Designer and located in the Tutorials folder of MobileTogether Designer.

 

App store documentation

For information about the procedures at the different app stores, see the relevant documentation at the respective app store. It is important that you understand the workflow requirements for each app store and make sure that you implement them correctly when creating the design of your AppStore App.

 

The links below provide entry points to the app store documentation.

 

Android/Google: https://developer.android.com/google/play/billing

iOS/Apple: https://developer.apple.com/documentation/storekit/in-app_purchase

Windows/Microsoft: https://docs.microsoft.com/en-us/windows/uwp/monetize/

Windows/Microsoft: https://docs.microsoft.com/en-us/windows/uwp/publish/set-app-pricing-and-availability

Windows/Microsoft: https://docs.microsoft.com/en-us/windows/uwp/publish/add-on-submissions

 

Categories of in-app purchases

There are three categories of in-app purchases:

 

Consumables: These are purchases that are consumed within the app, such as game currency. They are bought once, depleted, and can be purchased again.

Non-consumables: These are content or services that are purchased once and do not expire, for example, filters in a photo app.

Subscriptions: These are access to periodically updated content or services, such as a monthly magazine. Subscription charges recur until canceled.

 

Setting up in-app purchases for an MT project

The broad steps for enabling in-app purchases in your AppStore App are as follows:

 

1.Via your app store account, create the in-app products (or SKUs, stock-keeping units) that you want to make available as in-app purchases. During this process, you will give each product, among other properties, an ID, a name and description, and set the product's price. Product IDs in the different app stores each have a specific and different format. So note down these product IDs; you will need them in the MT design when you map the store IDs to the product's name in the design. In the design, you will work with this single product name.

2.In the MT design, for each product that you want to make available as an in-app purchase, map that product's IDs in the different app stores to one product name. This product name will be used in the design as the product's identifier. By using a common name for a product's different IDs in the respective app stores, we obviate referencing, in the design, a single product via multiple identifiers.

3.Information about products is stored at the app store. This information can be retrieved by MobileTogether's Query Available Products action, and will then also be stored in the design's In-App-Purchase Page Source.

4.Information about the current user's purchases is also stored at the app store. It can be retrieved by MobileTogether actions and is also stored in the design's In-App-Purchase Page Source.

5.The product and purchase information stored in the In-App-Purchase Page Source can be displayed in the design by using suitable controls.

6.To make an in-app purchase, the end user triggers the Purchase action, which identifies the product to be purchased and the current user.

7.The app store executes the purchase transaction and sends transaction data to the app on the mobile device.

8.In the app, the purchased product (for example, a subscription) is activated (by you, the designer, through some other mechanism related to the product).

9.The app acknowledges the purchase, and this completes the transaction.

 

© 2018-2024 Altova GmbH