IAP Subscriptions
It is used for automatically renewing subscription products. It is billed automatically at set intervals and can be used until canceled. Service introduction and console setup instructions are In-app Purchase introduction documentplease refer to.
getProductItemListwhere it explains how subscription products are retrieved and how to create subscription orders createSubscriptionPurchaseOrderIt also covers how to receive webhooks on the server when subscription status changes, such as renewals and cancellations.
Follow the sequence below for the integration flow.
Fetch subscription product list —
getProductItemListCreate subscription order —
createSubscriptionPurchaseOrderCheck subscription status —
getSubscriptionInfoReceive subscription status changes via webhook — server callback
Restore purchases —
getPendingOrders,completeProductGrant
In-app purchase object
SDK object: IAP
The existing IAP object has the following features added/expanded.
Signature
IAP {
getProductItemList: typeof getProductItemList;
createOneTimePurchaseOrder: typeof createOneTimePurchaseOrder;
createSubscriptionPurchaseOrder: typeof createSubscriptionPurchaseOrder;
getSubscriptionInfo: typeof getSubscriptionInfo;
getPendingOrders: typeof getPendingOrders;
getCompletedOrRefundedOrders: typeof getCompletedOrRefundedOrders;
completeProductGrant: typeof completeProductGrant;
}createSubscriptionPurchaseOrderis a subscription-only order creation function. It is similar to the existing one-time order flow, but it handles subscription-only parameters (such as offerId and exposure of renewalCycle). The returned cleanup function is used to release App Bridge resources, as before.
View product list
SDK function: getProductItemList
getProductItemList()can now return product lists that include subscription products (type: 'SUBSCRIPTION'). Subscription products have additional fields.
Signature
Return value
Promise<{ products: IapProductListItem\[] } | undefined>It returns an object containing the product list. If the app version is lower than the minimum supported version (Android
5.248.0, iOS5.250.0) is lower than the minimum supported version,undefinedis returned.
Properties
type
string
Product type
sku
string
Unique ID of the product
displayAmount
string
Price information including currency unit
displayName
string
Product name displayed on screen
iconUrl
string
URL of the product icon image
description
string
Product description
Product type classification
getProductItemListcan return the following three product types.
The meaning of each type is as follows.
1. Consumable product (CONSUMABLE)
A product that disappears after one use. Example: coins, currency, hearts, etc.
You can repurchase it multiple times after purchase.
After successful payment, the server must grant the product and call completeProductGrant.
There is no auto-renewal concept.
2. Non-consumable product (NON_CONSUMABLE)
A product you own permanently after one purchase. Example: remove ads, permanent upgrade
It is not repurchased for the same account.
A restore flow may be needed when changing devices.
It does not auto-renew.
3. Subscription product (SUBSCRIPTION)
A product that automatically renews on a regular cycle. Example: monthly/annual membership
renewalCycle
string
Subscription renewal cycle
offers
Offer[]
List of subscription benefits the user can receive.
It renews automatically.
It can have offers such as free trials, new user discounts, and returning user discounts.
Orders must be created with createSubscriptionPurchaseOrder.
Server-side synchronization of subscription status (renewal/cancellation/refund processing) is required.
Order creation function summary by type
CONSUMABLE
createOneTimePurchaseOrder
NON_CONSUMABLE
createOneTimePurchaseOrder
SUBSCRIPTION
createSubscriptionPurchaseOrder
Create subscription order
SDK function: createSubscriptionPurchaseOrder
A function that creates subscription-only orders and takes the user to the subscription payment page. It can be used when the user presses a subscription product purchase button.
Signature
Properties
Example usage
Check subscription status
SDK function: getSubscriptionInfo
A function that gets the current status information of a subscription order.
Signature
Parameters
params object
An object containing the subscription order information to look up.
params.orderId
stringThe unique ID of the order.
Return value
Promise<{ subscription: IapSubscriptionInfoResult } | undefined>Returns an object containing subscription status information. If the app version is lower than the minimum supported version (Android
5.253.0, iOS5.250.0) is lower than the minimum supported version,undefinedis returned.
Properties
catalogId
number
The identifier of the subscription product.
status
'ACTIVE' | 'EXPIRED' | 'IN_GRACE_PERIOD' | 'ON_HOLD' | 'PAUSED' | 'REVOKED'
A value indicating the subscription status.
expiresAt
string | null
The scheduled expiration time of the subscription. If there is no expiration information, null.
isAutoRenew
boolean
Whether the subscription auto-renews.
gracePeriodExpiresAt
string | null
The expiration time of the payment grace period. If there is no grace period, null.
isAccessible
boolean
Whether the current subscription product can be used.
Example usage
Receive subscription status changes via webhook
When the subscription status changes, such as renewal, cancellation, or suspension, a webhook event is sent to the server. You can receive the event by registering a callback URL in the console.
Time values (
occurredAt,expiresAtetc.) are ISO-8601 strings without a timezone. Example:"2026-05-06T00:00:00"orderIdis not a direct user identifier, but if you are mapping orders to users, it can be used as a correlation identifier.
Event type
eventType
Description
callback.registration_verification
Sent when registering or changing a callback URL
subscription.status_changed
Sent when subscription status changes
callback.registration_verification
It is sent when a callback URL is registered or changed. The callback URL is activated only after this event is received successfully.
subscription.status_changed
Sent after the subscription status has been finalized.
CREATEDlike when there is no previous state subscription.previousmay be omitted.
Field
eventType
string
Fixed values: subscription.status_changed
eventVersion
string
Fixed values: 1.0
occurredAt
string
The time when the notification occurred
orderId
string
Order identifier
sku
string
Product SKU
changeReason
string
Reason for the subscription status change
subscription.previous
object?
The subscription status before the change. May be omitted in creation events
subscription.current
object
The subscription status after the change
Snapshot fields
subscription.previousand subscription.currenthas the same structure.
status
string
Subscription status
accessGranted
boolean
Whether access is currently granted
expiresAt
string | null
Subscription expiration time. It may be absent
autoRenew
boolean
Whether auto-renewal is enabled
changeReason Value
CREATED
Subscription created
RENEWED
Subscription renewed
RECOVERED
Recovered from payment failure
RESTARTED
Subscription restarted
ENTERED_GRACE_PERIOD
Entered grace period
ON_HOLD
Payment on hold
PAUSED
Subscription paused
AUTO_RENEW_ENABLED
Auto-renewal enabled
AUTO_RENEW_DISABLED
Auto-renewal disabled
EXTENDED
Subscription period extended
EXPIRED
Subscription expired
REVOKED
Subscription revoked or refunded
status Value
ACTIVE
Active
EXPIRED
Expired
IN_GRACE_PERIOD
Grace period
ON_HOLD
On hold
PAUSED
Paused
REVOKED
Revoked
Restore purchases
Even if payment is completed, product granting may fail due to network or server errors. If a granting error occurs, please be sure to add purchase recovery logic so users can receive the product properly.
Recovery flow
getPendingOrders— Check the list of subscription orders that have been paid for but not yet grantedGrant product — actually grant the subscription product on the server
completeProductGrant— Mark grant as complete
Example usage
Last updated
Was this helpful?