Payment
Hive Axyl provides in-app purchase features through payment providers. It supports single-item purchases, multi-item purchases, and subscription payments, and also provides a purchase restoration feature that finds and delivers products that were not delivered even though the payment was completed, for example because of a network error.

Roles of Hive Axyl and the app
-
Features Hive Axyl provides
The features that Hive Axyl provides while you implement in-app purchases are as follows.
- Single-item purchases, multi-item purchases, subscription payments, and features supported by each payment provider
- Saving pre-purchase information and recording payment results
- Receipt verification and purchase restoration
- Purchase history retrieval
-
Tasks the app must handle directly
The tasks that the app must generally handle directly, independent of Hive Axyl, are as follows.
- Implementing the in-app store UI
- Requesting receipt verification with the Hive Axyl Server API on the app server
- Reflecting payment results and payment status in the app UI
- Delivering products to users, reclaiming products from users on refund or cancellation, and handling customer inquiries
- Customer support based on purchase history and cancellation and refund history
Relationship between the payment module and payment plugins
The Hive Axyl payment SDK consists of the main payment module com.com2usplatform.hiveaxyl.payments and store payment plugin Add-ons.
| Category | Package | Role |
|---|---|---|
| Main payment module | com.com2usplatform.hiveaxyl.payments | Communicates with the Hive Axyl server to handle the core logic of the payment flow: saving pre-purchase information, recording payment results, confirming payments, and recording product delivery results. Used in common on all platforms. |
| Apple payment plugin | com.com2usplatform.hiveaxyl.payments.addon.apple | Performs StoreKit 2 native tasks (retrieving store products, displaying the payment window, completing transactions, and so on) on iOS/macOS. |
| Google payment plugin | com.com2usplatform.hiveaxyl.payments.addon.google | Performs Google Play Billing Library 9 native tasks (connecting BillingClient, displaying the payment UI, consume/acknowledge, and so on) on Android. |
| Steam payment plugin | com.com2usplatform.hiveaxyl.payments.addon.steam | Receives Steamworks MicroTxn callbacks on Windows/macOS. |
Use the payment plugins according to the following principles.
- Payment plugins do not replace the main payment module. The main payment module always handles the core logic of the payment flow.
- Payment plugins reduce the native code that app developers must write themselves for each store. They handle the tasks that would otherwise require calling store native SDKs such as StoreKit, BillingClient, and Steamworks directly.
- Do not use plugin code for features that the main payment module already provides. Use plugins only for native store tasks that the main payment module cannot perform.
Payment providers
Hive Axyl supports two main types of payment providers.
-
Store
- Google Play
- Apple App Store
- Steam
-
PG (Payment Gateway)
- Various external payment methods that Hive Axyl supports, such as PortOne, Xsolla, and MyCard
Features
Hive Axyl provides the following payment-related features.
Payment
The payment types that Hive Axyl provides are as follows.
-
Single-item purchase
A feature that lets the user purchase one product with a single payment request.
-
Multi-item purchase
A feature that lets the user purchase multiple units of the same product at once with a single payment request. For example, if the in-app store sells a product in bundles of 100 and the user needs 500, set the purchase quantity to 5. However, Apple App Store and Steam do not support this feature because of their platform policies.
-
Subscription payment
A feature that grants the right to use a product or service for a set period with a single payment request. It provides auto-renewing subscriptions.
- Auto-renewing subscriptions
- Automatic subscription renewal at a set interval
- Google Play supported periods: weekly, 1 month, 3 months, 6 months, yearly
- App Store supported periods: weekly, 1 month, 2 months, 3 months, 6 months, yearly
- Not supported by PG and Steam
- Auto-renewing subscriptions
-
Features by payment provider
The supported payment types differ by payment provider. Check the payment types that each payment provider supports in the following table before you implement payments.
Feature Google Play App Store PG Steam Single-item purchase O O O O Multi-item purchase O X O X Subscription payment O O X X Auto-renewal period Weekly, 1/3/6 months, yearly Weekly, 1/2/3/6 months, yearly X X
Purchase restoration
Sometimes a user completes a payment but does not receive the product, for example because of a network error. For these situations, Hive Axyl provides a purchase restoration feature that checks the receipt again and delivers the undelivered product. If you run purchase restoration when the app launches or when retrying after a payment failure, it finds undelivered transactions and tries product delivery again.
Receipt verification
When a user purchases a product, the app client receives a "payment receipt" from the store or PG payment provider. Hive Axyl provides a feature that verifies the receipt by checking whether it has been forged or tampered with, or whether it is a duplicate.
The app server requests receipt verification by calling the Hive Axyl Server API. When the app client passes the received receipt to the app server, the app server receives the verification result directly from the Hive Axyl server without going through the app client, checks it, and then delivers the product.