目录

Getting Started

Quick Tutorial

Before developing your app, you can follow instructions in the codelab to experience how to quickly integrate IAP into an app.

Development Environment

Development Process

Follow the steps in the following process when you develop an app.

No.

Step

Description

1

Configuring App Information in AppGallery Connect

Configure app information in AppGallery Connect, including registering as a developer, enabling the Merchant Service, creating an app, generating a signing certificate fingerprint, configuring the signing certificate fingerprint, enabling IAP, and setting IAP parameters.

2

Integrating the HMS Core SDK

Integrate the IAP SDK into your app.

3

Configuring Obfuscation Scripts

Before building the APK, configure the obfuscation configuration file to prevent the HMS Core SDK from being obfuscated.

4

Configuring Your Products

Create and configure your products in AppGallery Connect and pass the product ID and type when your app calls the API for in-app purchases.

5

App Development

IAP supports the following types of products: consumables, non-consumables, and subscriptions.

Purchase Implementation tells how to implement the processes of purchasing the three types of products. If your app provides consumables, you have to do another task, that is, implementing the redelivery process for consumables. If you want to learn more about subscriptions, see Subscription Functions.

Develop functions based on your service needs.

6

(Optional) Server-Side Development

The task of performing server-side development is necessary when you need to call APIs of the IAP server (for example, the order service needs to call the purchase token verification API provided by the IAP server) or some complex service logic needs to be implemented but your app cannot achieve it by itself.

7

Pre-release Check

Use the tool offered by Huawei to automatically check your app before release.

8

App Release

Complete your app information in AppGallery Connect, and submit your app for release.

HMS Toolkit provides end-to-end tools (including those for app creation, free real-device debugging, and releasing) that you need to develop your own HMS Core-integrated app and release it, with lower costs and higher efficiency.

If you want to integrate IAP using HMS Toolkit, follow the instructions here.