Follow the steps below to develop your app.
| No. | Step | Description |
|---|---|---|
| 1 | Enabling Merchant Service | Before starting your development, make necessary preparations. When configuring the signing information, use the manual signing method. To enable IAP Kit, you need to enable Merchant Service first. Under Merchant Service, you need to specify the bank account and currency for receiving your share of revenue from Huawei. |
| 2 | Creating a Project and App | Before app development, you need to create a project and app on AppGallery Connect. |
| 3 | Enabling and Activating IAP Kit | You need to enable and activate IAP Kit before using it. |
| 4 | (Optional) Setting Necessary Parameters | - Configure the address for receiving order/subscription-related notifications. - Configure the key. |
| 5 | Configuring Products | You need to configure products on AppGallery Connect. When an app calls the purchase API, the product ID and type configured here must be passed. |
| 6 | Configuring Signing Information | Configure signing information in DevEco Studio to ensure successful project compilation and development. |
| 7 | Configuring App Identity Information | Configure the bundle name and client ID in the project. |
| 8 | Implementing the Purchase Process | - Implementing the purchase process for consumables and non-consumables: Implement the purchase process for consumables and non-consumables, including the product list display, purchase, and benefit distribution. For details, see Implementing the Purchase Process. - Implementing auto-renewable subscriptions: Learn about the concepts and functions related to subscriptions by referring to Understanding Auto-renewable Subscriptions. For details, see Implementing the Purchase Process. - Implementing the purchase process for non-renewable subscriptions: Implement the purchase function for nonrenewable subscriptions, including the product list display, purchase, and benefit distribution. For details, see Implementing the Purchase Process. Note: During development, you can use the Sandbox Testing auxiliary feature. Sandbox testing allows you to complete payment testing without actual payments during the integration and debugging process of IAP Kit. |
Refer to the sample code to check how to implement the purchase process for consumables, non-consumables, and auto-renewable subscriptions in your app.