expo-iap 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/expo/modules/iap/ExpoIapHelper.kt +16 -0
- package/android/src/main/java/expo/modules/iap/ExpoIapModule.kt +9 -1
- package/build/index.d.ts +34 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +37 -0
- package/build/index.js.map +1 -1
- package/build/types.d.ts +16 -1
- package/build/types.d.ts.map +1 -1
- package/build/types.js.map +1 -1
- package/ios/ExpoIapHelper.swift +14 -2
- package/ios/ExpoIapModule.swift +2 -1
- package/openiap-versions.json +2 -2
- package/package.json +1 -1
- package/src/index.ts +44 -0
- package/src/types.ts +16 -1
|
@@ -227,6 +227,7 @@ object ExpoIapHelper {
|
|
|
227
227
|
eventPurchaseError: String,
|
|
228
228
|
eventUserChoiceBilling: String,
|
|
229
229
|
eventDeveloperProvidedBilling: String,
|
|
230
|
+
eventSubscriptionBillingIssue: String,
|
|
230
231
|
) {
|
|
231
232
|
openIap.addPurchaseUpdateListener { p ->
|
|
232
233
|
runCatching {
|
|
@@ -322,6 +323,21 @@ object ExpoIapHelper {
|
|
|
322
323
|
"DEVELOPER_PROVIDED_BILLING",
|
|
323
324
|
)
|
|
324
325
|
}
|
|
326
|
+
// Subscription billing-issue listener (Play Billing 8.1+ isSuspended; no-op on Horizon)
|
|
327
|
+
openIap.addSubscriptionBillingIssueListener { purchase ->
|
|
328
|
+
safeEmitEvent(
|
|
329
|
+
module,
|
|
330
|
+
scope,
|
|
331
|
+
connectionReady,
|
|
332
|
+
pendingEvents,
|
|
333
|
+
eventSubscriptionBillingIssue,
|
|
334
|
+
purchase.toJson(),
|
|
335
|
+
eventPurchaseError,
|
|
336
|
+
"subscription-billing-issue-error",
|
|
337
|
+
"Failed to process subscription billing issue",
|
|
338
|
+
"SUBSCRIPTION_BILLING_ISSUE",
|
|
339
|
+
)
|
|
340
|
+
}
|
|
325
341
|
}
|
|
326
342
|
|
|
327
343
|
fun cleanupListeners(openIap: OpenIapModule) {
|
|
@@ -48,6 +48,7 @@ class ExpoIapModule : Module() {
|
|
|
48
48
|
private const val EVENT_PURCHASE_ERROR = "purchase-error"
|
|
49
49
|
private const val EVENT_USER_CHOICE_BILLING = "user-choice-billing-android"
|
|
50
50
|
private const val EVENT_DEVELOPER_PROVIDED_BILLING = "developer-provided-billing-android"
|
|
51
|
+
private const val EVENT_SUBSCRIPTION_BILLING_ISSUE = "subscription-billing-issue"
|
|
51
52
|
private const val MAX_BUFFERED_EVENTS = 200
|
|
52
53
|
}
|
|
53
54
|
|
|
@@ -75,7 +76,13 @@ class ExpoIapModule : Module() {
|
|
|
75
76
|
OpenIapError.getAllErrorCodes()
|
|
76
77
|
}
|
|
77
78
|
|
|
78
|
-
Events(
|
|
79
|
+
Events(
|
|
80
|
+
EVENT_PURCHASE_UPDATED,
|
|
81
|
+
EVENT_PURCHASE_ERROR,
|
|
82
|
+
EVENT_USER_CHOICE_BILLING,
|
|
83
|
+
EVENT_DEVELOPER_PROVIDED_BILLING,
|
|
84
|
+
EVENT_SUBSCRIPTION_BILLING_ISSUE,
|
|
85
|
+
)
|
|
79
86
|
|
|
80
87
|
AsyncFunction("initConnection") { config: Map<String, Any?>?, promise: Promise ->
|
|
81
88
|
ExpoIapLog.payload("initConnection", config)
|
|
@@ -114,6 +121,7 @@ class ExpoIapModule : Module() {
|
|
|
114
121
|
EVENT_PURCHASE_ERROR,
|
|
115
122
|
EVENT_USER_CHOICE_BILLING,
|
|
116
123
|
EVENT_DEVELOPER_PROVIDED_BILLING,
|
|
124
|
+
EVENT_SUBSCRIPTION_BILLING_ISSUE,
|
|
117
125
|
)
|
|
118
126
|
}
|
|
119
127
|
|
package/build/index.d.ts
CHANGED
|
@@ -13,7 +13,13 @@ export declare enum OpenIapEvent {
|
|
|
13
13
|
* Fired when user selects developer billing in External Payments flow (Android 8.3.0+)
|
|
14
14
|
* Only available in Japan. Contains externalTransactionToken for reporting.
|
|
15
15
|
*/
|
|
16
|
-
DeveloperProvidedBillingAndroid = "developer-provided-billing-android"
|
|
16
|
+
DeveloperProvidedBillingAndroid = "developer-provided-billing-android",
|
|
17
|
+
/**
|
|
18
|
+
* Fired when an active subscription enters a billing-issue state (cross-platform).
|
|
19
|
+
* Unifies StoreKit 2 `Message.Reason.billingIssue` (iOS 18+) and Play Billing 8.1+
|
|
20
|
+
* `Purchase.isSuspended`. NOT fired on the Meta Horizon flavor.
|
|
21
|
+
*/
|
|
22
|
+
SubscriptionBillingIssue = "subscription-billing-issue"
|
|
17
23
|
}
|
|
18
24
|
type ExpoIapEventPayloads = {
|
|
19
25
|
[OpenIapEvent.PurchaseUpdated]: Purchase;
|
|
@@ -21,6 +27,7 @@ type ExpoIapEventPayloads = {
|
|
|
21
27
|
[OpenIapEvent.PromotedProductIOS]: Product;
|
|
22
28
|
[OpenIapEvent.UserChoiceBillingAndroid]: UserChoiceBillingDetails;
|
|
23
29
|
[OpenIapEvent.DeveloperProvidedBillingAndroid]: DeveloperProvidedBillingDetailsAndroid;
|
|
30
|
+
[OpenIapEvent.SubscriptionBillingIssue]: Purchase;
|
|
24
31
|
};
|
|
25
32
|
type ExpoIapEventListener<E extends OpenIapEvent> = (payload: ExpoIapEventPayloads[E]) => void;
|
|
26
33
|
type ExpoIapEmitter = {
|
|
@@ -123,6 +130,32 @@ export declare const userChoiceBillingListenerAndroid: (listener: (details: User
|
|
|
123
130
|
export declare const developerProvidedBillingListenerAndroid: (listener: (details: DeveloperProvidedBillingDetailsAndroid) => void) => {
|
|
124
131
|
remove: () => void;
|
|
125
132
|
};
|
|
133
|
+
/**
|
|
134
|
+
* Listen for subscription billing-issue events (cross-platform).
|
|
135
|
+
*
|
|
136
|
+
* Fires when a user's active subscription enters a state that needs attention
|
|
137
|
+
* for a payment problem. Unifies:
|
|
138
|
+
* - iOS 18+ / Mac Catalyst 18+: StoreKit 2 `Message.Reason.billingIssue`.
|
|
139
|
+
* - Android (Play Billing 8.1+): when `Purchase.isSuspendedAndroid === true`.
|
|
140
|
+
* - Meta Horizon / iOS 17 / older platforms: never fires.
|
|
141
|
+
*
|
|
142
|
+
* Recommended UX: call `deepLinkToSubscriptions()` when this fires so the user
|
|
143
|
+
* can update their payment method in the platform subscription center.
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```typescript
|
|
147
|
+
* const subscription = subscriptionBillingIssueListener((purchase) => {
|
|
148
|
+
* console.warn('Needs attention:', purchase.productId);
|
|
149
|
+
* deepLinkToSubscriptions({
|
|
150
|
+
* skuAndroid: purchase.productId,
|
|
151
|
+
* packageNameAndroid: 'com.example.app',
|
|
152
|
+
* });
|
|
153
|
+
* });
|
|
154
|
+
* ```
|
|
155
|
+
*/
|
|
156
|
+
export declare const subscriptionBillingIssueListener: (listener: (purchase: Purchase) => void) => {
|
|
157
|
+
remove: () => void;
|
|
158
|
+
};
|
|
126
159
|
export declare const initConnection: MutationField<'initConnection'>;
|
|
127
160
|
export declare const endConnection: MutationField<'endConnection'>;
|
|
128
161
|
/**
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAIV,sCAAsC,EACtC,aAAa,EAGb,OAAO,EACP,gBAAgB,EAEhB,QAAQ,EAER,UAAU,EAOV,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAsB,KAAK,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAG7E,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AAGzB,oBAAY,YAAY;IACtB,eAAe,qBAAqB;IACpC,aAAa,mBAAmB;IAChC,kBAAkB,yBAAyB;IAC3C,wBAAwB,gCAAgC;IACxD;;;OAGG;IACH,+BAA+B,uCAAuC;
|
|
1
|
+
{"version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Ac,EAAC,MAAM,eAAe,CAAC"}
|
package/build/index.js
CHANGED
|
@@ -24,6 +24,12 @@ export var OpenIapEvent;
|
|
|
24
24
|
* Only available in Japan. Contains externalTransactionToken for reporting.
|
|
25
25
|
*/
|
|
26
26
|
OpenIapEvent["DeveloperProvidedBillingAndroid"] = "developer-provided-billing-android";
|
|
27
|
+
/**
|
|
28
|
+
* Fired when an active subscription enters a billing-issue state (cross-platform).
|
|
29
|
+
* Unifies StoreKit 2 `Message.Reason.billingIssue` (iOS 18+) and Play Billing 8.1+
|
|
30
|
+
* `Purchase.isSuspended`. NOT fired on the Meta Horizon flavor.
|
|
31
|
+
*/
|
|
32
|
+
OpenIapEvent["SubscriptionBillingIssue"] = "subscription-billing-issue";
|
|
27
33
|
})(OpenIapEvent || (OpenIapEvent = {}));
|
|
28
34
|
// Use the raw native module for listener calls — JSI HostObjects require the
|
|
29
35
|
// real native module as `this` when calling addListener. Using a Proxy as
|
|
@@ -183,6 +189,37 @@ export const developerProvidedBillingListenerAndroid = (listener) => {
|
|
|
183
189
|
}
|
|
184
190
|
return emitter.addListener(OpenIapEvent.DeveloperProvidedBillingAndroid, listener);
|
|
185
191
|
};
|
|
192
|
+
/**
|
|
193
|
+
* Listen for subscription billing-issue events (cross-platform).
|
|
194
|
+
*
|
|
195
|
+
* Fires when a user's active subscription enters a state that needs attention
|
|
196
|
+
* for a payment problem. Unifies:
|
|
197
|
+
* - iOS 18+ / Mac Catalyst 18+: StoreKit 2 `Message.Reason.billingIssue`.
|
|
198
|
+
* - Android (Play Billing 8.1+): when `Purchase.isSuspendedAndroid === true`.
|
|
199
|
+
* - Meta Horizon / iOS 17 / older platforms: never fires.
|
|
200
|
+
*
|
|
201
|
+
* Recommended UX: call `deepLinkToSubscriptions()` when this fires so the user
|
|
202
|
+
* can update their payment method in the platform subscription center.
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```typescript
|
|
206
|
+
* const subscription = subscriptionBillingIssueListener((purchase) => {
|
|
207
|
+
* console.warn('Needs attention:', purchase.productId);
|
|
208
|
+
* deepLinkToSubscriptions({
|
|
209
|
+
* skuAndroid: purchase.productId,
|
|
210
|
+
* packageNameAndroid: 'com.example.app',
|
|
211
|
+
* });
|
|
212
|
+
* });
|
|
213
|
+
* ```
|
|
214
|
+
*/
|
|
215
|
+
export const subscriptionBillingIssueListener = (listener) => {
|
|
216
|
+
// Mirror purchaseUpdatedListener's platform normalization so consumers get
|
|
217
|
+
// a consistent payload regardless of native casing.
|
|
218
|
+
const wrappedListener = (event) => {
|
|
219
|
+
listener(normalizePurchasePlatform(event));
|
|
220
|
+
};
|
|
221
|
+
return emitter.addListener(OpenIapEvent.SubscriptionBillingIssue, wrappedListener);
|
|
222
|
+
};
|
|
186
223
|
export const initConnection = async (config) => ExpoIapModule.initConnection(config ?? null);
|
|
187
224
|
export const endConnection = async () => ExpoIapModule.endConnection();
|
|
188
225
|
/**
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC;AAEtC,mBAAmB;AACnB,OAAO,aAAa,EAAE,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,0BAA0B,EAC1B,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAyB7C,OAAO,EAAC,SAAS,EAAC,MAAM,SAAS,CAAC;AAClC,OAAO,EAAC,mBAAmB,EAAqB,MAAM,sBAAsB,CAAC;AAE7E,mBAAmB;AACnB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,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ACd,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EACtB,CAAC;YACD,IAAI,CAAC;gBACH,6DAA6D;gBAC7D,MAAM,EAAC,OAAO,EAAE,SAAS,EAAC,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,CAAC;gBAC5D,MAAM,YAAY,GAAG,SAAS,CAAC,UAAU,EAAE,KAAK,EAAE,YAAY,CAAC;gBAC/D,IAAI,YAAY,EAAE,CAAC;oBACjB,OAAO,GAAG;wBACR,GAAG,OAAO;wBACV,MAAM,EAAE;4BACN,GAAG,OAAO,CAAC,MAAM;4BACjB,MAAM,EAAE,YAAY;yBACrB;qBACF,CAAC;gBACJ,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,MAAM,IAAI,KAAK,CACb,wEAAwE;oBACtE,sDAAsD;oBACtD,mEAAmE,CACtE,CAAC;YACJ,CAAC;QACH,CAAC;QACD,OAAO,aAAa,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,yBAAyB,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;AAC1D,CAAC,CAAC;AAEF,cAAc,UAAU,CAAC;AACzB,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,+BAA+B,GAChC,MAAM,sBAAsB,CAAC;AAK9B,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC","sourcesContent":["// External dependencies\nimport {Platform} from 'react-native';\n\n// Internal modules\nimport ExpoIapModule, {getNativeModule} from './ExpoIapModule';\nimport {\n isProductIOS,\n validateReceiptIOS,\n deepLinkToSubscriptionsIOS,\n syncIOS,\n} from './modules/ios';\nimport {\n isProductAndroid,\n validateReceiptAndroid,\n deepLinkToSubscriptionsAndroid,\n} from './modules/android';\nimport {ExpoIapConsole} from './utils/debug';\n\n// Types\nimport type {\n ActiveSubscription,\n AndroidSubscriptionOfferInput,\n DeepLinkOptions,\n DeveloperProvidedBillingDetailsAndroid,\n MutationField,\n MutationRequestPurchaseArgs,\n MutationValidateReceiptArgs,\n Product,\n ProductQueryType,\n ProductSubscription,\n Purchase,\n PurchaseOptions,\n QueryField,\n RequestPurchasePropsByPlatforms,\n RequestPurchaseAndroidProps,\n RequestPurchaseIosProps,\n RequestSubscriptionPropsByPlatforms,\n RequestSubscriptionAndroidProps,\n RequestSubscriptionIosProps,\n UserChoiceBillingDetails,\n} from './types';\nimport {ErrorCode} from './types';\nimport {createPurchaseError, type PurchaseError} from './utils/errorMapping';\n\n// Export all types\nexport * from './types';\nexport * from './modules/android';\nexport * from './modules/ios';\nexport * from './onside';\n\n// Get the native constant value\nexport enum OpenIapEvent {\n PurchaseUpdated = 'purchase-updated',\n PurchaseError = 'purchase-error',\n PromotedProductIOS = 'promoted-product-ios',\n UserChoiceBillingAndroid = 'user-choice-billing-android',\n /**\n * Fired when user selects developer billing in External Payments flow (Android 8.3.0+)\n * Only available in Japan. Contains externalTransactionToken for reporting.\n */\n DeveloperProvidedBillingAndroid = 'developer-provided-billing-android',\n}\n\ntype ExpoIapEventPayloads = {\n [OpenIapEvent.PurchaseUpdated]: Purchase;\n [OpenIapEvent.PurchaseError]: PurchaseError;\n [OpenIapEvent.PromotedProductIOS]: Product;\n [OpenIapEvent.UserChoiceBillingAndroid]: UserChoiceBillingDetails;\n [OpenIapEvent.DeveloperProvidedBillingAndroid]: DeveloperProvidedBillingDetailsAndroid;\n};\n\ntype ExpoIapEventListener<E extends OpenIapEvent> = (\n payload: ExpoIapEventPayloads[E],\n) => void;\n\ntype ExpoIapEmitter = {\n addListener<E extends OpenIapEvent>(\n eventName: E,\n listener: ExpoIapEventListener<E>,\n ): {remove: () => void};\n removeListener<E extends OpenIapEvent>(\n eventName: E,\n listener: ExpoIapEventListener<E>,\n ): void;\n};\n\n// Use the raw native module for listener calls — JSI HostObjects require the\n// real native module as `this` when calling addListener. Using a Proxy as\n// `this` triggers \"native state unsupported on Proxy\" on New Architecture / Hermes.\n// Resolved lazily so importing this module doesn't throw on unsupported platforms.\nexport const emitter: ExpoIapEmitter = {\n addListener(eventName, listener) {\n return getNativeModule().addListener(eventName, listener);\n },\n removeListener(eventName, listener) {\n return getNativeModule().removeListener(eventName, listener);\n },\n};\n\n/**\n * TODO(v3.1.0): Remove legacy 'inapp' alias once downstream apps migrate to 'in-app'.\n */\nexport type ProductTypeInput = ProductQueryType | 'inapp';\n\nconst normalizeProductType = (type?: ProductTypeInput) => {\n if (type === 'inapp') {\n ExpoIapConsole.warn(\n \"'inapp' product type is deprecated and will be removed in v3.1.0. Use 'in-app' instead.\",\n );\n }\n\n if (!type || type === 'inapp' || type === 'in-app') {\n return {\n canonical: 'in-app' as ProductQueryType,\n native: 'in-app' as const,\n };\n }\n if (type === 'subs') {\n return {\n canonical: 'subs' as ProductQueryType,\n native: 'subs' as const,\n };\n }\n if (type === 'all') {\n return {\n canonical: 'all' as ProductQueryType,\n native: 'all' as const,\n };\n }\n throw new Error(`Unsupported product type: ${type}`);\n};\n\nconst normalizePurchasePlatform = (purchase: Purchase): Purchase => {\n const platform = purchase.platform;\n if (typeof platform !== 'string') {\n return purchase;\n }\n\n const lowered = platform.toLowerCase();\n if (lowered === platform || (lowered !== 'ios' && lowered !== 'android')) {\n return purchase;\n }\n\n return {...purchase, platform: lowered};\n};\n\nconst normalizePurchaseArray = (purchases: Purchase[]): Purchase[] =>\n purchases.map((purchase) => normalizePurchasePlatform(purchase));\n\nexport const purchaseUpdatedListener = (\n listener: (event: Purchase) => void,\n) => {\n const wrappedListener = (event: Purchase) => {\n const normalized = normalizePurchasePlatform(event);\n listener(normalized);\n };\n const emitterSubscription = emitter.addListener(\n OpenIapEvent.PurchaseUpdated,\n wrappedListener,\n );\n return emitterSubscription;\n};\n\nexport const purchaseErrorListener = (\n listener: (error: PurchaseError) => void,\n) => {\n const wrappedListener = (error: PurchaseError) => {\n listener(error);\n };\n const emitterSubscription = emitter.addListener(\n OpenIapEvent.PurchaseError,\n wrappedListener,\n );\n return emitterSubscription;\n};\n\n/**\n * iOS-only listener for App Store promoted product events.\n * This fires when a user taps on a promoted product in the App Store.\n *\n * @param listener - Callback function that receives the promoted product details\n * @returns EventSubscription that can be used to unsubscribe\n *\n * @example\n * ```typescript\n * const subscription = promotedProductListenerIOS((product) => {\n * console.log('Promoted product:', product);\n * // Handle the promoted product\n * });\n *\n * // Later, clean up\n * subscription.remove();\n * ```\n *\n * @platform iOS\n */\nexport const promotedProductListenerIOS = (\n listener: (product: Product) => void,\n) => {\n if (Platform.OS !== 'ios') {\n ExpoIapConsole.warn(\n 'promotedProductListenerIOS: This listener is only available on iOS',\n );\n return {remove: () => {}};\n }\n return emitter.addListener(OpenIapEvent.PromotedProductIOS, listener);\n};\n\n/**\n * Android-only listener for User Choice Billing events.\n * This fires when a user selects alternative billing instead of Google Play billing\n * in the User Choice Billing dialog (only in 'user-choice' mode).\n *\n * @param listener - Callback function that receives the external transaction token and product IDs\n * @returns EventSubscription that can be used to unsubscribe\n *\n * @example\n * ```typescript\n * const subscription = userChoiceBillingListenerAndroid((details) => {\n * console.log('User selected alternative billing');\n * console.log('Token:', details.externalTransactionToken);\n * console.log('Products:', details.products);\n *\n * // Process payment in your system, then report token to Google\n * await processPaymentAndReportToken(details);\n * });\n *\n * // Later, clean up\n * subscription.remove();\n * ```\n *\n * @platform Android\n */\nexport const userChoiceBillingListenerAndroid = (\n listener: (details: UserChoiceBillingDetails) => void,\n) => {\n if (Platform.OS !== 'android') {\n ExpoIapConsole.warn(\n 'userChoiceBillingListenerAndroid: This listener is only available on Android',\n );\n return {remove: () => {}};\n }\n return emitter.addListener(OpenIapEvent.UserChoiceBillingAndroid, listener);\n};\n\n/**\n * Android-only listener for Developer Provided Billing events (External Payments).\n * This fires when a user selects the developer's payment option in the External Payments\n * side-by-side choice dialog during purchase flow.\n *\n * Requires Google Play Billing Library 8.3.0+ and is currently only available in Japan.\n *\n * @param listener - Callback function that receives the external transaction token\n * @returns EventSubscription that can be used to unsubscribe\n *\n * @example\n * ```typescript\n * const subscription = developerProvidedBillingListenerAndroid(async (details) => {\n * console.log('User selected developer billing');\n * console.log('Token:', details.externalTransactionToken);\n *\n * // Process payment with your payment gateway\n * await processPaymentWithYourGateway(details.externalTransactionToken);\n *\n * // IMPORTANT: Report the token to Google Play within 24 hours\n * await reportExternalTransactionToGoogle(details.externalTransactionToken);\n * });\n *\n * // Later, clean up\n * subscription.remove();\n * ```\n *\n * @platform Android (8.3.0+, Japan only)\n */\nexport const developerProvidedBillingListenerAndroid = (\n listener: (details: DeveloperProvidedBillingDetailsAndroid) => void,\n) => {\n if (Platform.OS !== 'android') {\n ExpoIapConsole.warn(\n 'developerProvidedBillingListenerAndroid: This listener is only available on Android',\n );\n return {remove: () => {}};\n }\n return emitter.addListener(\n OpenIapEvent.DeveloperProvidedBillingAndroid,\n listener,\n );\n};\n\nexport const initConnection: MutationField<'initConnection'> = async (config) =>\n ExpoIapModule.initConnection(config ?? null);\n\nexport const endConnection: MutationField<'endConnection'> = async () =>\n ExpoIapModule.endConnection();\n\n/**\n * Fetch products with unified API (v2.7.0+)\n *\n * @param request - Product fetch configuration\n * @param request.skus - Array of product SKUs to fetch\n * @param request.type - Product query type: 'in-app', 'subs', or 'all'\n */\nexport const fetchProducts: QueryField<'fetchProducts'> = async (request) => {\n ExpoIapConsole.debug('fetchProducts called with:', request);\n const {skus, type} = request ?? {};\n\n if (!Array.isArray(skus) || skus.length === 0) {\n throw createPurchaseError({\n message: 'No SKUs provided',\n code: ErrorCode.EmptySkuList,\n });\n }\n\n const {canonical, native} = normalizeProductType(\n type as ProductTypeInput | undefined,\n );\n const skuSet = new Set(skus);\n\n const filterIosItems = (\n items: unknown[],\n ): (Product | ProductSubscription)[] =>\n items.filter((item): item is Product | ProductSubscription => {\n if (!isProductIOS(item)) {\n return false;\n }\n const candidate = item as Product | ProductSubscription;\n return typeof candidate.id === 'string' && skuSet.has(candidate.id);\n });\n\n const filterAndroidItems = (\n items: unknown[],\n ): (Product | ProductSubscription)[] =>\n items.filter((item): item is Product | ProductSubscription => {\n if (!isProductAndroid(item)) {\n return false;\n }\n const candidate = item as Product | ProductSubscription;\n return typeof candidate.id === 'string' && skuSet.has(candidate.id);\n });\n\n const castResult = (\n items: (Product | ProductSubscription)[],\n ):\n | (Product | ProductSubscription)[]\n | Product[]\n | ProductSubscription[]\n | null => {\n if (canonical === 'in-app') {\n return items as Product[];\n }\n if (canonical === 'subs') {\n return items as ProductSubscription[];\n }\n // For 'all' type, items contain both Product and ProductSubscription\n // Return as ProductOrSubscription[] to preserve discriminated union\n return items;\n };\n\n if (Platform.OS === 'ios') {\n const rawItems = await ExpoIapModule.fetchProducts({skus, type: native});\n return castResult(filterIosItems(rawItems));\n }\n\n if (Platform.OS === 'android') {\n const rawItems = await ExpoIapModule.fetchProducts(native, skus);\n return castResult(filterAndroidItems(rawItems));\n }\n\n throw new Error('Unsupported platform');\n};\n\nexport const getAvailablePurchases: QueryField<\n 'getAvailablePurchases'\n> = async (options) => {\n const normalizedOptions: PurchaseOptions = {\n alsoPublishToEventListenerIOS:\n options?.alsoPublishToEventListenerIOS ?? false,\n onlyIncludeActiveItemsIOS: options?.onlyIncludeActiveItemsIOS ?? true,\n includeSuspendedAndroid: options?.includeSuspendedAndroid ?? false,\n };\n\n const resolvePurchases: () => Promise<Purchase[]> =\n Platform.select({\n ios: () =>\n ExpoIapModule.getAvailableItems(\n normalizedOptions.alsoPublishToEventListenerIOS,\n normalizedOptions.onlyIncludeActiveItemsIOS,\n ) as Promise<Purchase[]>,\n android: () =>\n ExpoIapModule.getAvailableItems(normalizedOptions) as Promise<\n Purchase[]\n >,\n }) ?? (() => Promise.resolve([] as Purchase[]));\n\n const purchases = await resolvePurchases();\n return normalizePurchaseArray(purchases as Purchase[]);\n};\n\n/**\n * Get all active subscriptions with detailed information.\n * Uses native OpenIAP module for accurate subscription status and renewal info.\n *\n * On iOS: Returns subscriptions with renewalInfoIOS containing pendingUpgradeProductId,\n * willAutoRenew, autoRenewPreference, and other renewal details.\n *\n * On Android: Filters available purchases to find active subscriptions (fallback implementation).\n *\n * @param subscriptionIds - Optional array of subscription product IDs to filter. If not provided, returns all active subscriptions.\n * @returns Promise resolving to array of active subscriptions with details\n *\n * @example\n * ```typescript\n * // Get all active subscriptions\n * const subs = await getActiveSubscriptions();\n *\n * // Get specific subscriptions\n * const premiumSubs = await getActiveSubscriptions(['premium', 'premium_year']);\n *\n * // Check for pending upgrades (iOS)\n * subs.forEach(sub => {\n * if (sub.renewalInfoIOS?.pendingUpgradeProductId) {\n * console.log(`Upgrade pending to: ${sub.renewalInfoIOS.pendingUpgradeProductId}`);\n * }\n * });\n * ```\n */\nexport const getActiveSubscriptions: QueryField<\n 'getActiveSubscriptions'\n> = async (subscriptionIds) => {\n const result = await ExpoIapModule.getActiveSubscriptions(\n subscriptionIds ?? null,\n );\n return (result ?? []) as ActiveSubscription[];\n};\n\n/**\n * Check if user has any active subscriptions.\n *\n * @param subscriptionIds - Optional array of subscription product IDs to check. If not provided, checks all subscriptions.\n * @returns Promise resolving to true if user has at least one active subscription\n *\n * @example\n * ```typescript\n * // Check any active subscription\n * const hasAny = await hasActiveSubscriptions();\n *\n * // Check specific subscriptions\n * const hasPremium = await hasActiveSubscriptions(['premium', 'premium_year']);\n * ```\n */\nexport const hasActiveSubscriptions: QueryField<\n 'hasActiveSubscriptions'\n> = async (subscriptionIds) => {\n return !!(await ExpoIapModule.hasActiveSubscriptions(\n subscriptionIds ?? null,\n ));\n};\n\nexport const getStorefront: QueryField<'getStorefront'> = async () => {\n if (Platform.OS !== 'ios' && Platform.OS !== 'android') {\n return '';\n }\n return ExpoIapModule.getStorefront();\n};\n\n/**\n * Helper to normalize request props to platform-specific format\n */\nfunction normalizeRequestProps(\n request: RequestPurchasePropsByPlatforms,\n platform: 'ios',\n): RequestPurchaseIosProps | null | undefined;\nfunction normalizeRequestProps(\n request: RequestPurchasePropsByPlatforms,\n platform: 'android',\n): RequestPurchaseAndroidProps | null | undefined;\nfunction normalizeRequestProps(\n request: RequestSubscriptionPropsByPlatforms,\n platform: 'ios',\n): RequestSubscriptionIosProps | null | undefined;\nfunction normalizeRequestProps(\n request: RequestSubscriptionPropsByPlatforms,\n platform: 'android',\n): RequestSubscriptionAndroidProps | null | undefined;\nfunction normalizeRequestProps(\n request:\n | RequestPurchasePropsByPlatforms\n | RequestSubscriptionPropsByPlatforms,\n platform: 'ios' | 'android',\n) {\n // Support both new (apple/google) and legacy (ios/android) field names\n // New fields take precedence over deprecated ones\n if (platform === 'ios') {\n return request.apple ?? request.ios;\n }\n return request.google ?? request.android;\n}\n\n/**\n * Request a purchase for products or subscriptions.\n *\n * @param requestObj - Purchase request configuration\n * @param requestObj.request - Store-specific purchase parameters\n * @param requestObj.type - Type of purchase: 'in-app' for products (default) or 'subs' for subscriptions\n *\n * @example\n * ```typescript\n * // Product purchase (recommended: use apple/google)\n * await requestPurchase({\n * request: {\n * apple: { sku: productId },\n * google: { skus: [productId] }\n * },\n * type: 'in-app'\n * });\n *\n * // Subscription purchase\n * await requestPurchase({\n * request: {\n * apple: { sku: subscriptionId },\n * google: {\n * skus: [subscriptionId],\n * subscriptionOffers: [{ sku: subscriptionId, offerToken: 'token' }]\n * }\n * },\n * type: 'subs'\n * });\n *\n * // Legacy format (deprecated, but still supported)\n * await requestPurchase({\n * request: {\n * ios: { sku: productId },\n * android: { skus: [productId] }\n * },\n * type: 'in-app'\n * });\n * ```\n */\nexport const requestPurchase: MutationField<'requestPurchase'> = async (\n args,\n) => {\n const {request, type} = args;\n const {canonical, native} = normalizeProductType(type as ProductTypeInput);\n const isInAppPurchase = canonical === 'in-app';\n\n if (Platform.OS === 'ios') {\n const normalizedRequest = normalizeRequestProps(request, 'ios');\n\n if (!normalizedRequest?.sku) {\n throw new Error(\n 'Invalid request for Apple. The `sku` property is required and must be a string.\\n\\n' +\n 'Expected format:\\n' +\n ' requestPurchase({\\n' +\n ' request: {\\n' +\n ' apple: { sku: \"product_id\" },\\n' +\n ' google: { skus: [\"product_id\"] }\\n' +\n ' },\\n' +\n ' type: \"in-app\"\\n' +\n ' })\\n\\n' +\n 'See: https://hyochan.github.io/expo-iap/docs/api/methods/core-methods#requestpurchase',\n );\n }\n\n if (canonical !== 'in-app' && canonical !== 'subs') {\n throw new Error(`Unsupported product type: ${canonical}`);\n }\n\n const payload: MutationRequestPurchaseArgs = {\n type: canonical === 'in-app' ? 'in-app' : 'subs',\n request: {ios: normalizedRequest},\n useAlternativeBilling: args.useAlternativeBilling,\n };\n\n const purchase = (await ExpoIapModule.requestPurchase(payload)) as\n | Purchase\n | Purchase[]\n | null;\n\n if (Array.isArray(purchase)) {\n return normalizePurchaseArray(purchase);\n }\n\n if (purchase) {\n return normalizePurchasePlatform(purchase);\n }\n\n return canonical === 'subs' ? [] : null;\n }\n\n if (Platform.OS === 'android') {\n if (isInAppPurchase) {\n const normalizedRequest = normalizeRequestProps(\n request as RequestPurchasePropsByPlatforms,\n 'android',\n ) as RequestPurchaseAndroidProps | null | undefined;\n\n if (!normalizedRequest?.skus?.length) {\n throw new Error(\n 'Invalid request for Google. The `skus` property is required and must be a non-empty array.\\n\\n' +\n 'Expected format:\\n' +\n ' requestPurchase({\\n' +\n ' request: {\\n' +\n ' apple: { sku: \"product_id\" },\\n' +\n ' google: { skus: [\"product_id\"] }\\n' +\n ' },\\n' +\n ' type: \"in-app\"\\n' +\n ' })\\n\\n' +\n 'See: https://hyochan.github.io/expo-iap/docs/api/methods/core-methods#requestpurchase',\n );\n }\n\n const {\n skus,\n obfuscatedAccountId,\n obfuscatedProfileId,\n isOfferPersonalized,\n offerToken,\n } = normalizedRequest;\n\n const result = (await ExpoIapModule.requestPurchase({\n type: native,\n skuArr: skus,\n purchaseToken: undefined,\n replacementMode: -1,\n obfuscatedAccountId: obfuscatedAccountId,\n obfuscatedProfileId: obfuscatedProfileId,\n offerToken: offerToken,\n offerTokenArr: [],\n isOfferPersonalized: isOfferPersonalized ?? false,\n })) as Purchase[];\n\n return normalizePurchaseArray(result);\n }\n\n if (canonical === 'subs') {\n const normalizedRequest = normalizeRequestProps(\n request as RequestSubscriptionPropsByPlatforms,\n 'android',\n ) as RequestSubscriptionAndroidProps | null | undefined;\n\n if (!normalizedRequest?.skus?.length) {\n throw new Error(\n 'Invalid request for Google. The `skus` property is required and must be a non-empty array.\\n\\n' +\n 'Expected format:\\n' +\n ' requestPurchase({\\n' +\n ' request: {\\n' +\n ' apple: { sku: \"subscription_id\" },\\n' +\n ' google: { skus: [\"subscription_id\"] }\\n' +\n ' },\\n' +\n ' type: \"subs\"\\n' +\n ' })\\n\\n' +\n 'See: https://hyochan.github.io/expo-iap/docs/api/methods/core-methods#requestpurchase',\n );\n }\n\n const {\n skus,\n obfuscatedAccountId,\n obfuscatedProfileId,\n isOfferPersonalized,\n subscriptionOffers,\n replacementMode: replacementModeInput,\n purchaseToken: purchaseTokenInput,\n subscriptionProductReplacementParams,\n } = normalizedRequest;\n\n const normalizedOffers = subscriptionOffers ?? [];\n const replacementMode = replacementModeInput ?? -1;\n const purchaseToken = purchaseTokenInput ?? undefined;\n\n const result = (await ExpoIapModule.requestPurchase({\n type: native,\n skuArr: skus,\n purchaseToken,\n replacementMode,\n obfuscatedAccountId: obfuscatedAccountId,\n obfuscatedProfileId: obfuscatedProfileId,\n offerTokenArr: normalizedOffers.map(\n (offer: AndroidSubscriptionOfferInput) => offer.offerToken,\n ),\n subscriptionOffers: normalizedOffers,\n isOfferPersonalized: isOfferPersonalized ?? false,\n subscriptionProductReplacementParams:\n subscriptionProductReplacementParams ?? undefined,\n })) as Purchase[];\n\n return normalizePurchaseArray(result);\n }\n\n throw new Error(\n \"Invalid request for Android: Expected a valid request object with 'skus' array.\",\n );\n }\n\n throw new Error('Platform not supported');\n};\n\nexport const finishTransaction: MutationField<'finishTransaction'> = async ({\n purchase,\n isConsumable = false,\n}) => {\n if (Platform.OS === 'ios') {\n await ExpoIapModule.finishTransaction(purchase, isConsumable);\n return;\n }\n\n if (Platform.OS === 'android') {\n const token = purchase.purchaseToken ?? undefined;\n\n if (!token) {\n throw createPurchaseError({\n message: 'Purchase token is required to finish transaction',\n code: ErrorCode.DeveloperError,\n productId: purchase.productId,\n platform: 'android',\n });\n }\n\n if (isConsumable) {\n await ExpoIapModule.consumePurchaseAndroid(token);\n return;\n }\n\n await ExpoIapModule.acknowledgePurchaseAndroid(token);\n return;\n }\n\n throw new Error('Unsupported Platform');\n};\n\n/**\n * Restore completed transactions (cross-platform behavior)\n *\n * - iOS: perform a lightweight sync to refresh transactions and ignore sync errors,\n * then fetch available purchases to surface restored items to the app.\n * - Android: simply fetch available purchases (restoration happens via query).\n *\n * This helper triggers the refresh flows but does not return the purchases; consumers should\n * call `getAvailablePurchases` or rely on hook state to inspect the latest items.\n */\nexport const restorePurchases: MutationField<'restorePurchases'> = async () => {\n if (Platform.OS === 'ios') {\n await syncIOS().catch(() => undefined);\n }\n\n await getAvailablePurchases({\n alsoPublishToEventListenerIOS: false,\n onlyIncludeActiveItemsIOS: true,\n });\n};\n\n/**\n * Deeplinks to native interface that allows users to manage their subscriptions\n * @param options.skuAndroid - Required for Android to locate specific subscription (ignored on iOS)\n * @param options.packageNameAndroid - Required for Android to identify your app (ignored on iOS)\n *\n * @returns Promise that resolves when the deep link is successfully opened\n *\n * @throws {Error} When called on unsupported platform or when required Android parameters are missing\n *\n * @example\n * import { deepLinkToSubscriptions } from 'expo-iap';\n *\n * // Works on both iOS and Android\n * await deepLinkToSubscriptions({\n * skuAndroid: 'your_subscription_sku',\n * packageNameAndroid: 'com.example.app'\n * });\n */\nexport const deepLinkToSubscriptions: MutationField<\n 'deepLinkToSubscriptions'\n> = async (options) => {\n if (Platform.OS === 'ios') {\n await deepLinkToSubscriptionsIOS();\n return;\n }\n\n if (Platform.OS === 'android') {\n await deepLinkToSubscriptionsAndroid((options as DeepLinkOptions) ?? null);\n return;\n }\n\n throw new Error(`Unsupported platform: ${Platform.OS}`);\n};\n\n/**\n * Internal receipt validation function (NOT RECOMMENDED for production use)\n *\n * WARNING: This function performs client-side validation which is NOT secure.\n * For production apps, always validate receipts on your secure server:\n * - iOS: Send receipt data to Apple's verification endpoint from your server\n * - Android: Use Google Play Developer API with service account credentials\n *\n * @deprecated Use verifyPurchase instead\n */\nexport const validateReceipt: MutationField<'validateReceipt'> = async (\n options,\n) => {\n const {apple, google} = options as MutationValidateReceiptArgs;\n\n if (Platform.OS === 'ios') {\n if (!apple?.sku) {\n throw new Error('iOS validation requires apple.sku');\n }\n return validateReceiptIOS({apple: {sku: apple.sku}});\n }\n\n if (Platform.OS === 'android') {\n if (\n !google ||\n !google.sku ||\n !google.packageName ||\n !google.purchaseToken ||\n !google.accessToken\n ) {\n throw new Error(\n 'Android validation requires google.sku, google.packageName, google.purchaseToken, and google.accessToken',\n );\n }\n return validateReceiptAndroid({\n packageName: google.packageName,\n productId: google.sku,\n productToken: google.purchaseToken,\n accessToken: google.accessToken,\n isSub: google.isSub ?? undefined,\n });\n }\n\n throw new Error('Platform not supported');\n};\n\n/**\n * Verify purchase with the configured providers\n *\n * This function uses the native OpenIAP verifyPurchase implementation\n * which validates purchases using platform-specific methods.\n *\n * @param options - Receipt validation options containing the SKU\n * @returns Promise resolving to receipt validation result\n */\nexport const verifyPurchase: MutationField<'verifyPurchase'> = async (\n options,\n) => {\n if (Platform.OS === 'ios' || Platform.OS === 'android') {\n return ExpoIapModule.verifyPurchase(options);\n }\n\n throw new Error(`Unsupported platform: ${Platform.OS}`);\n};\n\n/**\n * Verify purchase with a specific provider (e.g., IAPKit)\n *\n * This function allows you to verify purchases using external verification\n * services like IAPKit, which provide additional validation and security.\n *\n * @param options - Verification options including provider and credentials\n * @returns Promise resolving to provider-specific verification result\n *\n * @example\n * ```typescript\n * const result = await verifyPurchaseWithProvider({\n * provider: 'iapkit',\n * iapkit: {\n * apiKey: 'your-api-key',\n * apple: {\n * jws: purchase.purchaseToken // JWS from purchase\n * },\n * google: {\n * purchaseToken: purchase.purchaseToken\n * }\n * }\n * });\n * ```\n */\nexport const verifyPurchaseWithProvider: MutationField<\n 'verifyPurchaseWithProvider'\n> = async (options) => {\n if (Platform.OS === 'ios' || Platform.OS === 'android') {\n // Auto-fill apiKey from config if not provided and provider is iapkit\n if (\n options.provider === 'iapkit' &&\n options.iapkit &&\n !options.iapkit.apiKey\n ) {\n try {\n // Dynamically import expo-constants to avoid hard dependency\n const {default: Constants} = await import('expo-constants');\n const configApiKey = Constants.expoConfig?.extra?.iapkitApiKey;\n if (configApiKey) {\n options = {\n ...options,\n iapkit: {\n ...options.iapkit,\n apiKey: configApiKey,\n },\n };\n }\n } catch {\n throw new Error(\n 'expo-constants is required for auto-filling iapkitApiKey from config. ' +\n 'Please install it: npx expo install expo-constants\\n' +\n 'Or provide apiKey directly in verifyPurchaseWithProvider options.',\n );\n }\n }\n return ExpoIapModule.verifyPurchaseWithProvider(options);\n }\n\n throw new Error(`Unsupported platform: ${Platform.OS}`);\n};\n\nexport * from './useIAP';\nexport {\n ErrorCodeUtils,\n ErrorCodeMapping,\n createPurchaseError,\n createPurchaseErrorFromPlatform,\n} from './utils/errorMapping';\nexport type {\n PurchaseError as ExpoPurchaseError,\n PurchaseErrorProps,\n} from './utils/errorMapping';\nexport {ExpoIapConsole} from './utils/debug';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC;AAEtC,mBAAmB;AACnB,OAAO,aAAa,EAAE,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,0BAA0B,EAC1B,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAyB7C,OAAO,EAAC,SAAS,EAAC,MAAM,SAAS,CAAC;AAClC,OAAO,EA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AC;AAEF,cAAc,UAAU,CAAC;AACzB,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,+BAA+B,GAChC,MAAM,sBAAsB,CAAC;AAK9B,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC","sourcesContent":["// External dependencies\nimport {Platform} from 'react-native';\n\n// Internal modules\nimport ExpoIapModule, {getNativeModule} from './ExpoIapModule';\nimport {\n isProductIOS,\n validateReceiptIOS,\n deepLinkToSubscriptionsIOS,\n syncIOS,\n} from './modules/ios';\nimport {\n isProductAndroid,\n validateReceiptAndroid,\n deepLinkToSubscriptionsAndroid,\n} from './modules/android';\nimport {ExpoIapConsole} from './utils/debug';\n\n// Types\nimport type {\n ActiveSubscription,\n AndroidSubscriptionOfferInput,\n DeepLinkOptions,\n DeveloperProvidedBillingDetailsAndroid,\n MutationField,\n MutationRequestPurchaseArgs,\n MutationValidateReceiptArgs,\n Product,\n ProductQueryType,\n ProductSubscription,\n Purchase,\n PurchaseOptions,\n QueryField,\n RequestPurchasePropsByPlatforms,\n RequestPurchaseAndroidProps,\n RequestPurchaseIosProps,\n RequestSubscriptionPropsByPlatforms,\n RequestSubscriptionAndroidProps,\n RequestSubscriptionIosProps,\n UserChoiceBillingDetails,\n} from './types';\nimport {ErrorCode} from './types';\nimport {createPurchaseError, type PurchaseError} from './utils/errorMapping';\n\n// Export all types\nexport * from './types';\nexport * from './modules/android';\nexport * from './modules/ios';\nexport * from './onside';\n\n// Get the native constant value\nexport enum OpenIapEvent {\n PurchaseUpdated = 'purchase-updated',\n PurchaseError = 'purchase-error',\n PromotedProductIOS = 'promoted-product-ios',\n UserChoiceBillingAndroid = 'user-choice-billing-android',\n /**\n * Fired when user selects developer billing in External Payments flow (Android 8.3.0+)\n * Only available in Japan. Contains externalTransactionToken for reporting.\n */\n DeveloperProvidedBillingAndroid = 'developer-provided-billing-android',\n /**\n * Fired when an active subscription enters a billing-issue state (cross-platform).\n * Unifies StoreKit 2 `Message.Reason.billingIssue` (iOS 18+) and Play Billing 8.1+\n * `Purchase.isSuspended`. NOT fired on the Meta Horizon flavor.\n */\n SubscriptionBillingIssue = 'subscription-billing-issue',\n}\n\ntype ExpoIapEventPayloads = {\n [OpenIapEvent.PurchaseUpdated]: Purchase;\n [OpenIapEvent.PurchaseError]: PurchaseError;\n [OpenIapEvent.PromotedProductIOS]: Product;\n [OpenIapEvent.UserChoiceBillingAndroid]: UserChoiceBillingDetails;\n [OpenIapEvent.DeveloperProvidedBillingAndroid]: DeveloperProvidedBillingDetailsAndroid;\n [OpenIapEvent.SubscriptionBillingIssue]: Purchase;\n};\n\ntype ExpoIapEventListener<E extends OpenIapEvent> = (\n payload: ExpoIapEventPayloads[E],\n) => void;\n\ntype ExpoIapEmitter = {\n addListener<E extends OpenIapEvent>(\n eventName: E,\n listener: ExpoIapEventListener<E>,\n ): {remove: () => void};\n removeListener<E extends OpenIapEvent>(\n eventName: E,\n listener: ExpoIapEventListener<E>,\n ): void;\n};\n\n// Use the raw native module for listener calls — JSI HostObjects require the\n// real native module as `this` when calling addListener. Using a Proxy as\n// `this` triggers \"native state unsupported on Proxy\" on New Architecture / Hermes.\n// Resolved lazily so importing this module doesn't throw on unsupported platforms.\nexport const emitter: ExpoIapEmitter = {\n addListener(eventName, listener) {\n return getNativeModule().addListener(eventName, listener);\n },\n removeListener(eventName, listener) {\n return getNativeModule().removeListener(eventName, listener);\n },\n};\n\n/**\n * TODO(v3.1.0): Remove legacy 'inapp' alias once downstream apps migrate to 'in-app'.\n */\nexport type ProductTypeInput = ProductQueryType | 'inapp';\n\nconst normalizeProductType = (type?: ProductTypeInput) => {\n if (type === 'inapp') {\n ExpoIapConsole.warn(\n \"'inapp' product type is deprecated and will be removed in v3.1.0. Use 'in-app' instead.\",\n );\n }\n\n if (!type || type === 'inapp' || type === 'in-app') {\n return {\n canonical: 'in-app' as ProductQueryType,\n native: 'in-app' as const,\n };\n }\n if (type === 'subs') {\n return {\n canonical: 'subs' as ProductQueryType,\n native: 'subs' as const,\n };\n }\n if (type === 'all') {\n return {\n canonical: 'all' as ProductQueryType,\n native: 'all' as const,\n };\n }\n throw new Error(`Unsupported product type: ${type}`);\n};\n\nconst normalizePurchasePlatform = (purchase: Purchase): Purchase => {\n const platform = purchase.platform;\n if (typeof platform !== 'string') {\n return purchase;\n }\n\n const lowered = platform.toLowerCase();\n if (lowered === platform || (lowered !== 'ios' && lowered !== 'android')) {\n return purchase;\n }\n\n return {...purchase, platform: lowered};\n};\n\nconst normalizePurchaseArray = (purchases: Purchase[]): Purchase[] =>\n purchases.map((purchase) => normalizePurchasePlatform(purchase));\n\nexport const purchaseUpdatedListener = (\n listener: (event: Purchase) => void,\n) => {\n const wrappedListener = (event: Purchase) => {\n const normalized = normalizePurchasePlatform(event);\n listener(normalized);\n };\n const emitterSubscription = emitter.addListener(\n OpenIapEvent.PurchaseUpdated,\n wrappedListener,\n );\n return emitterSubscription;\n};\n\nexport const purchaseErrorListener = (\n listener: (error: PurchaseError) => void,\n) => {\n const wrappedListener = (error: PurchaseError) => {\n listener(error);\n };\n const emitterSubscription = emitter.addListener(\n OpenIapEvent.PurchaseError,\n wrappedListener,\n );\n return emitterSubscription;\n};\n\n/**\n * iOS-only listener for App Store promoted product events.\n * This fires when a user taps on a promoted product in the App Store.\n *\n * @param listener - Callback function that receives the promoted product details\n * @returns EventSubscription that can be used to unsubscribe\n *\n * @example\n * ```typescript\n * const subscription = promotedProductListenerIOS((product) => {\n * console.log('Promoted product:', product);\n * // Handle the promoted product\n * });\n *\n * // Later, clean up\n * subscription.remove();\n * ```\n *\n * @platform iOS\n */\nexport const promotedProductListenerIOS = (\n listener: (product: Product) => void,\n) => {\n if (Platform.OS !== 'ios') {\n ExpoIapConsole.warn(\n 'promotedProductListenerIOS: This listener is only available on iOS',\n );\n return {remove: () => {}};\n }\n return emitter.addListener(OpenIapEvent.PromotedProductIOS, listener);\n};\n\n/**\n * Android-only listener for User Choice Billing events.\n * This fires when a user selects alternative billing instead of Google Play billing\n * in the User Choice Billing dialog (only in 'user-choice' mode).\n *\n * @param listener - Callback function that receives the external transaction token and product IDs\n * @returns EventSubscription that can be used to unsubscribe\n *\n * @example\n * ```typescript\n * const subscription = userChoiceBillingListenerAndroid((details) => {\n * console.log('User selected alternative billing');\n * console.log('Token:', details.externalTransactionToken);\n * console.log('Products:', details.products);\n *\n * // Process payment in your system, then report token to Google\n * await processPaymentAndReportToken(details);\n * });\n *\n * // Later, clean up\n * subscription.remove();\n * ```\n *\n * @platform Android\n */\nexport const userChoiceBillingListenerAndroid = (\n listener: (details: UserChoiceBillingDetails) => void,\n) => {\n if (Platform.OS !== 'android') {\n ExpoIapConsole.warn(\n 'userChoiceBillingListenerAndroid: This listener is only available on Android',\n );\n return {remove: () => {}};\n }\n return emitter.addListener(OpenIapEvent.UserChoiceBillingAndroid, listener);\n};\n\n/**\n * Android-only listener for Developer Provided Billing events (External Payments).\n * This fires when a user selects the developer's payment option in the External Payments\n * side-by-side choice dialog during purchase flow.\n *\n * Requires Google Play Billing Library 8.3.0+ and is currently only available in Japan.\n *\n * @param listener - Callback function that receives the external transaction token\n * @returns EventSubscription that can be used to unsubscribe\n *\n * @example\n * ```typescript\n * const subscription = developerProvidedBillingListenerAndroid(async (details) => {\n * console.log('User selected developer billing');\n * console.log('Token:', details.externalTransactionToken);\n *\n * // Process payment with your payment gateway\n * await processPaymentWithYourGateway(details.externalTransactionToken);\n *\n * // IMPORTANT: Report the token to Google Play within 24 hours\n * await reportExternalTransactionToGoogle(details.externalTransactionToken);\n * });\n *\n * // Later, clean up\n * subscription.remove();\n * ```\n *\n * @platform Android (8.3.0+, Japan only)\n */\nexport const developerProvidedBillingListenerAndroid = (\n listener: (details: DeveloperProvidedBillingDetailsAndroid) => void,\n) => {\n if (Platform.OS !== 'android') {\n ExpoIapConsole.warn(\n 'developerProvidedBillingListenerAndroid: This listener is only available on Android',\n );\n return {remove: () => {}};\n }\n return emitter.addListener(\n OpenIapEvent.DeveloperProvidedBillingAndroid,\n listener,\n );\n};\n\n/**\n * Listen for subscription billing-issue events (cross-platform).\n *\n * Fires when a user's active subscription enters a state that needs attention\n * for a payment problem. Unifies:\n * - iOS 18+ / Mac Catalyst 18+: StoreKit 2 `Message.Reason.billingIssue`.\n * - Android (Play Billing 8.1+): when `Purchase.isSuspendedAndroid === true`.\n * - Meta Horizon / iOS 17 / older platforms: never fires.\n *\n * Recommended UX: call `deepLinkToSubscriptions()` when this fires so the user\n * can update their payment method in the platform subscription center.\n *\n * @example\n * ```typescript\n * const subscription = subscriptionBillingIssueListener((purchase) => {\n * console.warn('Needs attention:', purchase.productId);\n * deepLinkToSubscriptions({\n * skuAndroid: purchase.productId,\n * packageNameAndroid: 'com.example.app',\n * });\n * });\n * ```\n */\nexport const subscriptionBillingIssueListener = (\n listener: (purchase: Purchase) => void,\n) => {\n // Mirror purchaseUpdatedListener's platform normalization so consumers get\n // a consistent payload regardless of native casing.\n const wrappedListener = (event: Purchase) => {\n listener(normalizePurchasePlatform(event));\n };\n return emitter.addListener(\n OpenIapEvent.SubscriptionBillingIssue,\n wrappedListener,\n );\n};\n\nexport const initConnection: MutationField<'initConnection'> = async (config) =>\n ExpoIapModule.initConnection(config ?? null);\n\nexport const endConnection: MutationField<'endConnection'> = async () =>\n ExpoIapModule.endConnection();\n\n/**\n * Fetch products with unified API (v2.7.0+)\n *\n * @param request - Product fetch configuration\n * @param request.skus - Array of product SKUs to fetch\n * @param request.type - Product query type: 'in-app', 'subs', or 'all'\n */\nexport const fetchProducts: QueryField<'fetchProducts'> = async (request) => {\n ExpoIapConsole.debug('fetchProducts called with:', request);\n const {skus, type} = request ?? {};\n\n if (!Array.isArray(skus) || skus.length === 0) {\n throw createPurchaseError({\n message: 'No SKUs provided',\n code: ErrorCode.EmptySkuList,\n });\n }\n\n const {canonical, native} = normalizeProductType(\n type as ProductTypeInput | undefined,\n );\n const skuSet = new Set(skus);\n\n const filterIosItems = (\n items: unknown[],\n ): (Product | ProductSubscription)[] =>\n items.filter((item): item is Product | ProductSubscription => {\n if (!isProductIOS(item)) {\n return false;\n }\n const candidate = item as Product | ProductSubscription;\n return typeof candidate.id === 'string' && skuSet.has(candidate.id);\n });\n\n const filterAndroidItems = (\n items: unknown[],\n ): (Product | ProductSubscription)[] =>\n items.filter((item): item is Product | ProductSubscription => {\n if (!isProductAndroid(item)) {\n return false;\n }\n const candidate = item as Product | ProductSubscription;\n return typeof candidate.id === 'string' && skuSet.has(candidate.id);\n });\n\n const castResult = (\n items: (Product | ProductSubscription)[],\n ):\n | (Product | ProductSubscription)[]\n | Product[]\n | ProductSubscription[]\n | null => {\n if (canonical === 'in-app') {\n return items as Product[];\n }\n if (canonical === 'subs') {\n return items as ProductSubscription[];\n }\n // For 'all' type, items contain both Product and ProductSubscription\n // Return as ProductOrSubscription[] to preserve discriminated union\n return items;\n };\n\n if (Platform.OS === 'ios') {\n const rawItems = await ExpoIapModule.fetchProducts({skus, type: native});\n return castResult(filterIosItems(rawItems));\n }\n\n if (Platform.OS === 'android') {\n const rawItems = await ExpoIapModule.fetchProducts(native, skus);\n return castResult(filterAndroidItems(rawItems));\n }\n\n throw new Error('Unsupported platform');\n};\n\nexport const getAvailablePurchases: QueryField<\n 'getAvailablePurchases'\n> = async (options) => {\n const normalizedOptions: PurchaseOptions = {\n alsoPublishToEventListenerIOS:\n options?.alsoPublishToEventListenerIOS ?? false,\n onlyIncludeActiveItemsIOS: options?.onlyIncludeActiveItemsIOS ?? true,\n includeSuspendedAndroid: options?.includeSuspendedAndroid ?? false,\n };\n\n const resolvePurchases: () => Promise<Purchase[]> =\n Platform.select({\n ios: () =>\n ExpoIapModule.getAvailableItems(\n normalizedOptions.alsoPublishToEventListenerIOS,\n normalizedOptions.onlyIncludeActiveItemsIOS,\n ) as Promise<Purchase[]>,\n android: () =>\n ExpoIapModule.getAvailableItems(normalizedOptions) as Promise<\n Purchase[]\n >,\n }) ?? (() => Promise.resolve([] as Purchase[]));\n\n const purchases = await resolvePurchases();\n return normalizePurchaseArray(purchases as Purchase[]);\n};\n\n/**\n * Get all active subscriptions with detailed information.\n * Uses native OpenIAP module for accurate subscription status and renewal info.\n *\n * On iOS: Returns subscriptions with renewalInfoIOS containing pendingUpgradeProductId,\n * willAutoRenew, autoRenewPreference, and other renewal details.\n *\n * On Android: Filters available purchases to find active subscriptions (fallback implementation).\n *\n * @param subscriptionIds - Optional array of subscription product IDs to filter. If not provided, returns all active subscriptions.\n * @returns Promise resolving to array of active subscriptions with details\n *\n * @example\n * ```typescript\n * // Get all active subscriptions\n * const subs = await getActiveSubscriptions();\n *\n * // Get specific subscriptions\n * const premiumSubs = await getActiveSubscriptions(['premium', 'premium_year']);\n *\n * // Check for pending upgrades (iOS)\n * subs.forEach(sub => {\n * if (sub.renewalInfoIOS?.pendingUpgradeProductId) {\n * console.log(`Upgrade pending to: ${sub.renewalInfoIOS.pendingUpgradeProductId}`);\n * }\n * });\n * ```\n */\nexport const getActiveSubscriptions: QueryField<\n 'getActiveSubscriptions'\n> = async (subscriptionIds) => {\n const result = await ExpoIapModule.getActiveSubscriptions(\n subscriptionIds ?? null,\n );\n return (result ?? []) as ActiveSubscription[];\n};\n\n/**\n * Check if user has any active subscriptions.\n *\n * @param subscriptionIds - Optional array of subscription product IDs to check. If not provided, checks all subscriptions.\n * @returns Promise resolving to true if user has at least one active subscription\n *\n * @example\n * ```typescript\n * // Check any active subscription\n * const hasAny = await hasActiveSubscriptions();\n *\n * // Check specific subscriptions\n * const hasPremium = await hasActiveSubscriptions(['premium', 'premium_year']);\n * ```\n */\nexport const hasActiveSubscriptions: QueryField<\n 'hasActiveSubscriptions'\n> = async (subscriptionIds) => {\n return !!(await ExpoIapModule.hasActiveSubscriptions(\n subscriptionIds ?? null,\n ));\n};\n\nexport const getStorefront: QueryField<'getStorefront'> = async () => {\n if (Platform.OS !== 'ios' && Platform.OS !== 'android') {\n return '';\n }\n return ExpoIapModule.getStorefront();\n};\n\n/**\n * Helper to normalize request props to platform-specific format\n */\nfunction normalizeRequestProps(\n request: RequestPurchasePropsByPlatforms,\n platform: 'ios',\n): RequestPurchaseIosProps | null | undefined;\nfunction normalizeRequestProps(\n request: RequestPurchasePropsByPlatforms,\n platform: 'android',\n): RequestPurchaseAndroidProps | null | undefined;\nfunction normalizeRequestProps(\n request: RequestSubscriptionPropsByPlatforms,\n platform: 'ios',\n): RequestSubscriptionIosProps | null | undefined;\nfunction normalizeRequestProps(\n request: RequestSubscriptionPropsByPlatforms,\n platform: 'android',\n): RequestSubscriptionAndroidProps | null | undefined;\nfunction normalizeRequestProps(\n request:\n | RequestPurchasePropsByPlatforms\n | RequestSubscriptionPropsByPlatforms,\n platform: 'ios' | 'android',\n) {\n // Support both new (apple/google) and legacy (ios/android) field names\n // New fields take precedence over deprecated ones\n if (platform === 'ios') {\n return request.apple ?? request.ios;\n }\n return request.google ?? request.android;\n}\n\n/**\n * Request a purchase for products or subscriptions.\n *\n * @param requestObj - Purchase request configuration\n * @param requestObj.request - Store-specific purchase parameters\n * @param requestObj.type - Type of purchase: 'in-app' for products (default) or 'subs' for subscriptions\n *\n * @example\n * ```typescript\n * // Product purchase (recommended: use apple/google)\n * await requestPurchase({\n * request: {\n * apple: { sku: productId },\n * google: { skus: [productId] }\n * },\n * type: 'in-app'\n * });\n *\n * // Subscription purchase\n * await requestPurchase({\n * request: {\n * apple: { sku: subscriptionId },\n * google: {\n * skus: [subscriptionId],\n * subscriptionOffers: [{ sku: subscriptionId, offerToken: 'token' }]\n * }\n * },\n * type: 'subs'\n * });\n *\n * // Legacy format (deprecated, but still supported)\n * await requestPurchase({\n * request: {\n * ios: { sku: productId },\n * android: { skus: [productId] }\n * },\n * type: 'in-app'\n * });\n * ```\n */\nexport const requestPurchase: MutationField<'requestPurchase'> = async (\n args,\n) => {\n const {request, type} = args;\n const {canonical, native} = normalizeProductType(type as ProductTypeInput);\n const isInAppPurchase = canonical === 'in-app';\n\n if (Platform.OS === 'ios') {\n const normalizedRequest = normalizeRequestProps(request, 'ios');\n\n if (!normalizedRequest?.sku) {\n throw new Error(\n 'Invalid request for Apple. The `sku` property is required and must be a string.\\n\\n' +\n 'Expected format:\\n' +\n ' requestPurchase({\\n' +\n ' request: {\\n' +\n ' apple: { sku: \"product_id\" },\\n' +\n ' google: { skus: [\"product_id\"] }\\n' +\n ' },\\n' +\n ' type: \"in-app\"\\n' +\n ' })\\n\\n' +\n 'See: https://hyochan.github.io/expo-iap/docs/api/methods/core-methods#requestpurchase',\n );\n }\n\n if (canonical !== 'in-app' && canonical !== 'subs') {\n throw new Error(`Unsupported product type: ${canonical}`);\n }\n\n const payload: MutationRequestPurchaseArgs = {\n type: canonical === 'in-app' ? 'in-app' : 'subs',\n request: {ios: normalizedRequest},\n useAlternativeBilling: args.useAlternativeBilling,\n };\n\n const purchase = (await ExpoIapModule.requestPurchase(payload)) as\n | Purchase\n | Purchase[]\n | null;\n\n if (Array.isArray(purchase)) {\n return normalizePurchaseArray(purchase);\n }\n\n if (purchase) {\n return normalizePurchasePlatform(purchase);\n }\n\n return canonical === 'subs' ? [] : null;\n }\n\n if (Platform.OS === 'android') {\n if (isInAppPurchase) {\n const normalizedRequest = normalizeRequestProps(\n request as RequestPurchasePropsByPlatforms,\n 'android',\n ) as RequestPurchaseAndroidProps | null | undefined;\n\n if (!normalizedRequest?.skus?.length) {\n throw new Error(\n 'Invalid request for Google. The `skus` property is required and must be a non-empty array.\\n\\n' +\n 'Expected format:\\n' +\n ' requestPurchase({\\n' +\n ' request: {\\n' +\n ' apple: { sku: \"product_id\" },\\n' +\n ' google: { skus: [\"product_id\"] }\\n' +\n ' },\\n' +\n ' type: \"in-app\"\\n' +\n ' })\\n\\n' +\n 'See: https://hyochan.github.io/expo-iap/docs/api/methods/core-methods#requestpurchase',\n );\n }\n\n const {\n skus,\n obfuscatedAccountId,\n obfuscatedProfileId,\n isOfferPersonalized,\n offerToken,\n } = normalizedRequest;\n\n const result = (await ExpoIapModule.requestPurchase({\n type: native,\n skuArr: skus,\n purchaseToken: undefined,\n replacementMode: -1,\n obfuscatedAccountId: obfuscatedAccountId,\n obfuscatedProfileId: obfuscatedProfileId,\n offerToken: offerToken,\n offerTokenArr: [],\n isOfferPersonalized: isOfferPersonalized ?? false,\n })) as Purchase[];\n\n return normalizePurchaseArray(result);\n }\n\n if (canonical === 'subs') {\n const normalizedRequest = normalizeRequestProps(\n request as RequestSubscriptionPropsByPlatforms,\n 'android',\n ) as RequestSubscriptionAndroidProps | null | undefined;\n\n if (!normalizedRequest?.skus?.length) {\n throw new Error(\n 'Invalid request for Google. The `skus` property is required and must be a non-empty array.\\n\\n' +\n 'Expected format:\\n' +\n ' requestPurchase({\\n' +\n ' request: {\\n' +\n ' apple: { sku: \"subscription_id\" },\\n' +\n ' google: { skus: [\"subscription_id\"] }\\n' +\n ' },\\n' +\n ' type: \"subs\"\\n' +\n ' })\\n\\n' +\n 'See: https://hyochan.github.io/expo-iap/docs/api/methods/core-methods#requestpurchase',\n );\n }\n\n const {\n skus,\n obfuscatedAccountId,\n obfuscatedProfileId,\n isOfferPersonalized,\n subscriptionOffers,\n replacementMode: replacementModeInput,\n purchaseToken: purchaseTokenInput,\n subscriptionProductReplacementParams,\n } = normalizedRequest;\n\n const normalizedOffers = subscriptionOffers ?? [];\n const replacementMode = replacementModeInput ?? -1;\n const purchaseToken = purchaseTokenInput ?? undefined;\n\n const result = (await ExpoIapModule.requestPurchase({\n type: native,\n skuArr: skus,\n purchaseToken,\n replacementMode,\n obfuscatedAccountId: obfuscatedAccountId,\n obfuscatedProfileId: obfuscatedProfileId,\n offerTokenArr: normalizedOffers.map(\n (offer: AndroidSubscriptionOfferInput) => offer.offerToken,\n ),\n subscriptionOffers: normalizedOffers,\n isOfferPersonalized: isOfferPersonalized ?? false,\n subscriptionProductReplacementParams:\n subscriptionProductReplacementParams ?? undefined,\n })) as Purchase[];\n\n return normalizePurchaseArray(result);\n }\n\n throw new Error(\n \"Invalid request for Android: Expected a valid request object with 'skus' array.\",\n );\n }\n\n throw new Error('Platform not supported');\n};\n\nexport const finishTransaction: MutationField<'finishTransaction'> = async ({\n purchase,\n isConsumable = false,\n}) => {\n if (Platform.OS === 'ios') {\n await ExpoIapModule.finishTransaction(purchase, isConsumable);\n return;\n }\n\n if (Platform.OS === 'android') {\n const token = purchase.purchaseToken ?? undefined;\n\n if (!token) {\n throw createPurchaseError({\n message: 'Purchase token is required to finish transaction',\n code: ErrorCode.DeveloperError,\n productId: purchase.productId,\n platform: 'android',\n });\n }\n\n if (isConsumable) {\n await ExpoIapModule.consumePurchaseAndroid(token);\n return;\n }\n\n await ExpoIapModule.acknowledgePurchaseAndroid(token);\n return;\n }\n\n throw new Error('Unsupported Platform');\n};\n\n/**\n * Restore completed transactions (cross-platform behavior)\n *\n * - iOS: perform a lightweight sync to refresh transactions and ignore sync errors,\n * then fetch available purchases to surface restored items to the app.\n * - Android: simply fetch available purchases (restoration happens via query).\n *\n * This helper triggers the refresh flows but does not return the purchases; consumers should\n * call `getAvailablePurchases` or rely on hook state to inspect the latest items.\n */\nexport const restorePurchases: MutationField<'restorePurchases'> = async () => {\n if (Platform.OS === 'ios') {\n await syncIOS().catch(() => undefined);\n }\n\n await getAvailablePurchases({\n alsoPublishToEventListenerIOS: false,\n onlyIncludeActiveItemsIOS: true,\n });\n};\n\n/**\n * Deeplinks to native interface that allows users to manage their subscriptions\n * @param options.skuAndroid - Required for Android to locate specific subscription (ignored on iOS)\n * @param options.packageNameAndroid - Required for Android to identify your app (ignored on iOS)\n *\n * @returns Promise that resolves when the deep link is successfully opened\n *\n * @throws {Error} When called on unsupported platform or when required Android parameters are missing\n *\n * @example\n * import { deepLinkToSubscriptions } from 'expo-iap';\n *\n * // Works on both iOS and Android\n * await deepLinkToSubscriptions({\n * skuAndroid: 'your_subscription_sku',\n * packageNameAndroid: 'com.example.app'\n * });\n */\nexport const deepLinkToSubscriptions: MutationField<\n 'deepLinkToSubscriptions'\n> = async (options) => {\n if (Platform.OS === 'ios') {\n await deepLinkToSubscriptionsIOS();\n return;\n }\n\n if (Platform.OS === 'android') {\n await deepLinkToSubscriptionsAndroid((options as DeepLinkOptions) ?? null);\n return;\n }\n\n throw new Error(`Unsupported platform: ${Platform.OS}`);\n};\n\n/**\n * Internal receipt validation function (NOT RECOMMENDED for production use)\n *\n * WARNING: This function performs client-side validation which is NOT secure.\n * For production apps, always validate receipts on your secure server:\n * - iOS: Send receipt data to Apple's verification endpoint from your server\n * - Android: Use Google Play Developer API with service account credentials\n *\n * @deprecated Use verifyPurchase instead\n */\nexport const validateReceipt: MutationField<'validateReceipt'> = async (\n options,\n) => {\n const {apple, google} = options as MutationValidateReceiptArgs;\n\n if (Platform.OS === 'ios') {\n if (!apple?.sku) {\n throw new Error('iOS validation requires apple.sku');\n }\n return validateReceiptIOS({apple: {sku: apple.sku}});\n }\n\n if (Platform.OS === 'android') {\n if (\n !google ||\n !google.sku ||\n !google.packageName ||\n !google.purchaseToken ||\n !google.accessToken\n ) {\n throw new Error(\n 'Android validation requires google.sku, google.packageName, google.purchaseToken, and google.accessToken',\n );\n }\n return validateReceiptAndroid({\n packageName: google.packageName,\n productId: google.sku,\n productToken: google.purchaseToken,\n accessToken: google.accessToken,\n isSub: google.isSub ?? undefined,\n });\n }\n\n throw new Error('Platform not supported');\n};\n\n/**\n * Verify purchase with the configured providers\n *\n * This function uses the native OpenIAP verifyPurchase implementation\n * which validates purchases using platform-specific methods.\n *\n * @param options - Receipt validation options containing the SKU\n * @returns Promise resolving to receipt validation result\n */\nexport const verifyPurchase: MutationField<'verifyPurchase'> = async (\n options,\n) => {\n if (Platform.OS === 'ios' || Platform.OS === 'android') {\n return ExpoIapModule.verifyPurchase(options);\n }\n\n throw new Error(`Unsupported platform: ${Platform.OS}`);\n};\n\n/**\n * Verify purchase with a specific provider (e.g., IAPKit)\n *\n * This function allows you to verify purchases using external verification\n * services like IAPKit, which provide additional validation and security.\n *\n * @param options - Verification options including provider and credentials\n * @returns Promise resolving to provider-specific verification result\n *\n * @example\n * ```typescript\n * const result = await verifyPurchaseWithProvider({\n * provider: 'iapkit',\n * iapkit: {\n * apiKey: 'your-api-key',\n * apple: {\n * jws: purchase.purchaseToken // JWS from purchase\n * },\n * google: {\n * purchaseToken: purchase.purchaseToken\n * }\n * }\n * });\n * ```\n */\nexport const verifyPurchaseWithProvider: MutationField<\n 'verifyPurchaseWithProvider'\n> = async (options) => {\n if (Platform.OS === 'ios' || Platform.OS === 'android') {\n // Auto-fill apiKey from config if not provided and provider is iapkit\n if (\n options.provider === 'iapkit' &&\n options.iapkit &&\n !options.iapkit.apiKey\n ) {\n try {\n // Dynamically import expo-constants to avoid hard dependency\n const {default: Constants} = await import('expo-constants');\n const configApiKey = Constants.expoConfig?.extra?.iapkitApiKey;\n if (configApiKey) {\n options = {\n ...options,\n iapkit: {\n ...options.iapkit,\n apiKey: configApiKey,\n },\n };\n }\n } catch {\n throw new Error(\n 'expo-constants is required for auto-filling iapkitApiKey from config. ' +\n 'Please install it: npx expo install expo-constants\\n' +\n 'Or provide apiKey directly in verifyPurchaseWithProvider options.',\n );\n }\n }\n return ExpoIapModule.verifyPurchaseWithProvider(options);\n }\n\n throw new Error(`Unsupported platform: ${Platform.OS}`);\n};\n\nexport * from './useIAP';\nexport {\n ErrorCodeUtils,\n ErrorCodeMapping,\n createPurchaseError,\n createPurchaseErrorFromPlatform,\n} from './utils/errorMapping';\nexport type {\n PurchaseError as ExpoPurchaseError,\n PurchaseErrorProps,\n} from './utils/errorMapping';\nexport {ExpoIapConsole} from './utils/debug';\n"]}
|
package/build/types.d.ts
CHANGED
|
@@ -419,7 +419,7 @@ export interface ExternalPurchaseNoticeResultIOS {
|
|
|
419
419
|
result: ExternalPurchaseNoticeAction;
|
|
420
420
|
}
|
|
421
421
|
export type FetchProductsResult = ProductOrSubscription[] | Product[] | ProductSubscription[] | null;
|
|
422
|
-
export type IapEvent = 'purchase-updated' | 'purchase-error' | 'promoted-product-ios' | 'user-choice-billing-android' | 'developer-provided-billing-android';
|
|
422
|
+
export type IapEvent = 'purchase-updated' | 'purchase-error' | 'promoted-product-ios' | 'user-choice-billing-android' | 'developer-provided-billing-android' | 'subscription-billing-issue';
|
|
423
423
|
export type IapPlatform = 'ios' | 'android';
|
|
424
424
|
export type IapStore = 'unknown' | 'apple' | 'google' | 'horizon';
|
|
425
425
|
/** Unified purchase states from IAPKit verification response. */
|
|
@@ -1427,6 +1427,20 @@ export interface Subscription {
|
|
|
1427
1427
|
purchaseError: PurchaseError;
|
|
1428
1428
|
/** Fires when a purchase completes successfully or a pending purchase resolves */
|
|
1429
1429
|
purchaseUpdated: Purchase;
|
|
1430
|
+
/**
|
|
1431
|
+
* Fires when an active subscription enters a billing-issue state that needs user action
|
|
1432
|
+
* (payment method failed, card expired, etc.). Cross-platform unification:
|
|
1433
|
+
*
|
|
1434
|
+
* - iOS 18+: delivered via StoreKit 2 `Message.Reason.billingIssue`.
|
|
1435
|
+
* - Android (Play flavor, Billing 8.1+): emitted when `isSuspended == true` is first detected
|
|
1436
|
+
* on a previously healthy subscription. Requires Google Play Billing Library 8.1.0 or newer.
|
|
1437
|
+
* - Android (Horizon flavor): NOT emitted. The Horizon Billing Compatibility SDK implements
|
|
1438
|
+
* the Play Billing 7.0 API surface which does not expose a suspended-subscription signal.
|
|
1439
|
+
*
|
|
1440
|
+
* Listeners should not assume the event will fire on every store. Direct users to the
|
|
1441
|
+
* platform subscription management UI (`deepLinkToSubscriptions`) to resolve the issue.
|
|
1442
|
+
*/
|
|
1443
|
+
subscriptionBillingIssue: Purchase;
|
|
1430
1444
|
/**
|
|
1431
1445
|
* Fires when a user selects alternative billing in the User Choice Billing dialog (Android only)
|
|
1432
1446
|
* Only triggered when the user selects alternative billing instead of Google Play billing
|
|
@@ -1784,6 +1798,7 @@ export type SubscriptionArgsMap = {
|
|
|
1784
1798
|
promotedProductIOS: never;
|
|
1785
1799
|
purchaseError: never;
|
|
1786
1800
|
purchaseUpdated: never;
|
|
1801
|
+
subscriptionBillingIssue: never;
|
|
1787
1802
|
userChoiceBillingAndroid: never;
|
|
1788
1803
|
};
|
|
1789
1804
|
export type SubscriptionField<K extends keyof Subscription> = SubscriptionArgsMap[K] extends never ? () => NonNullable<Subscription[K]> : undefined extends SubscriptionArgsMap[K] ? (args?: SubscriptionArgsMap[K]) => NonNullable<Subscription[K]> : (args: SubscriptionArgsMap[K]) => NonNullable<Subscription[K]>;
|
package/build/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC,mBAAmB,CAAC,EAAE,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IACvC,iBAAiB,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACpC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAChC,sBAAsB,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACzC,cAAc,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACjC,iBAAiB,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACpC,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAChC,6DAA6D;IAC7D,oBAAoB,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACvC;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACzC,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;CACnC;AAED;;;;;GAKG;AACH,MAAM,MAAM,6BAA6B,GAAG,MAAM,GAAG,aAAa,GAAG,kBAAkB,CAAC;AAExF,MAAM,WAA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7B,oDAAuC,CAAA;IACvC,qCAAwB,CAAA;IACxB,0EAA6D,CAAA;IAC7D,gCAAmB,CAAA;IACnB,6CAAgC,CAAA;IAChC,qCAAwB,CAAA;AAC1B,CAAC,EAxCW,SAAS,KAAT,SAAS,QAwCpB;AAolDD,mCAAmC","sourcesContent":["// ============================================================================\n// AUTO-GENERATED TYPES — DO NOT EDIT DIRECTLY\n// Run `npm run generate` after updating any *.graphql schema file.\n// ============================================================================\n\nexport interface ActiveSubscription {\n autoRenewingAndroid?: (boolean | null);\n basePlanIdAndroid?: (string | null);\n /**\n * The current plan identifier. This is:\n * - On Android: the basePlanId (e.g., \"premium\", \"premium-year\")\n * - On iOS: the productId (e.g., \"com.example.premium_monthly\", \"com.example.premium_yearly\")\n * This provides a unified way to identify which specific plan/tier the user is subscribed to.\n */\n currentPlanId?: (string | null);\n daysUntilExpirationIOS?: (number | null);\n environmentIOS?: (string | null);\n expirationDateIOS?: (number | null);\n isActive: boolean;\n productId: string;\n purchaseToken?: (string | null);\n /** Required for subscription upgrade/downgrade on Android */\n purchaseTokenAndroid?: (string | null);\n /**\n * Renewal information from StoreKit 2 (iOS only). Contains details about subscription renewal status,\n * pending upgrades/downgrades, and auto-renewal preferences.\n */\n renewalInfoIOS?: (RenewalInfoIOS | null);\n transactionDate: number;\n transactionId: string;\n /**\n * @deprecated iOS only - use daysUntilExpirationIOS instead.\n * Whether the subscription will expire soon (within 7 days).\n * Consider using daysUntilExpirationIOS for more precise control.\n */\n willExpireSoon?: (boolean | null);\n}\n\n/**\n * Alternative billing mode for Android\n * Controls which billing system is used\n * @deprecated Use enableBillingProgramAndroid with BillingProgramAndroid instead.\n * Use USER_CHOICE_BILLING for user choice billing, EXTERNAL_OFFER for alternative only.\n */\nexport type AlternativeBillingModeAndroid = 'none' | 'user-choice' | 'alternative-only';\n\nexport interface AndroidSubscriptionOfferInput {\n /** Offer token */\n offerToken: string;\n /** Product SKU */\n sku: string;\n}\n\nexport interface AppTransaction {\n appId: number;\n appTransactionId?: (string | null);\n appVersion: string;\n appVersionId: number;\n bundleId: string;\n deviceVerification: string;\n deviceVerificationNonce: string;\n environment: string;\n originalAppVersion: string;\n originalPlatform?: (string | null);\n originalPurchaseDate: number;\n preorderDate?: (number | null);\n signedDate: number;\n}\n\n/**\n * Billing program types for external content links, external offers, and external payments (Android)\n * Available in Google Play Billing Library 8.2.0+, EXTERNAL_PAYMENTS added in 8.3.0\n */\nexport type BillingProgramAndroid = 'unspecified' | 'user-choice-billing' | 'external-content-link' | 'external-offer' | 'external-payments';\n\n/**\n * Result of checking billing program availability (Android)\n * Available in Google Play Billing Library 8.2.0+\n */\nexport interface BillingProgramAvailabilityResultAndroid {\n /** The billing program that was checked */\n billingProgram: BillingProgramAndroid;\n /** Whether the billing program is available for the user */\n isAvailable: boolean;\n}\n\n/**\n * Reporting details for transactions made outside of Google Play Billing (Android)\n * Contains the external transaction token needed for reporting\n * Available in Google Play Billing Library 8.2.0+\n */\nexport interface BillingProgramReportingDetailsAndroid {\n /** The billing program that the reporting details are associated with */\n billingProgram: BillingProgramAndroid;\n /**\n * External transaction token used to report transactions made outside of Google Play Billing.\n * This token must be used when reporting the external transaction to Google.\n */\n externalTransactionToken: string;\n}\n\n/**\n * Extended billing result with sub-response code (Android)\n * Available in Google Play Billing Library 8.0.0+\n */\nexport interface BillingResultAndroid {\n /** Debug message from the billing library */\n debugMessage?: (string | null);\n /** The response code from the billing operation */\n responseCode: number;\n /**\n * Sub-response code for more granular error information (8.0+).\n * Provides additional context when responseCode indicates an error.\n */\n subResponseCode?: (SubResponseCodeAndroid | null);\n}\n\nexport interface DeepLinkOptions {\n /** Android package name to target (required on Android) */\n packageNameAndroid?: (string | null);\n /** Android SKU to open (required on Android) */\n skuAndroid?: (string | null);\n}\n\n/**\n * Launch mode for developer billing option (Android)\n * Determines how the external payment URL is launched\n * Available in Google Play Billing Library 8.3.0+\n */\nexport type DeveloperBillingLaunchModeAndroid = 'unspecified' | 'launch-in-external-browser-or-app' | 'caller-will-launch-link';\n\n/**\n * Parameters for developer billing option in purchase flow (Android)\n * Used with BillingFlowParams to enable external payments flow\n * Available in Google Play Billing Library 8.3.0+\n */\nexport interface DeveloperBillingOptionParamsAndroid {\n /** The billing program (should be EXTERNAL_PAYMENTS for external payments flow) */\n billingProgram: BillingProgramAndroid;\n /** The launch mode for the external payment link */\n launchMode: DeveloperBillingLaunchModeAndroid;\n /** The URI where the external payment will be processed */\n linkUri: string;\n}\n\n/**\n * Details provided when user selects developer billing option (Android)\n * Received via DeveloperProvidedBillingListener callback\n * Available in Google Play Billing Library 8.3.0+\n */\nexport interface DeveloperProvidedBillingDetailsAndroid {\n /**\n * External transaction token used to report transactions made through developer billing.\n * This token must be used when reporting the external transaction to Google Play.\n * Must be reported within 24 hours of the transaction.\n */\n externalTransactionToken: string;\n}\n\n/**\n * Discount amount details for one-time purchase offers (Android)\n * Available in Google Play Billing Library 7.0+\n */\nexport interface DiscountAmountAndroid {\n /** Discount amount in micro-units (1,000,000 = 1 unit of currency) */\n discountAmountMicros: string;\n /** Formatted discount amount with currency sign (e.g., \"$4.99\") */\n formattedDiscountAmount: string;\n}\n\n/**\n * Discount display information for one-time purchase offers (Android)\n * Available in Google Play Billing Library 7.0+\n */\nexport interface DiscountDisplayInfoAndroid {\n /**\n * Absolute discount amount details\n * Only returned for fixed amount discounts\n */\n discountAmount?: (DiscountAmountAndroid | null);\n /**\n * Percentage discount (e.g., 33 for 33% off)\n * Only returned for percentage-based discounts\n */\n percentageDiscount?: (number | null);\n}\n\n/**\n * Discount information returned from the store.\n * @deprecated Use the standardized SubscriptionOffer type instead for cross-platform compatibility.\n * @see https://openiap.dev/docs/types#subscription-offer\n */\nexport interface DiscountIOS {\n identifier: string;\n localizedPrice?: (string | null);\n numberOfPeriods: number;\n paymentMode: PaymentModeIOS;\n price: string;\n priceAmount: number;\n subscriptionPeriod: string;\n type: string;\n}\n\n/**\n * Standardized one-time product discount offer.\n * Provides a unified interface for one-time purchase discounts across platforms.\n *\n * Currently supported on Android (Google Play Billing 7.0+).\n * iOS does not support one-time purchase discounts in the same way.\n *\n * @see https://openiap.dev/docs/features/discount\n */\nexport interface DiscountOffer {\n /** Currency code (ISO 4217, e.g., \"USD\") */\n currency: string;\n /**\n * [Android] Fixed discount amount in micro-units.\n * Only present for fixed amount discounts.\n */\n discountAmountMicrosAndroid?: (string | null);\n /** Formatted display price string (e.g., \"$4.99\") */\n displayPrice: string;\n /** [Android] Formatted discount amount string (e.g., \"$5.00 OFF\"). */\n formattedDiscountAmountAndroid?: (string | null);\n /**\n * [Android] Original full price in micro-units before discount.\n * Divide by 1,000,000 to get the actual price.\n * Use for displaying strikethrough original price.\n */\n fullPriceMicrosAndroid?: (string | null);\n /**\n * Unique identifier for the offer.\n * - iOS: Not applicable (one-time discounts not supported)\n * - Android: offerId from ProductAndroidOneTimePurchaseOfferDetail\n */\n id?: (string | null);\n /**\n * [Android] Limited quantity information.\n * Contains maximumQuantity and remainingQuantity.\n */\n limitedQuantityInfoAndroid?: (LimitedQuantityInfoAndroid | null);\n /** [Android] List of tags associated with this offer. */\n offerTagsAndroid?: (string[] | null);\n /**\n * [Android] Offer token required for purchase.\n * Must be passed to requestPurchase() when purchasing with this offer.\n */\n offerTokenAndroid?: (string | null);\n /**\n * [Android] Percentage discount (e.g., 33 for 33% off).\n * Only present for percentage-based discounts.\n */\n percentageDiscountAndroid?: (number | null);\n /**\n * [Android] Pre-order details if this is a pre-order offer.\n * Available in Google Play Billing Library 8.1.0+\n */\n preorderDetailsAndroid?: (PreorderDetailsAndroid | null);\n /** Numeric price value */\n price: number;\n /**\n * [Android] Purchase option ID for this offer.\n * Used to identify which purchase option the user selected.\n * Available in Google Play Billing Library 7.0+\n */\n purchaseOptionIdAndroid?: (string | null);\n /** [Android] Rental details if this is a rental offer. */\n rentalDetailsAndroid?: (RentalDetailsAndroid | null);\n /** Type of discount offer */\n type: DiscountOfferType;\n /**\n * [Android] Valid time window for the offer.\n * Contains startTimeMillis and endTimeMillis.\n */\n validTimeWindowAndroid?: (ValidTimeWindowAndroid | null);\n}\n\n/**\n * iOS DiscountOffer (output type).\n * @deprecated Use the standardized SubscriptionOffer type instead for cross-platform compatibility.\n * @see https://openiap.dev/docs/types#subscription-offer\n */\nexport interface DiscountOfferIOS {\n /** Discount identifier */\n identifier: string;\n /** Key identifier for validation */\n keyIdentifier: string;\n /** Cryptographic nonce */\n nonce: string;\n /** Signature for validation */\n signature: string;\n /** Timestamp of discount offer */\n timestamp: number;\n}\n\nexport interface DiscountOfferInputIOS {\n /** Discount identifier */\n identifier: string;\n /** Key identifier for validation */\n keyIdentifier: string;\n /** Cryptographic nonce */\n nonce: string;\n /** Signature for validation */\n signature: string;\n /** Timestamp of discount offer */\n timestamp: number;\n}\n\n/**\n * Discount offer type enumeration.\n * Categorizes the type of discount or promotional offer.\n */\nexport type DiscountOfferType = 'introductory' | 'promotional' | 'one-time';\n\nexport interface EntitlementIOS {\n jsonRepresentation: string;\n sku: string;\n transactionId: string;\n}\n\nexport enum ErrorCode {\n ActivityUnavailable = 'activity-unavailable',\n AlreadyOwned = 'already-owned',\n AlreadyPrepared = 'already-prepared',\n BillingResponseJsonParseError = 'billing-response-json-parse-error',\n BillingUnavailable = 'billing-unavailable',\n ConnectionClosed = 'connection-closed',\n DeferredPayment = 'deferred-payment',\n DeveloperError = 'developer-error',\n DuplicatePurchase = 'duplicate-purchase',\n EmptySkuList = 'empty-sku-list',\n FeatureNotSupported = 'feature-not-supported',\n IapNotAvailable = 'iap-not-available',\n InitConnection = 'init-connection',\n Interrupted = 'interrupted',\n ItemNotOwned = 'item-not-owned',\n ItemUnavailable = 'item-unavailable',\n NetworkError = 'network-error',\n NotEnded = 'not-ended',\n NotPrepared = 'not-prepared',\n Pending = 'pending',\n PurchaseError = 'purchase-error',\n PurchaseVerificationFailed = 'purchase-verification-failed',\n PurchaseVerificationFinishFailed = 'purchase-verification-finish-failed',\n PurchaseVerificationFinished = 'purchase-verification-finished',\n QueryProduct = 'query-product',\n ReceiptFailed = 'receipt-failed',\n ReceiptFinished = 'receipt-finished',\n ReceiptFinishedFailed = 'receipt-finished-failed',\n RemoteError = 'remote-error',\n ServiceDisconnected = 'service-disconnected',\n ServiceError = 'service-error',\n ServiceTimeout = 'service-timeout',\n SkuNotFound = 'sku-not-found',\n SkuOfferMismatch = 'sku-offer-mismatch',\n SyncError = 'sync-error',\n TransactionValidationFailed = 'transaction-validation-failed',\n Unknown = 'unknown',\n UserCancelled = 'user-cancelled',\n UserError = 'user-error'\n}\n\n/**\n * Launch mode for external link flow (Android)\n * Determines how the external URL is launched\n * Available in Google Play Billing Library 8.2.0+\n */\nexport type ExternalLinkLaunchModeAndroid = 'unspecified' | 'launch-in-external-browser-or-app' | 'caller-will-launch-link';\n\n/**\n * Link type for external link flow (Android)\n * Specifies the type of external link destination\n * Available in Google Play Billing Library 8.2.0+\n */\nexport type ExternalLinkTypeAndroid = 'unspecified' | 'link-to-digital-content-offer' | 'link-to-app-download';\n\n/**\n * External offer availability result (Android)\n * @deprecated Use BillingProgramAvailabilityResultAndroid with isBillingProgramAvailableAsync instead\n * Available in Google Play Billing Library 6.2.0+, deprecated in 8.2.0\n */\nexport interface ExternalOfferAvailabilityResultAndroid {\n /** Whether external offers are available for the user */\n isAvailable: boolean;\n}\n\n/**\n * External offer reporting details (Android)\n * @deprecated Use BillingProgramReportingDetailsAndroid with createBillingProgramReportingDetailsAsync instead\n * Available in Google Play Billing Library 6.2.0+, deprecated in 8.2.0\n */\nexport interface ExternalOfferReportingDetailsAndroid {\n /** External transaction token for reporting external offer transactions */\n externalTransactionToken: string;\n}\n\n/** Result of showing ExternalPurchaseCustomLink notice (iOS 18.1+). */\nexport interface ExternalPurchaseCustomLinkNoticeResultIOS {\n /** Whether the user chose to continue to external purchase */\n continued: boolean;\n /** Optional error message if the presentation failed */\n error?: (string | null);\n}\n\n/**\n * Notice types for ExternalPurchaseCustomLink (iOS 18.1+).\n * Determines the style of disclosure notice to display.\n * Reference: https://developer.apple.com/documentation/storekit/externalpurchasecustomlink/noticetype\n */\nexport type ExternalPurchaseCustomLinkNoticeTypeIOS = 'browser';\n\n/** Result of requesting an ExternalPurchaseCustomLink token (iOS 18.1+). */\nexport interface ExternalPurchaseCustomLinkTokenResultIOS {\n /** Optional error message if token retrieval failed */\n error?: (string | null);\n /**\n * The external purchase token string.\n * Report this token to Apple's External Purchase Server API.\n */\n token?: (string | null);\n}\n\n/**\n * Token types for ExternalPurchaseCustomLink (iOS 18.1+).\n * Used to request different types of external purchase tokens for reporting to Apple.\n * Reference: https://developer.apple.com/documentation/storekit/externalpurchasecustomlink/token(for:)\n */\nexport type ExternalPurchaseCustomLinkTokenTypeIOS = 'acquisition' | 'services';\n\n/** Result of presenting an external purchase link */\nexport interface ExternalPurchaseLinkResultIOS {\n /** Optional error message if the presentation failed */\n error?: (string | null);\n /** Whether the user completed the external purchase flow */\n success: boolean;\n}\n\n/** User actions on external purchase notice sheet (iOS 17.4+) */\nexport type ExternalPurchaseNoticeAction = 'continue' | 'dismissed';\n\n/**\n * Result of presenting external purchase notice sheet (iOS 17.4+)\n * Returns the token when user continues to external purchase.\n */\nexport interface ExternalPurchaseNoticeResultIOS {\n /** Optional error message if the presentation failed */\n error?: (string | null);\n /**\n * External purchase token returned when user continues (iOS 17.4+).\n * This token should be reported to Apple's External Purchase Server API.\n * Only present when result is Continue.\n */\n externalPurchaseToken?: (string | null);\n /** Notice result indicating user action */\n result: ExternalPurchaseNoticeAction;\n}\n\nexport type FetchProductsResult = ProductOrSubscription[] | Product[] | ProductSubscription[] | null;\n\nexport type IapEvent = 'purchase-updated' | 'purchase-error' | 'promoted-product-ios' | 'user-choice-billing-android' | 'developer-provided-billing-android';\n\nexport type IapPlatform = 'ios' | 'android';\n\nexport type IapStore = 'unknown' | 'apple' | 'google' | 'horizon';\n\n/** Unified purchase states from IAPKit verification response. */\nexport type IapkitPurchaseState = 'entitled' | 'pending-acknowledgment' | 'pending' | 'canceled' | 'expired' | 'ready-to-consume' | 'consumed' | 'unknown' | 'inauthentic';\n\n/** Connection initialization configuration */\nexport interface InitConnectionConfig {\n /**\n * Alternative billing mode for Android\n * If not specified, defaults to NONE (standard Google Play billing)\n * @deprecated Use enableBillingProgramAndroid instead.\n * Use USER_CHOICE_BILLING for user choice billing, EXTERNAL_OFFER for alternative only.\n */\n alternativeBillingModeAndroid?: (AlternativeBillingModeAndroid | null);\n /**\n * Enable a specific billing program for Android (7.0+)\n * When set, enables the specified billing program for external transactions.\n * - USER_CHOICE_BILLING: User can select between Google Play or alternative (7.0+)\n * - EXTERNAL_CONTENT_LINK: Link to external content (8.2.0+)\n * - EXTERNAL_OFFER: External offers for digital content (8.2.0+)\n * - EXTERNAL_PAYMENTS: Developer provided billing, Japan only (8.3.0+)\n */\n enableBillingProgramAndroid?: (BillingProgramAndroid | null);\n}\n\n/**\n * Installment plan details for subscription offers (Android)\n * Contains information about the installment plan commitment.\n * Available in Google Play Billing Library 7.0+\n */\nexport interface InstallmentPlanDetailsAndroid {\n /**\n * Committed payments count after a user signs up for this subscription plan.\n * For example, for a monthly subscription with commitmentPaymentsCount of 12,\n * users will be charged monthly for 12 months after signup.\n */\n commitmentPaymentsCount: number;\n /**\n * Subsequent committed payments count after the subscription plan renews.\n * For example, for a monthly subscription with subsequentCommitmentPaymentsCount of 12,\n * users will be committed to another 12 monthly payments when the plan renews.\n * Returns 0 if the installment plan has no subsequent commitment (reverts to normal plan).\n */\n subsequentCommitmentPaymentsCount: number;\n}\n\n/**\n * Parameters for launching an external link (Android)\n * Used with launchExternalLink to initiate external offer or app install flows\n * Available in Google Play Billing Library 8.2.0+\n */\nexport interface LaunchExternalLinkParamsAndroid {\n /** The billing program (EXTERNAL_CONTENT_LINK or EXTERNAL_OFFER) */\n billingProgram: BillingProgramAndroid;\n /** The external link launch mode */\n launchMode: ExternalLinkLaunchModeAndroid;\n /** The type of the external link */\n linkType: ExternalLinkTypeAndroid;\n /** The URI where the content will be accessed from */\n linkUri: string;\n}\n\n/**\n * Limited quantity information for one-time purchase offers (Android)\n * Available in Google Play Billing Library 7.0+\n */\nexport interface LimitedQuantityInfoAndroid {\n /** Maximum quantity a user can purchase */\n maximumQuantity: number;\n /** Remaining quantity the user can still purchase */\n remainingQuantity: number;\n}\n\nexport interface Mutation {\n /** Acknowledge a non-consumable purchase or subscription */\n acknowledgePurchaseAndroid: Promise<boolean>;\n /** Initiate a refund request for a product (iOS 15+) */\n beginRefundRequestIOS?: Promise<(string | null)>;\n /**\n * Check if alternative billing is available for this user/device\n * Step 1 of alternative billing flow\n *\n * Returns true if available, false otherwise\n * Throws OpenIapError.NotPrepared if billing client not ready\n */\n checkAlternativeBillingAvailabilityAndroid: Promise<boolean>;\n /** Clear pending transactions from the StoreKit payment queue */\n clearTransactionIOS: Promise<boolean>;\n /** Consume a purchase token so it can be repurchased */\n consumePurchaseAndroid: Promise<boolean>;\n /**\n * Create external transaction token for Google Play reporting\n * Step 3 of alternative billing flow\n * Must be called AFTER successful payment in your payment system\n * Token must be reported to Google Play backend within 24 hours\n *\n * Returns token string, or null if creation failed\n * Throws OpenIapError.NotPrepared if billing client not ready\n */\n createAlternativeBillingTokenAndroid?: Promise<(string | null)>;\n /**\n * Create reporting details for a billing program\n * Replaces the deprecated createExternalOfferReportingDetailsAsync API\n *\n * Available in Google Play Billing Library 8.2.0+\n * Returns external transaction token needed for reporting external transactions\n * Throws OpenIapError.NotPrepared if billing client not ready\n */\n createBillingProgramReportingDetailsAndroid: Promise<BillingProgramReportingDetailsAndroid>;\n /** Open the native subscription management surface */\n deepLinkToSubscriptions: Promise<void>;\n /** Close the platform billing connection */\n endConnection: Promise<boolean>;\n /** Finish a transaction after validating receipts */\n finishTransaction: Promise<void>;\n /** Establish the platform billing connection */\n initConnection: Promise<boolean>;\n /**\n * Check if a billing program is available for the current user\n * Replaces the deprecated isExternalOfferAvailableAsync API\n *\n * Available in Google Play Billing Library 8.2.0+\n * Returns availability result with isAvailable flag\n * Throws OpenIapError.NotPrepared if billing client not ready\n */\n isBillingProgramAvailableAndroid: Promise<BillingProgramAvailabilityResultAndroid>;\n /**\n * Launch external link flow for external billing programs\n * Replaces the deprecated showExternalOfferInformationDialog API\n *\n * Available in Google Play Billing Library 8.2.0+\n * Shows Play Store dialog and optionally launches external URL\n * Throws OpenIapError.NotPrepared if billing client not ready\n */\n launchExternalLinkAndroid: Promise<boolean>;\n /** Present the App Store code redemption sheet */\n presentCodeRedemptionSheetIOS: Promise<boolean>;\n /** Present external purchase custom link with StoreKit UI */\n presentExternalPurchaseLinkIOS: Promise<ExternalPurchaseLinkResultIOS>;\n /**\n * Present external purchase notice sheet (iOS 17.4+).\n * Uses ExternalPurchase.presentNoticeSheet() which returns a token when user continues.\n * Reference: https://developer.apple.com/documentation/storekit/externalpurchase/presentnoticesheet()\n */\n presentExternalPurchaseNoticeSheetIOS: Promise<ExternalPurchaseNoticeResultIOS>;\n /** Initiate a purchase flow; rely on events for final state */\n requestPurchase?: Promise<(Purchase | Purchase[] | null)>;\n /**\n * Purchase the promoted product surfaced by the App Store.\n *\n * @deprecated Use promotedProductListenerIOS to receive the productId,\n * then call requestPurchase with that SKU instead. In StoreKit 2,\n * promoted products can be purchased directly via the standard purchase flow.\n * @deprecated Use promotedProductListenerIOS + requestPurchase instead\n */\n requestPurchaseOnPromotedProductIOS: Promise<boolean>;\n /** Restore completed purchases across platforms */\n restorePurchases: Promise<void>;\n /**\n * Show alternative billing information dialog to user\n * Step 2 of alternative billing flow\n * Must be called BEFORE processing payment in your payment system\n *\n * Returns true if user accepted, false if user canceled\n * Throws OpenIapError.NotPrepared if billing client not ready\n */\n showAlternativeBillingDialogAndroid: Promise<boolean>;\n /**\n * Show ExternalPurchaseCustomLink notice sheet (iOS 18.1+).\n * Displays the system disclosure notice sheet for custom external purchase links.\n * Call this after a deliberate customer interaction before linking out to external purchases.\n * Reference: https://developer.apple.com/documentation/storekit/externalpurchasecustomlink/shownotice(type:)\n */\n showExternalPurchaseCustomLinkNoticeIOS: Promise<ExternalPurchaseCustomLinkNoticeResultIOS>;\n /** Open subscription management UI and return changed purchases (iOS 15+) */\n showManageSubscriptionsIOS: Promise<PurchaseIOS[]>;\n /** Force a StoreKit sync for transactions (iOS 15+) */\n syncIOS: Promise<boolean>;\n /**\n * Validate purchase receipts with the configured providers\n * @deprecated Use verifyPurchase\n */\n validateReceipt: Promise<VerifyPurchaseResult>;\n /** Verify purchases with the configured providers */\n verifyPurchase: Promise<VerifyPurchaseResult>;\n /** Verify purchases with a specific provider (e.g., IAPKit) */\n verifyPurchaseWithProvider: Promise<VerifyPurchaseWithProviderResult>;\n}\n\n\n\nexport type MutationAcknowledgePurchaseAndroidArgs = string;\n\nexport type MutationBeginRefundRequestIosArgs = string;\n\nexport type MutationConsumePurchaseAndroidArgs = string;\n\nexport type MutationCreateBillingProgramReportingDetailsAndroidArgs = BillingProgramAndroid;\n\nexport type MutationDeepLinkToSubscriptionsArgs = (DeepLinkOptions | null) | undefined;\n\nexport interface MutationFinishTransactionArgs {\n isConsumable?: (boolean | null);\n purchase: PurchaseInput;\n}\n\n\nexport type MutationInitConnectionArgs = (InitConnectionConfig | null) | undefined;\n\nexport type MutationIsBillingProgramAvailableAndroidArgs = BillingProgramAndroid;\n\nexport type MutationLaunchExternalLinkAndroidArgs = LaunchExternalLinkParamsAndroid;\n\nexport type MutationPresentExternalPurchaseLinkIosArgs = string;\n\nexport type MutationRequestPurchaseArgs =\n | {\n /** Per-platform purchase request props */\n request: RequestPurchasePropsByPlatforms;\n type: 'in-app';\n /** Use alternative billing (Google Play alternative billing, Apple external purchase link) */\n useAlternativeBilling?: boolean | null;\n }\n | {\n /** Per-platform subscription request props */\n request: RequestSubscriptionPropsByPlatforms;\n type: 'subs';\n /** Use alternative billing (Google Play alternative billing, Apple external purchase link) */\n useAlternativeBilling?: boolean | null;\n };\n\n\nexport type MutationShowExternalPurchaseCustomLinkNoticeIosArgs = ExternalPurchaseCustomLinkNoticeTypeIOS;\n\nexport type MutationValidateReceiptArgs = VerifyPurchaseProps;\n\nexport type MutationVerifyPurchaseArgs = VerifyPurchaseProps;\n\nexport type MutationVerifyPurchaseWithProviderArgs = VerifyPurchaseWithProviderProps;\n\n/**\n * Payment mode for subscription offers.\n * Determines how the user pays during the offer period.\n */\nexport type PaymentMode = 'free-trial' | 'pay-as-you-go' | 'pay-up-front' | 'unknown';\n\nexport type PaymentModeIOS = 'empty' | 'free-trial' | 'pay-as-you-go' | 'pay-up-front';\n\n/**\n * Pending purchase update for subscription upgrades/downgrades (Android)\n * When a user initiates a subscription change (upgrade/downgrade), the new purchase\n * may be pending until the current billing period ends. This type contains the\n * details of the pending change.\n * Available in Google Play Billing Library 5.0+\n */\nexport interface PendingPurchaseUpdateAndroid {\n /**\n * Product IDs for the pending purchase update.\n * These are the new products the user is switching to.\n */\n products: string[];\n /**\n * Purchase token for the pending transaction.\n * Use this token to track or manage the pending purchase update.\n */\n purchaseToken: string;\n}\n\n/**\n * Pre-order details for one-time purchase products (Android)\n * Available in Google Play Billing Library 8.1.0+\n */\nexport interface PreorderDetailsAndroid {\n /**\n * Pre-order presale end time in milliseconds since epoch.\n * This is when the presale period ends and the product will be released.\n */\n preorderPresaleEndTimeMillis: string;\n /**\n * Pre-order release time in milliseconds since epoch.\n * This is when the product will be available to users who pre-ordered.\n */\n preorderReleaseTimeMillis: string;\n}\n\nexport interface PricingPhaseAndroid {\n billingCycleCount: number;\n billingPeriod: string;\n formattedPrice: string;\n priceAmountMicros: string;\n priceCurrencyCode: string;\n recurrenceMode: number;\n}\n\nexport interface PricingPhasesAndroid {\n pricingPhaseList: PricingPhaseAndroid[];\n}\n\nexport type Product = ProductAndroid | ProductIOS;\n\nexport interface ProductAndroid extends ProductCommon {\n currency: string;\n debugDescription?: (string | null);\n description: string;\n /**\n * Standardized discount offers for one-time products.\n * Cross-platform type with Android-specific fields using suffix.\n * @see https://openiap.dev/docs/types#discount-offer\n */\n discountOffers?: (DiscountOffer[] | null);\n displayName?: (string | null);\n displayPrice: string;\n id: string;\n nameAndroid: string;\n /**\n * One-time purchase offer details including discounts (Android)\n * Returns all eligible offers. Available in Google Play Billing Library 7.0+\n * @deprecated Use discountOffers instead for cross-platform compatibility.\n * @deprecated Use discountOffers instead\n */\n oneTimePurchaseOfferDetailsAndroid?: (ProductAndroidOneTimePurchaseOfferDetail[] | null);\n platform: 'android';\n price?: (number | null);\n /**\n * Product-level status code indicating fetch result (Android 8.0+)\n * OK = product fetched successfully\n * NOT_FOUND = SKU doesn't exist\n * NO_OFFERS_AVAILABLE = user not eligible for any offers\n * Available in Google Play Billing Library 8.0.0+\n */\n productStatusAndroid?: (ProductStatusAndroid | null);\n /**\n * @deprecated Use subscriptionOffers instead for cross-platform compatibility.\n * @deprecated Use subscriptionOffers instead\n */\n subscriptionOfferDetailsAndroid?: (ProductSubscriptionAndroidOfferDetails[] | null);\n /**\n * Standardized subscription offers.\n * Cross-platform type with Android-specific fields using suffix.\n * @see https://openiap.dev/docs/types#subscription-offer\n */\n subscriptionOffers?: (SubscriptionOffer[] | null);\n title: string;\n type: 'in-app';\n}\n\n/**\n * One-time purchase offer details (Android).\n * Available in Google Play Billing Library 7.0+\n * @deprecated Use the standardized DiscountOffer type instead for cross-platform compatibility.\n * @see https://openiap.dev/docs/types#discount-offer\n */\nexport interface ProductAndroidOneTimePurchaseOfferDetail {\n /**\n * Discount display information\n * Only available for discounted offers\n */\n discountDisplayInfo?: (DiscountDisplayInfoAndroid | null);\n formattedPrice: string;\n /**\n * Full (non-discounted) price in micro-units\n * Only available for discounted offers\n */\n fullPriceMicros?: (string | null);\n /** Limited quantity information */\n limitedQuantityInfo?: (LimitedQuantityInfoAndroid | null);\n /** Offer ID */\n offerId?: (string | null);\n /** List of offer tags */\n offerTags: string[];\n /** Offer token for use in BillingFlowParams when purchasing */\n offerToken: string;\n /**\n * Pre-order details for products available for pre-order\n * Available in Google Play Billing Library 8.1.0+\n */\n preorderDetailsAndroid?: (PreorderDetailsAndroid | null);\n priceAmountMicros: string;\n priceCurrencyCode: string;\n /**\n * Purchase option ID for this offer (Android)\n * Used to identify which purchase option the user selected.\n * Available in Google Play Billing Library 7.0+\n */\n purchaseOptionId?: (string | null);\n /** Rental details for rental offers */\n rentalDetailsAndroid?: (RentalDetailsAndroid | null);\n /** Valid time window for the offer */\n validTimeWindow?: (ValidTimeWindowAndroid | null);\n}\n\nexport interface ProductCommon {\n currency: string;\n debugDescription?: (string | null);\n description: string;\n displayName?: (string | null);\n displayPrice: string;\n id: string;\n platform: 'android' | 'ios';\n price?: (number | null);\n title: string;\n type: 'in-app' | 'subs';\n} \n\nexport interface ProductIOS extends ProductCommon {\n currency: string;\n debugDescription?: (string | null);\n description: string;\n displayName?: (string | null);\n displayNameIOS: string;\n displayPrice: string;\n id: string;\n isFamilyShareableIOS: boolean;\n jsonRepresentationIOS: string;\n platform: 'ios';\n price?: (number | null);\n /**\n * @deprecated Use subscriptionOffers instead for cross-platform compatibility.\n * @deprecated Use subscriptionOffers instead\n */\n subscriptionInfoIOS?: (SubscriptionInfoIOS | null);\n /**\n * Standardized subscription offers.\n * Cross-platform type with iOS-specific fields using suffix.\n * Note: iOS does not support one-time product discounts.\n * @see https://openiap.dev/docs/types#subscription-offer\n */\n subscriptionOffers?: (SubscriptionOffer[] | null);\n title: string;\n type: 'in-app';\n typeIOS: ProductTypeIOS;\n}\n\nexport type ProductOrSubscription = Product | ProductSubscription;\n\nexport type ProductQueryType = 'in-app' | 'subs' | 'all';\n\nexport interface ProductRequest {\n skus: string[];\n type?: (ProductQueryType | null);\n}\n\n/**\n * Status code for individual products returned from queryProductDetailsAsync (Android)\n * Prior to 8.0, products that couldn't be fetched were simply not returned.\n * With 8.0+, these products are returned with a status code explaining why.\n * Available in Google Play Billing Library 8.0.0+\n */\nexport type ProductStatusAndroid = 'ok' | 'not-found' | 'no-offers-available' | 'unknown';\n\nexport type ProductSubscription = ProductSubscriptionAndroid | ProductSubscriptionIOS;\n\nexport interface ProductSubscriptionAndroid extends ProductCommon {\n currency: string;\n debugDescription?: (string | null);\n description: string;\n /**\n * Standardized discount offers for one-time products.\n * Cross-platform type with Android-specific fields using suffix.\n * @see https://openiap.dev/docs/types#discount-offer\n */\n discountOffers?: (DiscountOffer[] | null);\n displayName?: (string | null);\n displayPrice: string;\n id: string;\n nameAndroid: string;\n /**\n * One-time purchase offer details including discounts (Android)\n * Returns all eligible offers. Available in Google Play Billing Library 7.0+\n * @deprecated Use discountOffers instead for cross-platform compatibility.\n * @deprecated Use discountOffers instead\n */\n oneTimePurchaseOfferDetailsAndroid?: (ProductAndroidOneTimePurchaseOfferDetail[] | null);\n platform: 'android';\n price?: (number | null);\n /**\n * Product-level status code indicating fetch result (Android 8.0+)\n * OK = product fetched successfully\n * NOT_FOUND = SKU doesn't exist\n * NO_OFFERS_AVAILABLE = user not eligible for any offers\n * Available in Google Play Billing Library 8.0.0+\n */\n productStatusAndroid?: (ProductStatusAndroid | null);\n /**\n * @deprecated Use subscriptionOffers instead for cross-platform compatibility.\n * @deprecated Use subscriptionOffers instead\n */\n subscriptionOfferDetailsAndroid: ProductSubscriptionAndroidOfferDetails[];\n /**\n * Standardized subscription offers.\n * Cross-platform type with Android-specific fields using suffix.\n * @see https://openiap.dev/docs/types#subscription-offer\n */\n subscriptionOffers: SubscriptionOffer[];\n title: string;\n type: 'subs';\n}\n\n/**\n * Subscription offer details (Android).\n * @deprecated Use the standardized SubscriptionOffer type instead for cross-platform compatibility.\n * @see https://openiap.dev/docs/types#subscription-offer\n */\nexport interface ProductSubscriptionAndroidOfferDetails {\n basePlanId: string;\n /**\n * Installment plan details for this subscription offer.\n * Only set for installment subscription plans; null for non-installment plans.\n * Available in Google Play Billing Library 7.0+\n */\n installmentPlanDetails?: (InstallmentPlanDetailsAndroid | null);\n offerId?: (string | null);\n offerTags: string[];\n offerToken: string;\n pricingPhases: PricingPhasesAndroid;\n}\n\nexport interface ProductSubscriptionIOS extends ProductCommon {\n currency: string;\n debugDescription?: (string | null);\n description: string;\n /**\n * @deprecated Use subscriptionOffers instead for cross-platform compatibility.\n * @deprecated Use subscriptionOffers instead\n */\n discountsIOS?: (DiscountIOS[] | null);\n displayName?: (string | null);\n displayNameIOS: string;\n displayPrice: string;\n id: string;\n introductoryPriceAsAmountIOS?: (string | null);\n introductoryPriceIOS?: (string | null);\n introductoryPriceNumberOfPeriodsIOS?: (string | null);\n introductoryPricePaymentModeIOS: PaymentModeIOS;\n introductoryPriceSubscriptionPeriodIOS?: (SubscriptionPeriodIOS | null);\n isFamilyShareableIOS: boolean;\n jsonRepresentationIOS: string;\n platform: 'ios';\n price?: (number | null);\n /**\n * @deprecated Use subscriptionOffers instead for cross-platform compatibility.\n * @deprecated Use subscriptionOffers instead\n */\n subscriptionInfoIOS?: (SubscriptionInfoIOS | null);\n /**\n * Standardized subscription offers.\n * Cross-platform type with iOS-specific fields using suffix.\n * @see https://openiap.dev/docs/types#subscription-offer\n */\n subscriptionOffers?: (SubscriptionOffer[] | null);\n subscriptionPeriodNumberIOS?: (string | null);\n subscriptionPeriodUnitIOS?: (SubscriptionPeriodIOS | null);\n title: string;\n type: 'subs';\n typeIOS: ProductTypeIOS;\n}\n\nexport type ProductType = 'in-app' | 'subs';\n\nexport type ProductTypeIOS = 'consumable' | 'non-consumable' | 'auto-renewable-subscription' | 'non-renewing-subscription';\n\n/**\n * JWS promotional offer input for iOS 15+ (StoreKit 2, WWDC 2025).\n * New signature format using compact JWS string for promotional offers.\n * This provides a simpler alternative to the legacy signature-based promotional offers.\n * Back-deployed to iOS 15.\n */\nexport interface PromotionalOfferJwsInputIOS {\n /**\n * Compact JWS string signed by your server.\n * The JWS should contain the promotional offer signature data.\n * Format: header.payload.signature (base64url encoded)\n */\n jws: string;\n /** The promotional offer identifier from App Store Connect */\n offerId: string;\n}\n\nexport type Purchase = PurchaseAndroid | PurchaseIOS;\n\nexport interface PurchaseAndroid extends PurchaseCommon {\n autoRenewingAndroid?: (boolean | null);\n currentPlanId?: (string | null);\n dataAndroid?: (string | null);\n developerPayloadAndroid?: (string | null);\n id: string;\n ids?: (string[] | null);\n isAcknowledgedAndroid?: (boolean | null);\n isAutoRenewing: boolean;\n /**\n * Whether the subscription is suspended (Android)\n * A suspended subscription means the user's payment method failed and they need to fix it.\n * Users should be directed to the subscription center to resolve the issue.\n * Do NOT grant entitlements for suspended subscriptions.\n * Available in Google Play Billing Library 8.1.0+\n */\n isSuspendedAndroid?: (boolean | null);\n obfuscatedAccountIdAndroid?: (string | null);\n obfuscatedProfileIdAndroid?: (string | null);\n packageNameAndroid?: (string | null);\n /**\n * Pending purchase update for uncommitted subscription upgrade/downgrade (Android)\n * Contains the new products and purchase token for the pending transaction.\n * Returns null if no pending update exists.\n * Available in Google Play Billing Library 5.0+\n */\n pendingPurchaseUpdateAndroid?: (PendingPurchaseUpdateAndroid | null);\n /** @deprecated Use store instead */\n platform: IapPlatform;\n productId: string;\n purchaseState: PurchaseState;\n purchaseToken?: (string | null);\n quantity: number;\n signatureAndroid?: (string | null);\n /** Store where purchase was made */\n store: IapStore;\n transactionDate: number;\n transactionId?: (string | null);\n}\n\nexport interface PurchaseCommon {\n /**\n * The current plan identifier. This is:\n * - On Android: the basePlanId (e.g., \"premium\", \"premium-year\")\n * - On iOS: the productId (e.g., \"com.example.premium_monthly\", \"com.example.premium_yearly\")\n * This provides a unified way to identify which specific plan/tier the user is subscribed to.\n */\n currentPlanId?: (string | null);\n id: string;\n ids?: (string[] | null);\n isAutoRenewing: boolean;\n /** @deprecated Use store instead */\n platform: IapPlatform;\n productId: string;\n purchaseState: PurchaseState;\n /** Unified purchase token (iOS JWS, Android purchaseToken) */\n purchaseToken?: (string | null);\n quantity: number;\n /** Store where purchase was made */\n store: IapStore;\n transactionDate: number;\n}\n\nexport interface PurchaseError {\n code: ErrorCode;\n debugMessage?: (string | null);\n message: string;\n productId?: (string | null);\n}\n\nexport interface PurchaseIOS extends PurchaseCommon {\n appAccountToken?: (string | null);\n appBundleIdIOS?: (string | null);\n countryCodeIOS?: (string | null);\n currencyCodeIOS?: (string | null);\n currencySymbolIOS?: (string | null);\n currentPlanId?: (string | null);\n environmentIOS?: (string | null);\n expirationDateIOS?: (number | null);\n id: string;\n ids?: (string[] | null);\n isAutoRenewing: boolean;\n isUpgradedIOS?: (boolean | null);\n offerIOS?: (PurchaseOfferIOS | null);\n originalTransactionDateIOS?: (number | null);\n originalTransactionIdentifierIOS?: (string | null);\n ownershipTypeIOS?: (string | null);\n /** @deprecated Use store instead */\n platform: IapPlatform;\n productId: string;\n purchaseState: PurchaseState;\n purchaseToken?: (string | null);\n quantity: number;\n quantityIOS?: (number | null);\n reasonIOS?: (string | null);\n reasonStringRepresentationIOS?: (string | null);\n renewalInfoIOS?: (RenewalInfoIOS | null);\n revocationDateIOS?: (number | null);\n revocationReasonIOS?: (string | null);\n /** Store where purchase was made */\n store: IapStore;\n storefrontCountryCodeIOS?: (string | null);\n subscriptionGroupIdIOS?: (string | null);\n transactionDate: number;\n transactionId: string;\n transactionReasonIOS?: (string | null);\n webOrderLineItemIdIOS?: (string | null);\n}\n\nexport type PurchaseInput = Purchase;\n\nexport interface PurchaseOfferIOS {\n id: string;\n paymentMode: string;\n type: string;\n}\n\nexport interface PurchaseOptions {\n /** Also emit results through the iOS event listeners */\n alsoPublishToEventListenerIOS?: (boolean | null);\n /**\n * Include suspended subscriptions in the result (Android 8.1+).\n * Suspended subscriptions have isSuspendedAndroid=true and should NOT be granted entitlements.\n * Users should be directed to the subscription center to resolve payment issues.\n * Default: false (only active subscriptions are returned)\n */\n includeSuspendedAndroid?: (boolean | null);\n /** Limit to currently active items on iOS */\n onlyIncludeActiveItemsIOS?: (boolean | null);\n}\n\nexport type PurchaseState = 'pending' | 'purchased' | 'unknown';\n\nexport type PurchaseVerificationProvider = 'iapkit';\n\nexport interface Query {\n /**\n * Check if external purchase notice sheet can be presented (iOS 17.4+)\n * Uses ExternalPurchase.canPresent\n */\n canPresentExternalPurchaseNoticeIOS: Promise<boolean>;\n /** Get current StoreKit 2 entitlements (iOS 15+) */\n currentEntitlementIOS?: Promise<(PurchaseIOS | null)>;\n /** Retrieve products or subscriptions from the store */\n fetchProducts: Promise<(ProductOrSubscription[] | Product[] | ProductSubscription[] | null)>;\n /** Get active subscriptions (filters by subscriptionIds when provided) */\n getActiveSubscriptions: Promise<ActiveSubscription[]>;\n /** Fetch the current app transaction (iOS 16+) */\n getAppTransactionIOS?: Promise<(AppTransaction | null)>;\n /** Get all available purchases for the current user */\n getAvailablePurchases: Promise<Purchase[]>;\n /**\n * Get external purchase token for reporting to Apple (iOS 18.1+).\n * Use this token with Apple's External Purchase Server API to report transactions.\n * Reference: https://developer.apple.com/documentation/storekit/externalpurchasecustomlink/token(for:)\n */\n getExternalPurchaseCustomLinkTokenIOS: Promise<ExternalPurchaseCustomLinkTokenResultIOS>;\n /** Retrieve all pending transactions in the StoreKit queue */\n getPendingTransactionsIOS: Promise<PurchaseIOS[]>;\n /** Get the currently promoted product (iOS 11+) */\n getPromotedProductIOS?: Promise<(ProductIOS | null)>;\n /** Get base64-encoded receipt data for validation */\n getReceiptDataIOS?: Promise<(string | null)>;\n /** Get the current storefront country code */\n getStorefront: Promise<string>;\n /**\n * Get the current App Store storefront country code\n * @deprecated Use getStorefront\n */\n getStorefrontIOS: Promise<string>;\n /** Get the transaction JWS (StoreKit 2) */\n getTransactionJwsIOS?: Promise<(string | null)>;\n /** Check whether the user has active subscriptions */\n hasActiveSubscriptions: Promise<boolean>;\n /**\n * Check if app is eligible for ExternalPurchaseCustomLink API (iOS 18.1+).\n * Returns true if the app can use custom external purchase links.\n * Reference: https://developer.apple.com/documentation/storekit/externalpurchasecustomlink/iseligible\n */\n isEligibleForExternalPurchaseCustomLinkIOS: Promise<boolean>;\n /** Check introductory offer eligibility for a subscription group */\n isEligibleForIntroOfferIOS: Promise<boolean>;\n /** Verify a StoreKit 2 transaction signature */\n isTransactionVerifiedIOS: Promise<boolean>;\n /** Get the latest transaction for a product using StoreKit 2 */\n latestTransactionIOS?: Promise<(PurchaseIOS | null)>;\n /** Get StoreKit 2 subscription status details (iOS 15+) */\n subscriptionStatusIOS: Promise<SubscriptionStatusIOS[]>;\n /**\n * Validate a receipt for a specific product\n * @deprecated Use verifyPurchase\n */\n validateReceiptIOS: Promise<VerifyPurchaseResultIOS>;\n}\n\n\n\nexport type QueryCurrentEntitlementIosArgs = string;\n\nexport type QueryFetchProductsArgs = ProductRequest;\n\nexport type QueryGetActiveSubscriptionsArgs = (string[] | null) | undefined;\n\nexport type QueryGetAvailablePurchasesArgs = (PurchaseOptions | null) | undefined;\n\nexport type QueryGetExternalPurchaseCustomLinkTokenIosArgs = ExternalPurchaseCustomLinkTokenTypeIOS;\n\nexport type QueryGetTransactionJwsIosArgs = string;\n\nexport type QueryHasActiveSubscriptionsArgs = (string[] | null) | undefined;\n\nexport type QueryIsEligibleForIntroOfferIosArgs = string;\n\nexport type QueryIsTransactionVerifiedIosArgs = string;\n\nexport type QueryLatestTransactionIosArgs = string;\n\nexport type QuerySubscriptionStatusIosArgs = string;\n\nexport type QueryValidateReceiptIosArgs = VerifyPurchaseProps;\n\nexport interface RefundResultIOS {\n message?: (string | null);\n status: string;\n}\n\n/**\n * Subscription renewal information from Product.SubscriptionInfo.RenewalInfo\n * https://developer.apple.com/documentation/storekit/product/subscriptioninfo/renewalinfo\n */\nexport interface RenewalInfoIOS {\n autoRenewPreference?: (string | null);\n /**\n * When subscription expires due to cancellation/billing issue\n * Possible values: \"VOLUNTARY\", \"BILLING_ERROR\", \"DID_NOT_AGREE_TO_PRICE_INCREASE\", \"PRODUCT_NOT_AVAILABLE\", \"UNKNOWN\"\n */\n expirationReason?: (string | null);\n /**\n * Grace period expiration date (milliseconds since epoch)\n * When set, subscription is in grace period (billing issue but still has access)\n */\n gracePeriodExpirationDate?: (number | null);\n /**\n * True if subscription failed to renew due to billing issue and is retrying\n * Note: Not directly available in RenewalInfo, available in Status\n */\n isInBillingRetry?: (boolean | null);\n jsonRepresentation?: (string | null);\n /**\n * Product ID that will be used on next renewal (when user upgrades/downgrades)\n * If set and different from current productId, subscription will change on expiration\n */\n pendingUpgradeProductId?: (string | null);\n /**\n * User's response to subscription price increase\n * Possible values: \"AGREED\", \"PENDING\", null (no price increase)\n */\n priceIncreaseStatus?: (string | null);\n /**\n * Expected renewal date (milliseconds since epoch)\n * For active subscriptions, when the next renewal/charge will occur\n */\n renewalDate?: (number | null);\n /** Offer ID applied to next renewal (promotional offer, subscription offer code, etc.) */\n renewalOfferId?: (string | null);\n /**\n * Type of offer applied to next renewal\n * Possible values: \"PROMOTIONAL\", \"SUBSCRIPTION_OFFER_CODE\", \"WIN_BACK\", etc.\n */\n renewalOfferType?: (string | null);\n willAutoRenew: boolean;\n}\n\n/**\n * Rental details for one-time purchase products that can be rented (Android)\n * Available in Google Play Billing Library 7.0+\n */\nexport interface RentalDetailsAndroid {\n /**\n * Rental expiration period in ISO 8601 format\n * Time after rental period ends when user can still extend\n */\n rentalExpirationPeriod?: (string | null);\n /** Rental period in ISO 8601 format (e.g., P7D for 7 days) */\n rentalPeriod: string;\n}\n\nexport interface RequestPurchaseAndroidProps {\n /**\n * Developer billing option parameters for external payments flow (8.3.0+).\n * When provided, the purchase flow will show a side-by-side choice between\n * Google Play Billing and the developer's external payment option.\n */\n developerBillingOption?: (DeveloperBillingOptionParamsAndroid | null);\n /**\n * Personalized offer flag.\n * When true, indicates the price was customized for this user.\n */\n isOfferPersonalized?: (boolean | null);\n /** Obfuscated account ID */\n obfuscatedAccountId?: (string | null);\n /** Obfuscated profile ID */\n obfuscatedProfileId?: (string | null);\n /**\n * Offer token for one-time purchase discounts (7.0+).\n * Pass the offerToken from oneTimePurchaseOfferDetailsAndroid or discountOffers\n * to apply a discount offer to the purchase.\n */\n offerToken?: (string | null);\n /** List of product SKUs */\n skus: string[];\n}\n\nexport interface RequestPurchaseIosProps {\n /**\n * Advanced commerce data token (iOS 15+).\n * Used with StoreKit 2's Product.PurchaseOption.custom API for passing\n * campaign tokens, affiliate IDs, or other attribution data.\n * The data is formatted as JSON: {\"signatureInfo\": {\"token\": \"<value>\"}}\n */\n advancedCommerceData?: (string | null);\n /** Auto-finish transaction (dangerous) */\n andDangerouslyFinishTransactionAutomatically?: (boolean | null);\n /** App account token for user tracking */\n appAccountToken?: (string | null);\n /** Purchase quantity */\n quantity?: (number | null);\n /** Product SKU */\n sku: string;\n /**\n * Promotional offer to apply (subscriptions only, ignored for one-time purchases).\n * iOS only supports promotional offers for auto-renewable subscriptions.\n */\n withOffer?: (DiscountOfferInputIOS | null);\n}\n\nexport type RequestPurchaseProps =\n | {\n /** Per-platform purchase request props */\n request: RequestPurchasePropsByPlatforms;\n type: 'in-app';\n /** Use alternative billing (Google Play alternative billing, Apple external purchase link) */\n useAlternativeBilling?: boolean | null;\n }\n | {\n /** Per-platform subscription request props */\n request: RequestSubscriptionPropsByPlatforms;\n type: 'subs';\n /** Use alternative billing (Google Play alternative billing, Apple external purchase link) */\n useAlternativeBilling?: boolean | null;\n };\n\n/**\n * Platform-specific purchase request parameters.\n *\n * Note: \"Platforms\" refers to the SDK/OS level (apple, google), not the store.\n * - apple: Always targets App Store\n * - google: Targets Play Store by default, or Horizon when built with horizon flavor\n * (determined at build time, not runtime)\n */\nexport interface RequestPurchasePropsByPlatforms {\n /** @deprecated Use google instead */\n android?: (RequestPurchaseAndroidProps | null);\n /** Apple-specific purchase parameters */\n apple?: (RequestPurchaseIosProps | null);\n /** Google-specific purchase parameters */\n google?: (RequestPurchaseAndroidProps | null);\n /** @deprecated Use apple instead */\n ios?: (RequestPurchaseIosProps | null);\n}\n\nexport type RequestPurchaseResult = Purchase | Purchase[] | null;\n\nexport interface RequestSubscriptionAndroidProps {\n /**\n * Developer billing option parameters for external payments flow (8.3.0+).\n * When provided, the purchase flow will show a side-by-side choice between\n * Google Play Billing and the developer's external payment option.\n */\n developerBillingOption?: (DeveloperBillingOptionParamsAndroid | null);\n /**\n * Personalized offer flag.\n * When true, indicates the price was customized for this user.\n */\n isOfferPersonalized?: (boolean | null);\n /** Obfuscated account ID */\n obfuscatedAccountId?: (string | null);\n /** Obfuscated profile ID */\n obfuscatedProfileId?: (string | null);\n /** Purchase token for upgrades/downgrades */\n purchaseToken?: (string | null);\n /**\n * Replacement mode for subscription changes\n * @deprecated Use subscriptionProductReplacementParams instead for item-level replacement (8.1.0+)\n */\n replacementMode?: (number | null);\n /** List of subscription SKUs */\n skus: string[];\n /** Subscription offers */\n subscriptionOffers?: (AndroidSubscriptionOfferInput[] | null);\n /**\n * Product-level replacement parameters (8.1.0+)\n * Use this instead of replacementMode for item-level replacement\n */\n subscriptionProductReplacementParams?: (SubscriptionProductReplacementParamsAndroid | null);\n}\n\nexport interface RequestSubscriptionIosProps {\n /**\n * Advanced commerce data token (iOS 15+).\n * Used with StoreKit 2's Product.PurchaseOption.custom API for passing\n * campaign tokens, affiliate IDs, or other attribution data.\n * The data is formatted as JSON: {\"signatureInfo\": {\"token\": \"<value>\"}}\n */\n advancedCommerceData?: (string | null);\n andDangerouslyFinishTransactionAutomatically?: (boolean | null);\n appAccountToken?: (string | null);\n /**\n * Override introductory offer eligibility (iOS 15+, WWDC 2025).\n * Set to true to indicate the user is eligible for introductory offer,\n * or false to indicate they are not. When nil, the system determines eligibility.\n * Back-deployed to iOS 15.\n */\n introductoryOfferEligibility?: (boolean | null);\n /**\n * JWS promotional offer (iOS 15+, WWDC 2025).\n * New signature format using compact JWS string for promotional offers.\n * Back-deployed to iOS 15.\n */\n promotionalOfferJWS?: (PromotionalOfferJwsInputIOS | null);\n quantity?: (number | null);\n sku: string;\n /**\n * Win-back offer to apply (iOS 18+)\n * Used to re-engage churned subscribers with a discount or free trial.\n * The offer is available when the customer is eligible and can be discovered\n * via StoreKit Message (automatic) or subscription offer APIs.\n */\n winBackOffer?: (WinBackOfferInputIOS | null);\n /**\n * Promotional offer to apply for subscription purchases.\n * Requires server-signed offer with nonce, timestamp, keyId, and signature.\n */\n withOffer?: (DiscountOfferInputIOS | null);\n}\n\n/**\n * Platform-specific subscription request parameters.\n *\n * Note: \"Platforms\" refers to the SDK/OS level (apple, google), not the store.\n * - apple: Always targets App Store\n * - google: Targets Play Store by default, or Horizon when built with horizon flavor\n * (determined at build time, not runtime)\n */\nexport interface RequestSubscriptionPropsByPlatforms {\n /** @deprecated Use google instead */\n android?: (RequestSubscriptionAndroidProps | null);\n /** Apple-specific subscription parameters */\n apple?: (RequestSubscriptionIosProps | null);\n /** Google-specific subscription parameters */\n google?: (RequestSubscriptionAndroidProps | null);\n /** @deprecated Use apple instead */\n ios?: (RequestSubscriptionIosProps | null);\n}\n\nexport interface RequestVerifyPurchaseWithIapkitAppleProps {\n /** The JWS token returned with the purchase response. */\n jws: string;\n}\n\nexport interface RequestVerifyPurchaseWithIapkitGoogleProps {\n /** The token provided to the user's device when the product or subscription was purchased. */\n purchaseToken: string;\n}\n\n/**\n * Platform-specific verification parameters for IAPKit.\n *\n * - apple: Verifies via App Store (JWS token)\n * - google: Verifies via Play Store (purchase token)\n */\nexport interface RequestVerifyPurchaseWithIapkitProps {\n /** API key used for the Authorization header (Bearer {apiKey}). */\n apiKey?: (string | null);\n /** Apple App Store verification parameters. */\n apple?: (RequestVerifyPurchaseWithIapkitAppleProps | null);\n /** Google Play Store verification parameters. */\n google?: (RequestVerifyPurchaseWithIapkitGoogleProps | null);\n}\n\nexport interface RequestVerifyPurchaseWithIapkitResult {\n /** Whether the purchase is valid (not falsified). */\n isValid: boolean;\n /** The current state of the purchase. */\n state: IapkitPurchaseState;\n store: IapStore;\n}\n\n/**\n * Sub-response codes for more granular purchase error information (Android)\n * Available in Google Play Billing Library 8.0.0+\n */\nexport type SubResponseCodeAndroid = 'no-applicable-sub-response-code' | 'payment-declined-due-to-insufficient-funds' | 'user-ineligible';\n\nexport interface Subscription {\n /**\n * Fires when a user selects developer billing in the External Payments flow (Android only)\n * Triggered when the user chooses to pay via the developer's external payment option\n * instead of Google Play Billing in the side-by-side choice dialog.\n * Contains the externalTransactionToken needed to report the transaction.\n * Available in Google Play Billing Library 8.3.0+\n */\n developerProvidedBillingAndroid: DeveloperProvidedBillingDetailsAndroid;\n /** Fires when the App Store surfaces a promoted product (iOS only) */\n promotedProductIOS: string;\n /** Fires when a purchase fails or is cancelled */\n purchaseError: PurchaseError;\n /** Fires when a purchase completes successfully or a pending purchase resolves */\n purchaseUpdated: Purchase;\n /**\n * Fires when a user selects alternative billing in the User Choice Billing dialog (Android only)\n * Only triggered when the user selects alternative billing instead of Google Play billing\n */\n userChoiceBillingAndroid: UserChoiceBillingDetails;\n}\n\n\nexport interface SubscriptionInfoIOS {\n introductoryOffer?: (SubscriptionOfferIOS | null);\n promotionalOffers?: (SubscriptionOfferIOS[] | null);\n subscriptionGroupId: string;\n subscriptionPeriod: SubscriptionPeriodValueIOS;\n}\n\n/**\n * Standardized subscription discount/promotional offer.\n * Provides a unified interface for subscription offers across iOS and Android.\n *\n * Both platforms support subscription offers with different implementations:\n * - iOS: Introductory offers, promotional offers with server-side signatures\n * - Android: Offer tokens with pricing phases\n *\n * @see https://openiap.dev/docs/types/ios#discount-offer\n * @see https://openiap.dev/docs/types/android#subscription-offer\n */\nexport interface SubscriptionOffer {\n /**\n * [Android] Base plan identifier.\n * Identifies which base plan this offer belongs to.\n */\n basePlanIdAndroid?: (string | null);\n /** Currency code (ISO 4217, e.g., \"USD\") */\n currency?: (string | null);\n /** Formatted display price string (e.g., \"$9.99/month\") */\n displayPrice: string;\n /**\n * Unique identifier for the offer.\n * - iOS: Discount identifier from App Store Connect\n * - Android: offerId from ProductSubscriptionAndroidOfferDetails\n */\n id: string;\n /**\n * [Android] Installment plan details for this subscription offer.\n * Only set for installment subscription plans; null for non-installment plans.\n * Available in Google Play Billing Library 7.0+\n */\n installmentPlanDetailsAndroid?: (InstallmentPlanDetailsAndroid | null);\n /**\n * [iOS] Key identifier for signature validation.\n * Used with server-side signature generation for promotional offers.\n */\n keyIdentifierIOS?: (string | null);\n /** [iOS] Localized price string. */\n localizedPriceIOS?: (string | null);\n /**\n * [iOS] Cryptographic nonce (UUID) for signature validation.\n * Must be generated server-side for each purchase attempt.\n */\n nonceIOS?: (string | null);\n /** [iOS] Number of billing periods for this discount. */\n numberOfPeriodsIOS?: (number | null);\n /** [Android] List of tags associated with this offer. */\n offerTagsAndroid?: (string[] | null);\n /**\n * [Android] Offer token required for purchase.\n * Must be passed to requestPurchase() when purchasing with this offer.\n */\n offerTokenAndroid?: (string | null);\n /** Payment mode during the offer period */\n paymentMode?: (PaymentMode | null);\n /** Subscription period for this offer */\n period?: (SubscriptionPeriod | null);\n /** Number of periods the offer applies */\n periodCount?: (number | null);\n /** Numeric price value */\n price: number;\n /**\n * [Android] Pricing phases for this subscription offer.\n * Contains detailed pricing information for each phase (trial, intro, regular).\n */\n pricingPhasesAndroid?: (PricingPhasesAndroid | null);\n /**\n * [iOS] Server-generated signature for promotional offer validation.\n * Required when applying promotional offers on iOS.\n */\n signatureIOS?: (string | null);\n /**\n * [iOS] Timestamp when the signature was generated.\n * Used for signature validation.\n */\n timestampIOS?: (number | null);\n /** Type of subscription offer (Introductory or Promotional) */\n type: DiscountOfferType;\n}\n\n/**\n * iOS subscription offer details.\n * @deprecated Use the standardized SubscriptionOffer type instead for cross-platform compatibility.\n * @see https://openiap.dev/docs/types#subscription-offer\n */\nexport interface SubscriptionOfferIOS {\n displayPrice: string;\n id: string;\n paymentMode: PaymentModeIOS;\n period: SubscriptionPeriodValueIOS;\n periodCount: number;\n price: number;\n type: SubscriptionOfferTypeIOS;\n}\n\nexport type SubscriptionOfferTypeIOS = 'introductory' | 'promotional' | 'win-back';\n\n/** Subscription period value combining unit and count. */\nexport interface SubscriptionPeriod {\n /** The period unit (day, week, month, year) */\n unit: SubscriptionPeriodUnit;\n /** The number of units (e.g., 1 for monthly, 3 for quarterly) */\n value: number;\n}\n\nexport type SubscriptionPeriodIOS = 'day' | 'week' | 'month' | 'year' | 'empty';\n\n/** Subscription period unit for cross-platform use. */\nexport type SubscriptionPeriodUnit = 'day' | 'week' | 'month' | 'year' | 'unknown';\n\nexport interface SubscriptionPeriodValueIOS {\n unit: SubscriptionPeriodIOS;\n value: number;\n}\n\n/**\n * Product-level subscription replacement parameters (Android)\n * Used with setSubscriptionProductReplacementParams in BillingFlowParams.ProductDetailsParams\n * Available in Google Play Billing Library 8.1.0+\n */\nexport interface SubscriptionProductReplacementParamsAndroid {\n /** The old product ID that needs to be replaced */\n oldProductId: string;\n /** The replacement mode for this product change */\n replacementMode: SubscriptionReplacementModeAndroid;\n}\n\n/**\n * Replacement mode for subscription changes (Android)\n * These modes determine how the subscription replacement affects billing.\n * Available in Google Play Billing Library 8.1.0+\n */\nexport type SubscriptionReplacementModeAndroid = 'unknown-replacement-mode' | 'with-time-proration' | 'charge-prorated-price' | 'charge-full-price' | 'without-proration' | 'deferred' | 'keep-existing';\n\nexport interface SubscriptionStatusIOS {\n renewalInfo?: (RenewalInfoIOS | null);\n state: string;\n}\n\n/**\n * User Choice Billing event details (Android)\n * Fired when a user selects alternative billing in the User Choice Billing dialog\n */\nexport interface UserChoiceBillingDetails {\n /** Token that must be reported to Google Play within 24 hours */\n externalTransactionToken: string;\n /** List of product IDs selected by the user */\n products: string[];\n}\n\n/**\n * Valid time window for when an offer is available (Android)\n * Available in Google Play Billing Library 7.0+\n */\nexport interface ValidTimeWindowAndroid {\n /** End time in milliseconds since epoch */\n endTimeMillis: string;\n /** Start time in milliseconds since epoch */\n startTimeMillis: string;\n}\n\n/**\n * Apple App Store verification parameters.\n * Used for server-side receipt validation via App Store Server API.\n */\nexport interface VerifyPurchaseAppleOptions {\n /** Product SKU to validate */\n sku: string;\n}\n\n/**\n * Google Play Store verification parameters.\n * Used for server-side receipt validation via Google Play Developer API.\n *\n * ⚠️ SECURITY: Contains sensitive tokens (accessToken, purchaseToken). Do not log or persist this data.\n */\nexport interface VerifyPurchaseGoogleOptions {\n /**\n * Google OAuth2 access token for API authentication.\n * ⚠️ Sensitive: Do not log this value.\n */\n accessToken: string;\n /** Whether this is a subscription purchase (affects API endpoint used) */\n isSub?: (boolean | null);\n /** Android package name (e.g., com.example.app) */\n packageName: string;\n /**\n * Purchase token from the purchase response.\n * ⚠️ Sensitive: Do not log this value.\n */\n purchaseToken: string;\n /** Product SKU to validate */\n sku: string;\n}\n\n/**\n * Meta Horizon (Quest) verification parameters.\n * Used for server-side entitlement verification via Meta's S2S API.\n * POST https://graph.oculus.com/$APP_ID/verify_entitlement\n *\n * ⚠️ SECURITY: Contains sensitive token (accessToken). Do not log or persist this data.\n */\nexport interface VerifyPurchaseHorizonOptions {\n /**\n * Access token for Meta API authentication (OC|$APP_ID|$APP_SECRET or User Access Token).\n * ⚠️ Sensitive: Do not log this value.\n */\n accessToken: string;\n /** The SKU for the add-on item, defined in Meta Developer Dashboard */\n sku: string;\n /** The user ID of the user whose purchase you want to verify */\n userId: string;\n}\n\n/**\n * Platform-specific purchase verification parameters.\n *\n * - apple: Verifies via App Store Server API\n * - google: Verifies via Google Play Developer API\n * - horizon: Verifies via Meta's S2S API (verify_entitlement endpoint)\n */\nexport interface VerifyPurchaseProps {\n /** Apple App Store verification parameters. */\n apple?: (VerifyPurchaseAppleOptions | null);\n /** Google Play Store verification parameters. */\n google?: (VerifyPurchaseGoogleOptions | null);\n /** Meta Horizon (Quest) verification parameters. */\n horizon?: (VerifyPurchaseHorizonOptions | null);\n}\n\nexport type VerifyPurchaseResult = VerifyPurchaseResultAndroid | VerifyPurchaseResultHorizon | VerifyPurchaseResultIOS;\n\nexport interface VerifyPurchaseResultAndroid {\n autoRenewing: boolean;\n betaProduct: boolean;\n cancelDate?: (number | null);\n cancelReason?: (string | null);\n deferredDate?: (number | null);\n deferredSku?: (string | null);\n freeTrialEndDate: number;\n gracePeriodEndDate: number;\n parentProductId: string;\n productId: string;\n productType: string;\n purchaseDate: number;\n quantity: number;\n receiptId: string;\n renewalDate: number;\n term: string;\n termSku: string;\n testTransaction: boolean;\n}\n\n/**\n * Result from Meta Horizon verify_entitlement API.\n * Returns verification status and grant time for the entitlement.\n */\nexport interface VerifyPurchaseResultHorizon {\n /** Unix timestamp (seconds) when the entitlement was granted. */\n grantTime?: (number | null);\n /** Whether the entitlement verification succeeded. */\n success: boolean;\n}\n\nexport interface VerifyPurchaseResultIOS {\n /** Whether the receipt is valid */\n isValid: boolean;\n /** JWS representation */\n jwsRepresentation: string;\n /** Latest transaction if available */\n latestTransaction?: (Purchase | null);\n /** Receipt data string */\n receiptData: string;\n}\n\nexport interface VerifyPurchaseWithProviderError {\n code?: (string | null);\n message: string;\n}\n\nexport interface VerifyPurchaseWithProviderProps {\n iapkit?: (RequestVerifyPurchaseWithIapkitProps | null);\n provider: PurchaseVerificationProvider;\n}\n\nexport interface VerifyPurchaseWithProviderResult {\n /** Error details if verification failed */\n errors?: (VerifyPurchaseWithProviderError[] | null);\n /** IAPKit verification result */\n iapkit?: (RequestVerifyPurchaseWithIapkitResult | null);\n provider: PurchaseVerificationProvider;\n}\n\nexport type VoidResult = void;\n\n/**\n * Win-back offer input for iOS 18+ (StoreKit 2)\n * Win-back offers are used to re-engage churned subscribers.\n * The offer is automatically presented via StoreKit Message when eligible,\n * or can be applied programmatically during purchase.\n */\nexport interface WinBackOfferInputIOS {\n /** The win-back offer ID from App Store Connect */\n offerId: string;\n}\n// -- Query helper types (auto-generated)\nexport type QueryArgsMap = {\n canPresentExternalPurchaseNoticeIOS: never;\n currentEntitlementIOS: QueryCurrentEntitlementIosArgs;\n fetchProducts: QueryFetchProductsArgs;\n getActiveSubscriptions: QueryGetActiveSubscriptionsArgs;\n getAppTransactionIOS: never;\n getAvailablePurchases: QueryGetAvailablePurchasesArgs;\n getExternalPurchaseCustomLinkTokenIOS: QueryGetExternalPurchaseCustomLinkTokenIosArgs;\n getPendingTransactionsIOS: never;\n getPromotedProductIOS: never;\n getReceiptDataIOS: never;\n getStorefront: never;\n getStorefrontIOS: never;\n getTransactionJwsIOS: QueryGetTransactionJwsIosArgs;\n hasActiveSubscriptions: QueryHasActiveSubscriptionsArgs;\n isEligibleForExternalPurchaseCustomLinkIOS: never;\n isEligibleForIntroOfferIOS: QueryIsEligibleForIntroOfferIosArgs;\n isTransactionVerifiedIOS: QueryIsTransactionVerifiedIosArgs;\n latestTransactionIOS: QueryLatestTransactionIosArgs;\n subscriptionStatusIOS: QuerySubscriptionStatusIosArgs;\n validateReceiptIOS: QueryValidateReceiptIosArgs;\n};\n\nexport type QueryField<K extends keyof Query> =\n QueryArgsMap[K] extends never\n ? () => NonNullable<Query[K]>\n : undefined extends QueryArgsMap[K]\n ? (args?: QueryArgsMap[K]) => NonNullable<Query[K]>\n : (args: QueryArgsMap[K]) => NonNullable<Query[K]>;\n\nexport type QueryFieldMap = {\n [K in keyof Query]?: QueryField<K>;\n};\n// -- End query helper types\n\n// -- Mutation helper types (auto-generated)\nexport type MutationArgsMap = {\n acknowledgePurchaseAndroid: MutationAcknowledgePurchaseAndroidArgs;\n beginRefundRequestIOS: MutationBeginRefundRequestIosArgs;\n checkAlternativeBillingAvailabilityAndroid: never;\n clearTransactionIOS: never;\n consumePurchaseAndroid: MutationConsumePurchaseAndroidArgs;\n createAlternativeBillingTokenAndroid: never;\n createBillingProgramReportingDetailsAndroid: MutationCreateBillingProgramReportingDetailsAndroidArgs;\n deepLinkToSubscriptions: MutationDeepLinkToSubscriptionsArgs;\n endConnection: never;\n finishTransaction: MutationFinishTransactionArgs;\n initConnection: MutationInitConnectionArgs;\n isBillingProgramAvailableAndroid: MutationIsBillingProgramAvailableAndroidArgs;\n launchExternalLinkAndroid: MutationLaunchExternalLinkAndroidArgs;\n presentCodeRedemptionSheetIOS: never;\n presentExternalPurchaseLinkIOS: MutationPresentExternalPurchaseLinkIosArgs;\n presentExternalPurchaseNoticeSheetIOS: never;\n requestPurchase: MutationRequestPurchaseArgs;\n requestPurchaseOnPromotedProductIOS: never;\n restorePurchases: never;\n showAlternativeBillingDialogAndroid: never;\n showExternalPurchaseCustomLinkNoticeIOS: MutationShowExternalPurchaseCustomLinkNoticeIosArgs;\n showManageSubscriptionsIOS: never;\n syncIOS: never;\n validateReceipt: MutationValidateReceiptArgs;\n verifyPurchase: MutationVerifyPurchaseArgs;\n verifyPurchaseWithProvider: MutationVerifyPurchaseWithProviderArgs;\n};\n\nexport type MutationField<K extends keyof Mutation> =\n MutationArgsMap[K] extends never\n ? () => NonNullable<Mutation[K]>\n : undefined extends MutationArgsMap[K]\n ? (args?: MutationArgsMap[K]) => NonNullable<Mutation[K]>\n : (args: MutationArgsMap[K]) => NonNullable<Mutation[K]>;\n\nexport type MutationFieldMap = {\n [K in keyof Mutation]?: MutationField<K>;\n};\n// -- End mutation helper types\n\n// -- Subscription helper types (auto-generated)\nexport type SubscriptionArgsMap = {\n developerProvidedBillingAndroid: never;\n promotedProductIOS: never;\n purchaseError: never;\n purchaseUpdated: never;\n userChoiceBillingAndroid: never;\n};\n\nexport type SubscriptionField<K extends keyof Subscription> =\n SubscriptionArgsMap[K] extends never\n ? () => NonNullable<Subscription[K]>\n : undefined extends SubscriptionArgsMap[K]\n ? (args?: SubscriptionArgsMap[K]) => NonNullable<Subscription[K]>\n : (args: SubscriptionArgsMap[K]) => NonNullable<Subscription[K]>;\n\nexport type SubscriptionFieldMap = {\n [K in keyof Subscription]?: SubscriptionField<K>;\n};\n// -- End subscription helper types\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,8CAA8C;AAC9C,mEAAmE;AACnE,+EAA+E;AA6T/E,MAAM,CAAN,IAAY,SAwCX;AAxCD,WAAY,SAAS;IACnB,yDAA4C,CAAA;IAC5C,2CAA8B,CAAA;IAC9B,iDAAoC,CAAA;IACpC,gFAAmE,CAAA;IACnE,uDAA0C,CAAA;IAC1C,mDAAsC,CAAA;IACtC,iDAAoC,CAAA;IACpC,+CAAkC,CAAA;IAClC,qDAAwC,CAAA;IACxC,4CAA+B,CAAA;IAC/B,0DAA6C,CAAA;IAC7C,kDAAqC,CAAA;IACrC,+CAAkC,CAAA;IAClC,wCAA2B,CAAA;IAC3B,4CAA+B,CAAA;IAC/B,iDAAoC,CAAA;IACpC,2CAA8B,CAAA;IAC9B,mCAAsB,CAAA;IACtB,yCAA4B,CAAA;IAC5B,gCAAmB,CAAA;IACnB,6CAAgC,CAAA;IAChC,wEAA2D,CAAA;IAC3D,qFAAwE,CAAA;IACxE,4EAA+D,CAAA;IAC/D,2CAA8B,CAAA;IAC9B,6CAAgC,CAAA;IAChC,iDAAoC,CAAA;IACpC,8DAAiD,CAAA;IACjD,yCAA4B,CAAA;IAC5B,yDAA4C,CAAA;IAC5C,2CAA8B,CAAA;IAC9B,+CAAkC,CAAA;IAClC,0CAA6B,CAAA;IAC7B,oDAAuC,CAAA;IACvC,qCAAwB,CAAA;IACxB,0EAA6D,CAAA;IAC7D,gCAAmB,CAAA;IACnB,6CAAgC,CAAA;IAChC,qCAAwB,CAAA;AAC1B,CAAC,EAxCW,SAAS,KAAT,SAAS,QAwCpB;AAmmDD,mCAAmC","sourcesContent":["// ============================================================================\n// AUTO-GENERATED TYPES — DO NOT EDIT DIRECTLY\n// Run `npm run generate` after updating any *.graphql schema file.\n// ============================================================================\n\nexport interface ActiveSubscription {\n autoRenewingAndroid?: (boolean | null);\n basePlanIdAndroid?: (string | null);\n /**\n * The current plan identifier. This is:\n * - On Android: the basePlanId (e.g., \"premium\", \"premium-year\")\n * - On iOS: the productId (e.g., \"com.example.premium_monthly\", \"com.example.premium_yearly\")\n * This provides a unified way to identify which specific plan/tier the user is subscribed to.\n */\n currentPlanId?: (string | null);\n daysUntilExpirationIOS?: (number | null);\n environmentIOS?: (string | null);\n expirationDateIOS?: (number | null);\n isActive: boolean;\n productId: string;\n purchaseToken?: (string | null);\n /** Required for subscription upgrade/downgrade on Android */\n purchaseTokenAndroid?: (string | null);\n /**\n * Renewal information from StoreKit 2 (iOS only). Contains details about subscription renewal status,\n * pending upgrades/downgrades, and auto-renewal preferences.\n */\n renewalInfoIOS?: (RenewalInfoIOS | null);\n transactionDate: number;\n transactionId: string;\n /**\n * @deprecated iOS only - use daysUntilExpirationIOS instead.\n * Whether the subscription will expire soon (within 7 days).\n * Consider using daysUntilExpirationIOS for more precise control.\n */\n willExpireSoon?: (boolean | null);\n}\n\n/**\n * Alternative billing mode for Android\n * Controls which billing system is used\n * @deprecated Use enableBillingProgramAndroid with BillingProgramAndroid instead.\n * Use USER_CHOICE_BILLING for user choice billing, EXTERNAL_OFFER for alternative only.\n */\nexport type AlternativeBillingModeAndroid = 'none' | 'user-choice' | 'alternative-only';\n\nexport interface AndroidSubscriptionOfferInput {\n /** Offer token */\n offerToken: string;\n /** Product SKU */\n sku: string;\n}\n\nexport interface AppTransaction {\n appId: number;\n appTransactionId?: (string | null);\n appVersion: string;\n appVersionId: number;\n bundleId: string;\n deviceVerification: string;\n deviceVerificationNonce: string;\n environment: string;\n originalAppVersion: string;\n originalPlatform?: (string | null);\n originalPurchaseDate: number;\n preorderDate?: (number | null);\n signedDate: number;\n}\n\n/**\n * Billing program types for external content links, external offers, and external payments (Android)\n * Available in Google Play Billing Library 8.2.0+, EXTERNAL_PAYMENTS added in 8.3.0\n */\nexport type BillingProgramAndroid = 'unspecified' | 'user-choice-billing' | 'external-content-link' | 'external-offer' | 'external-payments';\n\n/**\n * Result of checking billing program availability (Android)\n * Available in Google Play Billing Library 8.2.0+\n */\nexport interface BillingProgramAvailabilityResultAndroid {\n /** The billing program that was checked */\n billingProgram: BillingProgramAndroid;\n /** Whether the billing program is available for the user */\n isAvailable: boolean;\n}\n\n/**\n * Reporting details for transactions made outside of Google Play Billing (Android)\n * Contains the external transaction token needed for reporting\n * Available in Google Play Billing Library 8.2.0+\n */\nexport interface BillingProgramReportingDetailsAndroid {\n /** The billing program that the reporting details are associated with */\n billingProgram: BillingProgramAndroid;\n /**\n * External transaction token used to report transactions made outside of Google Play Billing.\n * This token must be used when reporting the external transaction to Google.\n */\n externalTransactionToken: string;\n}\n\n/**\n * Extended billing result with sub-response code (Android)\n * Available in Google Play Billing Library 8.0.0+\n */\nexport interface BillingResultAndroid {\n /** Debug message from the billing library */\n debugMessage?: (string | null);\n /** The response code from the billing operation */\n responseCode: number;\n /**\n * Sub-response code for more granular error information (8.0+).\n * Provides additional context when responseCode indicates an error.\n */\n subResponseCode?: (SubResponseCodeAndroid | null);\n}\n\nexport interface DeepLinkOptions {\n /** Android package name to target (required on Android) */\n packageNameAndroid?: (string | null);\n /** Android SKU to open (required on Android) */\n skuAndroid?: (string | null);\n}\n\n/**\n * Launch mode for developer billing option (Android)\n * Determines how the external payment URL is launched\n * Available in Google Play Billing Library 8.3.0+\n */\nexport type DeveloperBillingLaunchModeAndroid = 'unspecified' | 'launch-in-external-browser-or-app' | 'caller-will-launch-link';\n\n/**\n * Parameters for developer billing option in purchase flow (Android)\n * Used with BillingFlowParams to enable external payments flow\n * Available in Google Play Billing Library 8.3.0+\n */\nexport interface DeveloperBillingOptionParamsAndroid {\n /** The billing program (should be EXTERNAL_PAYMENTS for external payments flow) */\n billingProgram: BillingProgramAndroid;\n /** The launch mode for the external payment link */\n launchMode: DeveloperBillingLaunchModeAndroid;\n /** The URI where the external payment will be processed */\n linkUri: string;\n}\n\n/**\n * Details provided when user selects developer billing option (Android)\n * Received via DeveloperProvidedBillingListener callback\n * Available in Google Play Billing Library 8.3.0+\n */\nexport interface DeveloperProvidedBillingDetailsAndroid {\n /**\n * External transaction token used to report transactions made through developer billing.\n * This token must be used when reporting the external transaction to Google Play.\n * Must be reported within 24 hours of the transaction.\n */\n externalTransactionToken: string;\n}\n\n/**\n * Discount amount details for one-time purchase offers (Android)\n * Available in Google Play Billing Library 7.0+\n */\nexport interface DiscountAmountAndroid {\n /** Discount amount in micro-units (1,000,000 = 1 unit of currency) */\n discountAmountMicros: string;\n /** Formatted discount amount with currency sign (e.g., \"$4.99\") */\n formattedDiscountAmount: string;\n}\n\n/**\n * Discount display information for one-time purchase offers (Android)\n * Available in Google Play Billing Library 7.0+\n */\nexport interface DiscountDisplayInfoAndroid {\n /**\n * Absolute discount amount details\n * Only returned for fixed amount discounts\n */\n discountAmount?: (DiscountAmountAndroid | null);\n /**\n * Percentage discount (e.g., 33 for 33% off)\n * Only returned for percentage-based discounts\n */\n percentageDiscount?: (number | null);\n}\n\n/**\n * Discount information returned from the store.\n * @deprecated Use the standardized SubscriptionOffer type instead for cross-platform compatibility.\n * @see https://openiap.dev/docs/types#subscription-offer\n */\nexport interface DiscountIOS {\n identifier: string;\n localizedPrice?: (string | null);\n numberOfPeriods: number;\n paymentMode: PaymentModeIOS;\n price: string;\n priceAmount: number;\n subscriptionPeriod: string;\n type: string;\n}\n\n/**\n * Standardized one-time product discount offer.\n * Provides a unified interface for one-time purchase discounts across platforms.\n *\n * Currently supported on Android (Google Play Billing 7.0+).\n * iOS does not support one-time purchase discounts in the same way.\n *\n * @see https://openiap.dev/docs/features/discount\n */\nexport interface DiscountOffer {\n /** Currency code (ISO 4217, e.g., \"USD\") */\n currency: string;\n /**\n * [Android] Fixed discount amount in micro-units.\n * Only present for fixed amount discounts.\n */\n discountAmountMicrosAndroid?: (string | null);\n /** Formatted display price string (e.g., \"$4.99\") */\n displayPrice: string;\n /** [Android] Formatted discount amount string (e.g., \"$5.00 OFF\"). */\n formattedDiscountAmountAndroid?: (string | null);\n /**\n * [Android] Original full price in micro-units before discount.\n * Divide by 1,000,000 to get the actual price.\n * Use for displaying strikethrough original price.\n */\n fullPriceMicrosAndroid?: (string | null);\n /**\n * Unique identifier for the offer.\n * - iOS: Not applicable (one-time discounts not supported)\n * - Android: offerId from ProductAndroidOneTimePurchaseOfferDetail\n */\n id?: (string | null);\n /**\n * [Android] Limited quantity information.\n * Contains maximumQuantity and remainingQuantity.\n */\n limitedQuantityInfoAndroid?: (LimitedQuantityInfoAndroid | null);\n /** [Android] List of tags associated with this offer. */\n offerTagsAndroid?: (string[] | null);\n /**\n * [Android] Offer token required for purchase.\n * Must be passed to requestPurchase() when purchasing with this offer.\n */\n offerTokenAndroid?: (string | null);\n /**\n * [Android] Percentage discount (e.g., 33 for 33% off).\n * Only present for percentage-based discounts.\n */\n percentageDiscountAndroid?: (number | null);\n /**\n * [Android] Pre-order details if this is a pre-order offer.\n * Available in Google Play Billing Library 8.1.0+\n */\n preorderDetailsAndroid?: (PreorderDetailsAndroid | null);\n /** Numeric price value */\n price: number;\n /**\n * [Android] Purchase option ID for this offer.\n * Used to identify which purchase option the user selected.\n * Available in Google Play Billing Library 7.0+\n */\n purchaseOptionIdAndroid?: (string | null);\n /** [Android] Rental details if this is a rental offer. */\n rentalDetailsAndroid?: (RentalDetailsAndroid | null);\n /** Type of discount offer */\n type: DiscountOfferType;\n /**\n * [Android] Valid time window for the offer.\n * Contains startTimeMillis and endTimeMillis.\n */\n validTimeWindowAndroid?: (ValidTimeWindowAndroid | null);\n}\n\n/**\n * iOS DiscountOffer (output type).\n * @deprecated Use the standardized SubscriptionOffer type instead for cross-platform compatibility.\n * @see https://openiap.dev/docs/types#subscription-offer\n */\nexport interface DiscountOfferIOS {\n /** Discount identifier */\n identifier: string;\n /** Key identifier for validation */\n keyIdentifier: string;\n /** Cryptographic nonce */\n nonce: string;\n /** Signature for validation */\n signature: string;\n /** Timestamp of discount offer */\n timestamp: number;\n}\n\nexport interface DiscountOfferInputIOS {\n /** Discount identifier */\n identifier: string;\n /** Key identifier for validation */\n keyIdentifier: string;\n /** Cryptographic nonce */\n nonce: string;\n /** Signature for validation */\n signature: string;\n /** Timestamp of discount offer */\n timestamp: number;\n}\n\n/**\n * Discount offer type enumeration.\n * Categorizes the type of discount or promotional offer.\n */\nexport type DiscountOfferType = 'introductory' | 'promotional' | 'one-time';\n\nexport interface EntitlementIOS {\n jsonRepresentation: string;\n sku: string;\n transactionId: string;\n}\n\nexport enum ErrorCode {\n ActivityUnavailable = 'activity-unavailable',\n AlreadyOwned = 'already-owned',\n AlreadyPrepared = 'already-prepared',\n BillingResponseJsonParseError = 'billing-response-json-parse-error',\n BillingUnavailable = 'billing-unavailable',\n ConnectionClosed = 'connection-closed',\n DeferredPayment = 'deferred-payment',\n DeveloperError = 'developer-error',\n DuplicatePurchase = 'duplicate-purchase',\n EmptySkuList = 'empty-sku-list',\n FeatureNotSupported = 'feature-not-supported',\n IapNotAvailable = 'iap-not-available',\n InitConnection = 'init-connection',\n Interrupted = 'interrupted',\n ItemNotOwned = 'item-not-owned',\n ItemUnavailable = 'item-unavailable',\n NetworkError = 'network-error',\n NotEnded = 'not-ended',\n NotPrepared = 'not-prepared',\n Pending = 'pending',\n PurchaseError = 'purchase-error',\n PurchaseVerificationFailed = 'purchase-verification-failed',\n PurchaseVerificationFinishFailed = 'purchase-verification-finish-failed',\n PurchaseVerificationFinished = 'purchase-verification-finished',\n QueryProduct = 'query-product',\n ReceiptFailed = 'receipt-failed',\n ReceiptFinished = 'receipt-finished',\n ReceiptFinishedFailed = 'receipt-finished-failed',\n RemoteError = 'remote-error',\n ServiceDisconnected = 'service-disconnected',\n ServiceError = 'service-error',\n ServiceTimeout = 'service-timeout',\n SkuNotFound = 'sku-not-found',\n SkuOfferMismatch = 'sku-offer-mismatch',\n SyncError = 'sync-error',\n TransactionValidationFailed = 'transaction-validation-failed',\n Unknown = 'unknown',\n UserCancelled = 'user-cancelled',\n UserError = 'user-error'\n}\n\n/**\n * Launch mode for external link flow (Android)\n * Determines how the external URL is launched\n * Available in Google Play Billing Library 8.2.0+\n */\nexport type ExternalLinkLaunchModeAndroid = 'unspecified' | 'launch-in-external-browser-or-app' | 'caller-will-launch-link';\n\n/**\n * Link type for external link flow (Android)\n * Specifies the type of external link destination\n * Available in Google Play Billing Library 8.2.0+\n */\nexport type ExternalLinkTypeAndroid = 'unspecified' | 'link-to-digital-content-offer' | 'link-to-app-download';\n\n/**\n * External offer availability result (Android)\n * @deprecated Use BillingProgramAvailabilityResultAndroid with isBillingProgramAvailableAsync instead\n * Available in Google Play Billing Library 6.2.0+, deprecated in 8.2.0\n */\nexport interface ExternalOfferAvailabilityResultAndroid {\n /** Whether external offers are available for the user */\n isAvailable: boolean;\n}\n\n/**\n * External offer reporting details (Android)\n * @deprecated Use BillingProgramReportingDetailsAndroid with createBillingProgramReportingDetailsAsync instead\n * Available in Google Play Billing Library 6.2.0+, deprecated in 8.2.0\n */\nexport interface ExternalOfferReportingDetailsAndroid {\n /** External transaction token for reporting external offer transactions */\n externalTransactionToken: string;\n}\n\n/** Result of showing ExternalPurchaseCustomLink notice (iOS 18.1+). */\nexport interface ExternalPurchaseCustomLinkNoticeResultIOS {\n /** Whether the user chose to continue to external purchase */\n continued: boolean;\n /** Optional error message if the presentation failed */\n error?: (string | null);\n}\n\n/**\n * Notice types for ExternalPurchaseCustomLink (iOS 18.1+).\n * Determines the style of disclosure notice to display.\n * Reference: https://developer.apple.com/documentation/storekit/externalpurchasecustomlink/noticetype\n */\nexport type ExternalPurchaseCustomLinkNoticeTypeIOS = 'browser';\n\n/** Result of requesting an ExternalPurchaseCustomLink token (iOS 18.1+). */\nexport interface ExternalPurchaseCustomLinkTokenResultIOS {\n /** Optional error message if token retrieval failed */\n error?: (string | null);\n /**\n * The external purchase token string.\n * Report this token to Apple's External Purchase Server API.\n */\n token?: (string | null);\n}\n\n/**\n * Token types for ExternalPurchaseCustomLink (iOS 18.1+).\n * Used to request different types of external purchase tokens for reporting to Apple.\n * Reference: https://developer.apple.com/documentation/storekit/externalpurchasecustomlink/token(for:)\n */\nexport type ExternalPurchaseCustomLinkTokenTypeIOS = 'acquisition' | 'services';\n\n/** Result of presenting an external purchase link */\nexport interface ExternalPurchaseLinkResultIOS {\n /** Optional error message if the presentation failed */\n error?: (string | null);\n /** Whether the user completed the external purchase flow */\n success: boolean;\n}\n\n/** User actions on external purchase notice sheet (iOS 17.4+) */\nexport type ExternalPurchaseNoticeAction = 'continue' | 'dismissed';\n\n/**\n * Result of presenting external purchase notice sheet (iOS 17.4+)\n * Returns the token when user continues to external purchase.\n */\nexport interface ExternalPurchaseNoticeResultIOS {\n /** Optional error message if the presentation failed */\n error?: (string | null);\n /**\n * External purchase token returned when user continues (iOS 17.4+).\n * This token should be reported to Apple's External Purchase Server API.\n * Only present when result is Continue.\n */\n externalPurchaseToken?: (string | null);\n /** Notice result indicating user action */\n result: ExternalPurchaseNoticeAction;\n}\n\nexport type FetchProductsResult = ProductOrSubscription[] | Product[] | ProductSubscription[] | null;\n\nexport type IapEvent = 'purchase-updated' | 'purchase-error' | 'promoted-product-ios' | 'user-choice-billing-android' | 'developer-provided-billing-android' | 'subscription-billing-issue';\n\nexport type IapPlatform = 'ios' | 'android';\n\nexport type IapStore = 'unknown' | 'apple' | 'google' | 'horizon';\n\n/** Unified purchase states from IAPKit verification response. */\nexport type IapkitPurchaseState = 'entitled' | 'pending-acknowledgment' | 'pending' | 'canceled' | 'expired' | 'ready-to-consume' | 'consumed' | 'unknown' | 'inauthentic';\n\n/** Connection initialization configuration */\nexport interface InitConnectionConfig {\n /**\n * Alternative billing mode for Android\n * If not specified, defaults to NONE (standard Google Play billing)\n * @deprecated Use enableBillingProgramAndroid instead.\n * Use USER_CHOICE_BILLING for user choice billing, EXTERNAL_OFFER for alternative only.\n */\n alternativeBillingModeAndroid?: (AlternativeBillingModeAndroid | null);\n /**\n * Enable a specific billing program for Android (7.0+)\n * When set, enables the specified billing program for external transactions.\n * - USER_CHOICE_BILLING: User can select between Google Play or alternative (7.0+)\n * - EXTERNAL_CONTENT_LINK: Link to external content (8.2.0+)\n * - EXTERNAL_OFFER: External offers for digital content (8.2.0+)\n * - EXTERNAL_PAYMENTS: Developer provided billing, Japan only (8.3.0+)\n */\n enableBillingProgramAndroid?: (BillingProgramAndroid | null);\n}\n\n/**\n * Installment plan details for subscription offers (Android)\n * Contains information about the installment plan commitment.\n * Available in Google Play Billing Library 7.0+\n */\nexport interface InstallmentPlanDetailsAndroid {\n /**\n * Committed payments count after a user signs up for this subscription plan.\n * For example, for a monthly subscription with commitmentPaymentsCount of 12,\n * users will be charged monthly for 12 months after signup.\n */\n commitmentPaymentsCount: number;\n /**\n * Subsequent committed payments count after the subscription plan renews.\n * For example, for a monthly subscription with subsequentCommitmentPaymentsCount of 12,\n * users will be committed to another 12 monthly payments when the plan renews.\n * Returns 0 if the installment plan has no subsequent commitment (reverts to normal plan).\n */\n subsequentCommitmentPaymentsCount: number;\n}\n\n/**\n * Parameters for launching an external link (Android)\n * Used with launchExternalLink to initiate external offer or app install flows\n * Available in Google Play Billing Library 8.2.0+\n */\nexport interface LaunchExternalLinkParamsAndroid {\n /** The billing program (EXTERNAL_CONTENT_LINK or EXTERNAL_OFFER) */\n billingProgram: BillingProgramAndroid;\n /** The external link launch mode */\n launchMode: ExternalLinkLaunchModeAndroid;\n /** The type of the external link */\n linkType: ExternalLinkTypeAndroid;\n /** The URI where the content will be accessed from */\n linkUri: string;\n}\n\n/**\n * Limited quantity information for one-time purchase offers (Android)\n * Available in Google Play Billing Library 7.0+\n */\nexport interface LimitedQuantityInfoAndroid {\n /** Maximum quantity a user can purchase */\n maximumQuantity: number;\n /** Remaining quantity the user can still purchase */\n remainingQuantity: number;\n}\n\nexport interface Mutation {\n /** Acknowledge a non-consumable purchase or subscription */\n acknowledgePurchaseAndroid: Promise<boolean>;\n /** Initiate a refund request for a product (iOS 15+) */\n beginRefundRequestIOS?: Promise<(string | null)>;\n /**\n * Check if alternative billing is available for this user/device\n * Step 1 of alternative billing flow\n *\n * Returns true if available, false otherwise\n * Throws OpenIapError.NotPrepared if billing client not ready\n */\n checkAlternativeBillingAvailabilityAndroid: Promise<boolean>;\n /** Clear pending transactions from the StoreKit payment queue */\n clearTransactionIOS: Promise<boolean>;\n /** Consume a purchase token so it can be repurchased */\n consumePurchaseAndroid: Promise<boolean>;\n /**\n * Create external transaction token for Google Play reporting\n * Step 3 of alternative billing flow\n * Must be called AFTER successful payment in your payment system\n * Token must be reported to Google Play backend within 24 hours\n *\n * Returns token string, or null if creation failed\n * Throws OpenIapError.NotPrepared if billing client not ready\n */\n createAlternativeBillingTokenAndroid?: Promise<(string | null)>;\n /**\n * Create reporting details for a billing program\n * Replaces the deprecated createExternalOfferReportingDetailsAsync API\n *\n * Available in Google Play Billing Library 8.2.0+\n * Returns external transaction token needed for reporting external transactions\n * Throws OpenIapError.NotPrepared if billing client not ready\n */\n createBillingProgramReportingDetailsAndroid: Promise<BillingProgramReportingDetailsAndroid>;\n /** Open the native subscription management surface */\n deepLinkToSubscriptions: Promise<void>;\n /** Close the platform billing connection */\n endConnection: Promise<boolean>;\n /** Finish a transaction after validating receipts */\n finishTransaction: Promise<void>;\n /** Establish the platform billing connection */\n initConnection: Promise<boolean>;\n /**\n * Check if a billing program is available for the current user\n * Replaces the deprecated isExternalOfferAvailableAsync API\n *\n * Available in Google Play Billing Library 8.2.0+\n * Returns availability result with isAvailable flag\n * Throws OpenIapError.NotPrepared if billing client not ready\n */\n isBillingProgramAvailableAndroid: Promise<BillingProgramAvailabilityResultAndroid>;\n /**\n * Launch external link flow for external billing programs\n * Replaces the deprecated showExternalOfferInformationDialog API\n *\n * Available in Google Play Billing Library 8.2.0+\n * Shows Play Store dialog and optionally launches external URL\n * Throws OpenIapError.NotPrepared if billing client not ready\n */\n launchExternalLinkAndroid: Promise<boolean>;\n /** Present the App Store code redemption sheet */\n presentCodeRedemptionSheetIOS: Promise<boolean>;\n /** Present external purchase custom link with StoreKit UI */\n presentExternalPurchaseLinkIOS: Promise<ExternalPurchaseLinkResultIOS>;\n /**\n * Present external purchase notice sheet (iOS 17.4+).\n * Uses ExternalPurchase.presentNoticeSheet() which returns a token when user continues.\n * Reference: https://developer.apple.com/documentation/storekit/externalpurchase/presentnoticesheet()\n */\n presentExternalPurchaseNoticeSheetIOS: Promise<ExternalPurchaseNoticeResultIOS>;\n /** Initiate a purchase flow; rely on events for final state */\n requestPurchase?: Promise<(Purchase | Purchase[] | null)>;\n /**\n * Purchase the promoted product surfaced by the App Store.\n *\n * @deprecated Use promotedProductListenerIOS to receive the productId,\n * then call requestPurchase with that SKU instead. In StoreKit 2,\n * promoted products can be purchased directly via the standard purchase flow.\n * @deprecated Use promotedProductListenerIOS + requestPurchase instead\n */\n requestPurchaseOnPromotedProductIOS: Promise<boolean>;\n /** Restore completed purchases across platforms */\n restorePurchases: Promise<void>;\n /**\n * Show alternative billing information dialog to user\n * Step 2 of alternative billing flow\n * Must be called BEFORE processing payment in your payment system\n *\n * Returns true if user accepted, false if user canceled\n * Throws OpenIapError.NotPrepared if billing client not ready\n */\n showAlternativeBillingDialogAndroid: Promise<boolean>;\n /**\n * Show ExternalPurchaseCustomLink notice sheet (iOS 18.1+).\n * Displays the system disclosure notice sheet for custom external purchase links.\n * Call this after a deliberate customer interaction before linking out to external purchases.\n * Reference: https://developer.apple.com/documentation/storekit/externalpurchasecustomlink/shownotice(type:)\n */\n showExternalPurchaseCustomLinkNoticeIOS: Promise<ExternalPurchaseCustomLinkNoticeResultIOS>;\n /** Open subscription management UI and return changed purchases (iOS 15+) */\n showManageSubscriptionsIOS: Promise<PurchaseIOS[]>;\n /** Force a StoreKit sync for transactions (iOS 15+) */\n syncIOS: Promise<boolean>;\n /**\n * Validate purchase receipts with the configured providers\n * @deprecated Use verifyPurchase\n */\n validateReceipt: Promise<VerifyPurchaseResult>;\n /** Verify purchases with the configured providers */\n verifyPurchase: Promise<VerifyPurchaseResult>;\n /** Verify purchases with a specific provider (e.g., IAPKit) */\n verifyPurchaseWithProvider: Promise<VerifyPurchaseWithProviderResult>;\n}\n\n\n\nexport type MutationAcknowledgePurchaseAndroidArgs = string;\n\nexport type MutationBeginRefundRequestIosArgs = string;\n\nexport type MutationConsumePurchaseAndroidArgs = string;\n\nexport type MutationCreateBillingProgramReportingDetailsAndroidArgs = BillingProgramAndroid;\n\nexport type MutationDeepLinkToSubscriptionsArgs = (DeepLinkOptions | null) | undefined;\n\nexport interface MutationFinishTransactionArgs {\n isConsumable?: (boolean | null);\n purchase: PurchaseInput;\n}\n\n\nexport type MutationInitConnectionArgs = (InitConnectionConfig | null) | undefined;\n\nexport type MutationIsBillingProgramAvailableAndroidArgs = BillingProgramAndroid;\n\nexport type MutationLaunchExternalLinkAndroidArgs = LaunchExternalLinkParamsAndroid;\n\nexport type MutationPresentExternalPurchaseLinkIosArgs = string;\n\nexport type MutationRequestPurchaseArgs =\n | {\n /** Per-platform purchase request props */\n request: RequestPurchasePropsByPlatforms;\n type: 'in-app';\n /** Use alternative billing (Google Play alternative billing, Apple external purchase link) */\n useAlternativeBilling?: boolean | null;\n }\n | {\n /** Per-platform subscription request props */\n request: RequestSubscriptionPropsByPlatforms;\n type: 'subs';\n /** Use alternative billing (Google Play alternative billing, Apple external purchase link) */\n useAlternativeBilling?: boolean | null;\n };\n\n\nexport type MutationShowExternalPurchaseCustomLinkNoticeIosArgs = ExternalPurchaseCustomLinkNoticeTypeIOS;\n\nexport type MutationValidateReceiptArgs = VerifyPurchaseProps;\n\nexport type MutationVerifyPurchaseArgs = VerifyPurchaseProps;\n\nexport type MutationVerifyPurchaseWithProviderArgs = VerifyPurchaseWithProviderProps;\n\n/**\n * Payment mode for subscription offers.\n * Determines how the user pays during the offer period.\n */\nexport type PaymentMode = 'free-trial' | 'pay-as-you-go' | 'pay-up-front' | 'unknown';\n\nexport type PaymentModeIOS = 'empty' | 'free-trial' | 'pay-as-you-go' | 'pay-up-front';\n\n/**\n * Pending purchase update for subscription upgrades/downgrades (Android)\n * When a user initiates a subscription change (upgrade/downgrade), the new purchase\n * may be pending until the current billing period ends. This type contains the\n * details of the pending change.\n * Available in Google Play Billing Library 5.0+\n */\nexport interface PendingPurchaseUpdateAndroid {\n /**\n * Product IDs for the pending purchase update.\n * These are the new products the user is switching to.\n */\n products: string[];\n /**\n * Purchase token for the pending transaction.\n * Use this token to track or manage the pending purchase update.\n */\n purchaseToken: string;\n}\n\n/**\n * Pre-order details for one-time purchase products (Android)\n * Available in Google Play Billing Library 8.1.0+\n */\nexport interface PreorderDetailsAndroid {\n /**\n * Pre-order presale end time in milliseconds since epoch.\n * This is when the presale period ends and the product will be released.\n */\n preorderPresaleEndTimeMillis: string;\n /**\n * Pre-order release time in milliseconds since epoch.\n * This is when the product will be available to users who pre-ordered.\n */\n preorderReleaseTimeMillis: string;\n}\n\nexport interface PricingPhaseAndroid {\n billingCycleCount: number;\n billingPeriod: string;\n formattedPrice: string;\n priceAmountMicros: string;\n priceCurrencyCode: string;\n recurrenceMode: number;\n}\n\nexport interface PricingPhasesAndroid {\n pricingPhaseList: PricingPhaseAndroid[];\n}\n\nexport type Product = ProductAndroid | ProductIOS;\n\nexport interface ProductAndroid extends ProductCommon {\n currency: string;\n debugDescription?: (string | null);\n description: string;\n /**\n * Standardized discount offers for one-time products.\n * Cross-platform type with Android-specific fields using suffix.\n * @see https://openiap.dev/docs/types#discount-offer\n */\n discountOffers?: (DiscountOffer[] | null);\n displayName?: (string | null);\n displayPrice: string;\n id: string;\n nameAndroid: string;\n /**\n * One-time purchase offer details including discounts (Android)\n * Returns all eligible offers. Available in Google Play Billing Library 7.0+\n * @deprecated Use discountOffers instead for cross-platform compatibility.\n * @deprecated Use discountOffers instead\n */\n oneTimePurchaseOfferDetailsAndroid?: (ProductAndroidOneTimePurchaseOfferDetail[] | null);\n platform: 'android';\n price?: (number | null);\n /**\n * Product-level status code indicating fetch result (Android 8.0+)\n * OK = product fetched successfully\n * NOT_FOUND = SKU doesn't exist\n * NO_OFFERS_AVAILABLE = user not eligible for any offers\n * Available in Google Play Billing Library 8.0.0+\n */\n productStatusAndroid?: (ProductStatusAndroid | null);\n /**\n * @deprecated Use subscriptionOffers instead for cross-platform compatibility.\n * @deprecated Use subscriptionOffers instead\n */\n subscriptionOfferDetailsAndroid?: (ProductSubscriptionAndroidOfferDetails[] | null);\n /**\n * Standardized subscription offers.\n * Cross-platform type with Android-specific fields using suffix.\n * @see https://openiap.dev/docs/types#subscription-offer\n */\n subscriptionOffers?: (SubscriptionOffer[] | null);\n title: string;\n type: 'in-app';\n}\n\n/**\n * One-time purchase offer details (Android).\n * Available in Google Play Billing Library 7.0+\n * @deprecated Use the standardized DiscountOffer type instead for cross-platform compatibility.\n * @see https://openiap.dev/docs/types#discount-offer\n */\nexport interface ProductAndroidOneTimePurchaseOfferDetail {\n /**\n * Discount display information\n * Only available for discounted offers\n */\n discountDisplayInfo?: (DiscountDisplayInfoAndroid | null);\n formattedPrice: string;\n /**\n * Full (non-discounted) price in micro-units\n * Only available for discounted offers\n */\n fullPriceMicros?: (string | null);\n /** Limited quantity information */\n limitedQuantityInfo?: (LimitedQuantityInfoAndroid | null);\n /** Offer ID */\n offerId?: (string | null);\n /** List of offer tags */\n offerTags: string[];\n /** Offer token for use in BillingFlowParams when purchasing */\n offerToken: string;\n /**\n * Pre-order details for products available for pre-order\n * Available in Google Play Billing Library 8.1.0+\n */\n preorderDetailsAndroid?: (PreorderDetailsAndroid | null);\n priceAmountMicros: string;\n priceCurrencyCode: string;\n /**\n * Purchase option ID for this offer (Android)\n * Used to identify which purchase option the user selected.\n * Available in Google Play Billing Library 7.0+\n */\n purchaseOptionId?: (string | null);\n /** Rental details for rental offers */\n rentalDetailsAndroid?: (RentalDetailsAndroid | null);\n /** Valid time window for the offer */\n validTimeWindow?: (ValidTimeWindowAndroid | null);\n}\n\nexport interface ProductCommon {\n currency: string;\n debugDescription?: (string | null);\n description: string;\n displayName?: (string | null);\n displayPrice: string;\n id: string;\n platform: 'android' | 'ios';\n price?: (number | null);\n title: string;\n type: 'in-app' | 'subs';\n} \n\nexport interface ProductIOS extends ProductCommon {\n currency: string;\n debugDescription?: (string | null);\n description: string;\n displayName?: (string | null);\n displayNameIOS: string;\n displayPrice: string;\n id: string;\n isFamilyShareableIOS: boolean;\n jsonRepresentationIOS: string;\n platform: 'ios';\n price?: (number | null);\n /**\n * @deprecated Use subscriptionOffers instead for cross-platform compatibility.\n * @deprecated Use subscriptionOffers instead\n */\n subscriptionInfoIOS?: (SubscriptionInfoIOS | null);\n /**\n * Standardized subscription offers.\n * Cross-platform type with iOS-specific fields using suffix.\n * Note: iOS does not support one-time product discounts.\n * @see https://openiap.dev/docs/types#subscription-offer\n */\n subscriptionOffers?: (SubscriptionOffer[] | null);\n title: string;\n type: 'in-app';\n typeIOS: ProductTypeIOS;\n}\n\nexport type ProductOrSubscription = Product | ProductSubscription;\n\nexport type ProductQueryType = 'in-app' | 'subs' | 'all';\n\nexport interface ProductRequest {\n skus: string[];\n type?: (ProductQueryType | null);\n}\n\n/**\n * Status code for individual products returned from queryProductDetailsAsync (Android)\n * Prior to 8.0, products that couldn't be fetched were simply not returned.\n * With 8.0+, these products are returned with a status code explaining why.\n * Available in Google Play Billing Library 8.0.0+\n */\nexport type ProductStatusAndroid = 'ok' | 'not-found' | 'no-offers-available' | 'unknown';\n\nexport type ProductSubscription = ProductSubscriptionAndroid | ProductSubscriptionIOS;\n\nexport interface ProductSubscriptionAndroid extends ProductCommon {\n currency: string;\n debugDescription?: (string | null);\n description: string;\n /**\n * Standardized discount offers for one-time products.\n * Cross-platform type with Android-specific fields using suffix.\n * @see https://openiap.dev/docs/types#discount-offer\n */\n discountOffers?: (DiscountOffer[] | null);\n displayName?: (string | null);\n displayPrice: string;\n id: string;\n nameAndroid: string;\n /**\n * One-time purchase offer details including discounts (Android)\n * Returns all eligible offers. Available in Google Play Billing Library 7.0+\n * @deprecated Use discountOffers instead for cross-platform compatibility.\n * @deprecated Use discountOffers instead\n */\n oneTimePurchaseOfferDetailsAndroid?: (ProductAndroidOneTimePurchaseOfferDetail[] | null);\n platform: 'android';\n price?: (number | null);\n /**\n * Product-level status code indicating fetch result (Android 8.0+)\n * OK = product fetched successfully\n * NOT_FOUND = SKU doesn't exist\n * NO_OFFERS_AVAILABLE = user not eligible for any offers\n * Available in Google Play Billing Library 8.0.0+\n */\n productStatusAndroid?: (ProductStatusAndroid | null);\n /**\n * @deprecated Use subscriptionOffers instead for cross-platform compatibility.\n * @deprecated Use subscriptionOffers instead\n */\n subscriptionOfferDetailsAndroid: ProductSubscriptionAndroidOfferDetails[];\n /**\n * Standardized subscription offers.\n * Cross-platform type with Android-specific fields using suffix.\n * @see https://openiap.dev/docs/types#subscription-offer\n */\n subscriptionOffers: SubscriptionOffer[];\n title: string;\n type: 'subs';\n}\n\n/**\n * Subscription offer details (Android).\n * @deprecated Use the standardized SubscriptionOffer type instead for cross-platform compatibility.\n * @see https://openiap.dev/docs/types#subscription-offer\n */\nexport interface ProductSubscriptionAndroidOfferDetails {\n basePlanId: string;\n /**\n * Installment plan details for this subscription offer.\n * Only set for installment subscription plans; null for non-installment plans.\n * Available in Google Play Billing Library 7.0+\n */\n installmentPlanDetails?: (InstallmentPlanDetailsAndroid | null);\n offerId?: (string | null);\n offerTags: string[];\n offerToken: string;\n pricingPhases: PricingPhasesAndroid;\n}\n\nexport interface ProductSubscriptionIOS extends ProductCommon {\n currency: string;\n debugDescription?: (string | null);\n description: string;\n /**\n * @deprecated Use subscriptionOffers instead for cross-platform compatibility.\n * @deprecated Use subscriptionOffers instead\n */\n discountsIOS?: (DiscountIOS[] | null);\n displayName?: (string | null);\n displayNameIOS: string;\n displayPrice: string;\n id: string;\n introductoryPriceAsAmountIOS?: (string | null);\n introductoryPriceIOS?: (string | null);\n introductoryPriceNumberOfPeriodsIOS?: (string | null);\n introductoryPricePaymentModeIOS: PaymentModeIOS;\n introductoryPriceSubscriptionPeriodIOS?: (SubscriptionPeriodIOS | null);\n isFamilyShareableIOS: boolean;\n jsonRepresentationIOS: string;\n platform: 'ios';\n price?: (number | null);\n /**\n * @deprecated Use subscriptionOffers instead for cross-platform compatibility.\n * @deprecated Use subscriptionOffers instead\n */\n subscriptionInfoIOS?: (SubscriptionInfoIOS | null);\n /**\n * Standardized subscription offers.\n * Cross-platform type with iOS-specific fields using suffix.\n * @see https://openiap.dev/docs/types#subscription-offer\n */\n subscriptionOffers?: (SubscriptionOffer[] | null);\n subscriptionPeriodNumberIOS?: (string | null);\n subscriptionPeriodUnitIOS?: (SubscriptionPeriodIOS | null);\n title: string;\n type: 'subs';\n typeIOS: ProductTypeIOS;\n}\n\nexport type ProductType = 'in-app' | 'subs';\n\nexport type ProductTypeIOS = 'consumable' | 'non-consumable' | 'auto-renewable-subscription' | 'non-renewing-subscription';\n\n/**\n * JWS promotional offer input for iOS 15+ (StoreKit 2, WWDC 2025).\n * New signature format using compact JWS string for promotional offers.\n * This provides a simpler alternative to the legacy signature-based promotional offers.\n * Back-deployed to iOS 15.\n */\nexport interface PromotionalOfferJwsInputIOS {\n /**\n * Compact JWS string signed by your server.\n * The JWS should contain the promotional offer signature data.\n * Format: header.payload.signature (base64url encoded)\n */\n jws: string;\n /** The promotional offer identifier from App Store Connect */\n offerId: string;\n}\n\nexport type Purchase = PurchaseAndroid | PurchaseIOS;\n\nexport interface PurchaseAndroid extends PurchaseCommon {\n autoRenewingAndroid?: (boolean | null);\n currentPlanId?: (string | null);\n dataAndroid?: (string | null);\n developerPayloadAndroid?: (string | null);\n id: string;\n ids?: (string[] | null);\n isAcknowledgedAndroid?: (boolean | null);\n isAutoRenewing: boolean;\n /**\n * Whether the subscription is suspended (Android)\n * A suspended subscription means the user's payment method failed and they need to fix it.\n * Users should be directed to the subscription center to resolve the issue.\n * Do NOT grant entitlements for suspended subscriptions.\n * Available in Google Play Billing Library 8.1.0+\n */\n isSuspendedAndroid?: (boolean | null);\n obfuscatedAccountIdAndroid?: (string | null);\n obfuscatedProfileIdAndroid?: (string | null);\n packageNameAndroid?: (string | null);\n /**\n * Pending purchase update for uncommitted subscription upgrade/downgrade (Android)\n * Contains the new products and purchase token for the pending transaction.\n * Returns null if no pending update exists.\n * Available in Google Play Billing Library 5.0+\n */\n pendingPurchaseUpdateAndroid?: (PendingPurchaseUpdateAndroid | null);\n /** @deprecated Use store instead */\n platform: IapPlatform;\n productId: string;\n purchaseState: PurchaseState;\n purchaseToken?: (string | null);\n quantity: number;\n signatureAndroid?: (string | null);\n /** Store where purchase was made */\n store: IapStore;\n transactionDate: number;\n transactionId?: (string | null);\n}\n\nexport interface PurchaseCommon {\n /**\n * The current plan identifier. This is:\n * - On Android: the basePlanId (e.g., \"premium\", \"premium-year\")\n * - On iOS: the productId (e.g., \"com.example.premium_monthly\", \"com.example.premium_yearly\")\n * This provides a unified way to identify which specific plan/tier the user is subscribed to.\n */\n currentPlanId?: (string | null);\n id: string;\n ids?: (string[] | null);\n isAutoRenewing: boolean;\n /** @deprecated Use store instead */\n platform: IapPlatform;\n productId: string;\n purchaseState: PurchaseState;\n /** Unified purchase token (iOS JWS, Android purchaseToken) */\n purchaseToken?: (string | null);\n quantity: number;\n /** Store where purchase was made */\n store: IapStore;\n transactionDate: number;\n}\n\nexport interface PurchaseError {\n code: ErrorCode;\n debugMessage?: (string | null);\n message: string;\n productId?: (string | null);\n}\n\nexport interface PurchaseIOS extends PurchaseCommon {\n appAccountToken?: (string | null);\n appBundleIdIOS?: (string | null);\n countryCodeIOS?: (string | null);\n currencyCodeIOS?: (string | null);\n currencySymbolIOS?: (string | null);\n currentPlanId?: (string | null);\n environmentIOS?: (string | null);\n expirationDateIOS?: (number | null);\n id: string;\n ids?: (string[] | null);\n isAutoRenewing: boolean;\n isUpgradedIOS?: (boolean | null);\n offerIOS?: (PurchaseOfferIOS | null);\n originalTransactionDateIOS?: (number | null);\n originalTransactionIdentifierIOS?: (string | null);\n ownershipTypeIOS?: (string | null);\n /** @deprecated Use store instead */\n platform: IapPlatform;\n productId: string;\n purchaseState: PurchaseState;\n purchaseToken?: (string | null);\n quantity: number;\n quantityIOS?: (number | null);\n reasonIOS?: (string | null);\n reasonStringRepresentationIOS?: (string | null);\n renewalInfoIOS?: (RenewalInfoIOS | null);\n revocationDateIOS?: (number | null);\n revocationReasonIOS?: (string | null);\n /** Store where purchase was made */\n store: IapStore;\n storefrontCountryCodeIOS?: (string | null);\n subscriptionGroupIdIOS?: (string | null);\n transactionDate: number;\n transactionId: string;\n transactionReasonIOS?: (string | null);\n webOrderLineItemIdIOS?: (string | null);\n}\n\nexport type PurchaseInput = Purchase;\n\nexport interface PurchaseOfferIOS {\n id: string;\n paymentMode: string;\n type: string;\n}\n\nexport interface PurchaseOptions {\n /** Also emit results through the iOS event listeners */\n alsoPublishToEventListenerIOS?: (boolean | null);\n /**\n * Include suspended subscriptions in the result (Android 8.1+).\n * Suspended subscriptions have isSuspendedAndroid=true and should NOT be granted entitlements.\n * Users should be directed to the subscription center to resolve payment issues.\n * Default: false (only active subscriptions are returned)\n */\n includeSuspendedAndroid?: (boolean | null);\n /** Limit to currently active items on iOS */\n onlyIncludeActiveItemsIOS?: (boolean | null);\n}\n\nexport type PurchaseState = 'pending' | 'purchased' | 'unknown';\n\nexport type PurchaseVerificationProvider = 'iapkit';\n\nexport interface Query {\n /**\n * Check if external purchase notice sheet can be presented (iOS 17.4+)\n * Uses ExternalPurchase.canPresent\n */\n canPresentExternalPurchaseNoticeIOS: Promise<boolean>;\n /** Get current StoreKit 2 entitlements (iOS 15+) */\n currentEntitlementIOS?: Promise<(PurchaseIOS | null)>;\n /** Retrieve products or subscriptions from the store */\n fetchProducts: Promise<(ProductOrSubscription[] | Product[] | ProductSubscription[] | null)>;\n /** Get active subscriptions (filters by subscriptionIds when provided) */\n getActiveSubscriptions: Promise<ActiveSubscription[]>;\n /** Fetch the current app transaction (iOS 16+) */\n getAppTransactionIOS?: Promise<(AppTransaction | null)>;\n /** Get all available purchases for the current user */\n getAvailablePurchases: Promise<Purchase[]>;\n /**\n * Get external purchase token for reporting to Apple (iOS 18.1+).\n * Use this token with Apple's External Purchase Server API to report transactions.\n * Reference: https://developer.apple.com/documentation/storekit/externalpurchasecustomlink/token(for:)\n */\n getExternalPurchaseCustomLinkTokenIOS: Promise<ExternalPurchaseCustomLinkTokenResultIOS>;\n /** Retrieve all pending transactions in the StoreKit queue */\n getPendingTransactionsIOS: Promise<PurchaseIOS[]>;\n /** Get the currently promoted product (iOS 11+) */\n getPromotedProductIOS?: Promise<(ProductIOS | null)>;\n /** Get base64-encoded receipt data for validation */\n getReceiptDataIOS?: Promise<(string | null)>;\n /** Get the current storefront country code */\n getStorefront: Promise<string>;\n /**\n * Get the current App Store storefront country code\n * @deprecated Use getStorefront\n */\n getStorefrontIOS: Promise<string>;\n /** Get the transaction JWS (StoreKit 2) */\n getTransactionJwsIOS?: Promise<(string | null)>;\n /** Check whether the user has active subscriptions */\n hasActiveSubscriptions: Promise<boolean>;\n /**\n * Check if app is eligible for ExternalPurchaseCustomLink API (iOS 18.1+).\n * Returns true if the app can use custom external purchase links.\n * Reference: https://developer.apple.com/documentation/storekit/externalpurchasecustomlink/iseligible\n */\n isEligibleForExternalPurchaseCustomLinkIOS: Promise<boolean>;\n /** Check introductory offer eligibility for a subscription group */\n isEligibleForIntroOfferIOS: Promise<boolean>;\n /** Verify a StoreKit 2 transaction signature */\n isTransactionVerifiedIOS: Promise<boolean>;\n /** Get the latest transaction for a product using StoreKit 2 */\n latestTransactionIOS?: Promise<(PurchaseIOS | null)>;\n /** Get StoreKit 2 subscription status details (iOS 15+) */\n subscriptionStatusIOS: Promise<SubscriptionStatusIOS[]>;\n /**\n * Validate a receipt for a specific product\n * @deprecated Use verifyPurchase\n */\n validateReceiptIOS: Promise<VerifyPurchaseResultIOS>;\n}\n\n\n\nexport type QueryCurrentEntitlementIosArgs = string;\n\nexport type QueryFetchProductsArgs = ProductRequest;\n\nexport type QueryGetActiveSubscriptionsArgs = (string[] | null) | undefined;\n\nexport type QueryGetAvailablePurchasesArgs = (PurchaseOptions | null) | undefined;\n\nexport type QueryGetExternalPurchaseCustomLinkTokenIosArgs = ExternalPurchaseCustomLinkTokenTypeIOS;\n\nexport type QueryGetTransactionJwsIosArgs = string;\n\nexport type QueryHasActiveSubscriptionsArgs = (string[] | null) | undefined;\n\nexport type QueryIsEligibleForIntroOfferIosArgs = string;\n\nexport type QueryIsTransactionVerifiedIosArgs = string;\n\nexport type QueryLatestTransactionIosArgs = string;\n\nexport type QuerySubscriptionStatusIosArgs = string;\n\nexport type QueryValidateReceiptIosArgs = VerifyPurchaseProps;\n\nexport interface RefundResultIOS {\n message?: (string | null);\n status: string;\n}\n\n/**\n * Subscription renewal information from Product.SubscriptionInfo.RenewalInfo\n * https://developer.apple.com/documentation/storekit/product/subscriptioninfo/renewalinfo\n */\nexport interface RenewalInfoIOS {\n autoRenewPreference?: (string | null);\n /**\n * When subscription expires due to cancellation/billing issue\n * Possible values: \"VOLUNTARY\", \"BILLING_ERROR\", \"DID_NOT_AGREE_TO_PRICE_INCREASE\", \"PRODUCT_NOT_AVAILABLE\", \"UNKNOWN\"\n */\n expirationReason?: (string | null);\n /**\n * Grace period expiration date (milliseconds since epoch)\n * When set, subscription is in grace period (billing issue but still has access)\n */\n gracePeriodExpirationDate?: (number | null);\n /**\n * True if subscription failed to renew due to billing issue and is retrying\n * Note: Not directly available in RenewalInfo, available in Status\n */\n isInBillingRetry?: (boolean | null);\n jsonRepresentation?: (string | null);\n /**\n * Product ID that will be used on next renewal (when user upgrades/downgrades)\n * If set and different from current productId, subscription will change on expiration\n */\n pendingUpgradeProductId?: (string | null);\n /**\n * User's response to subscription price increase\n * Possible values: \"AGREED\", \"PENDING\", null (no price increase)\n */\n priceIncreaseStatus?: (string | null);\n /**\n * Expected renewal date (milliseconds since epoch)\n * For active subscriptions, when the next renewal/charge will occur\n */\n renewalDate?: (number | null);\n /** Offer ID applied to next renewal (promotional offer, subscription offer code, etc.) */\n renewalOfferId?: (string | null);\n /**\n * Type of offer applied to next renewal\n * Possible values: \"PROMOTIONAL\", \"SUBSCRIPTION_OFFER_CODE\", \"WIN_BACK\", etc.\n */\n renewalOfferType?: (string | null);\n willAutoRenew: boolean;\n}\n\n/**\n * Rental details for one-time purchase products that can be rented (Android)\n * Available in Google Play Billing Library 7.0+\n */\nexport interface RentalDetailsAndroid {\n /**\n * Rental expiration period in ISO 8601 format\n * Time after rental period ends when user can still extend\n */\n rentalExpirationPeriod?: (string | null);\n /** Rental period in ISO 8601 format (e.g., P7D for 7 days) */\n rentalPeriod: string;\n}\n\nexport interface RequestPurchaseAndroidProps {\n /**\n * Developer billing option parameters for external payments flow (8.3.0+).\n * When provided, the purchase flow will show a side-by-side choice between\n * Google Play Billing and the developer's external payment option.\n */\n developerBillingOption?: (DeveloperBillingOptionParamsAndroid | null);\n /**\n * Personalized offer flag.\n * When true, indicates the price was customized for this user.\n */\n isOfferPersonalized?: (boolean | null);\n /** Obfuscated account ID */\n obfuscatedAccountId?: (string | null);\n /** Obfuscated profile ID */\n obfuscatedProfileId?: (string | null);\n /**\n * Offer token for one-time purchase discounts (7.0+).\n * Pass the offerToken from oneTimePurchaseOfferDetailsAndroid or discountOffers\n * to apply a discount offer to the purchase.\n */\n offerToken?: (string | null);\n /** List of product SKUs */\n skus: string[];\n}\n\nexport interface RequestPurchaseIosProps {\n /**\n * Advanced commerce data token (iOS 15+).\n * Used with StoreKit 2's Product.PurchaseOption.custom API for passing\n * campaign tokens, affiliate IDs, or other attribution data.\n * The data is formatted as JSON: {\"signatureInfo\": {\"token\": \"<value>\"}}\n */\n advancedCommerceData?: (string | null);\n /** Auto-finish transaction (dangerous) */\n andDangerouslyFinishTransactionAutomatically?: (boolean | null);\n /** App account token for user tracking */\n appAccountToken?: (string | null);\n /** Purchase quantity */\n quantity?: (number | null);\n /** Product SKU */\n sku: string;\n /**\n * Promotional offer to apply (subscriptions only, ignored for one-time purchases).\n * iOS only supports promotional offers for auto-renewable subscriptions.\n */\n withOffer?: (DiscountOfferInputIOS | null);\n}\n\nexport type RequestPurchaseProps =\n | {\n /** Per-platform purchase request props */\n request: RequestPurchasePropsByPlatforms;\n type: 'in-app';\n /** Use alternative billing (Google Play alternative billing, Apple external purchase link) */\n useAlternativeBilling?: boolean | null;\n }\n | {\n /** Per-platform subscription request props */\n request: RequestSubscriptionPropsByPlatforms;\n type: 'subs';\n /** Use alternative billing (Google Play alternative billing, Apple external purchase link) */\n useAlternativeBilling?: boolean | null;\n };\n\n/**\n * Platform-specific purchase request parameters.\n *\n * Note: \"Platforms\" refers to the SDK/OS level (apple, google), not the store.\n * - apple: Always targets App Store\n * - google: Targets Play Store by default, or Horizon when built with horizon flavor\n * (determined at build time, not runtime)\n */\nexport interface RequestPurchasePropsByPlatforms {\n /** @deprecated Use google instead */\n android?: (RequestPurchaseAndroidProps | null);\n /** Apple-specific purchase parameters */\n apple?: (RequestPurchaseIosProps | null);\n /** Google-specific purchase parameters */\n google?: (RequestPurchaseAndroidProps | null);\n /** @deprecated Use apple instead */\n ios?: (RequestPurchaseIosProps | null);\n}\n\nexport type RequestPurchaseResult = Purchase | Purchase[] | null;\n\nexport interface RequestSubscriptionAndroidProps {\n /**\n * Developer billing option parameters for external payments flow (8.3.0+).\n * When provided, the purchase flow will show a side-by-side choice between\n * Google Play Billing and the developer's external payment option.\n */\n developerBillingOption?: (DeveloperBillingOptionParamsAndroid | null);\n /**\n * Personalized offer flag.\n * When true, indicates the price was customized for this user.\n */\n isOfferPersonalized?: (boolean | null);\n /** Obfuscated account ID */\n obfuscatedAccountId?: (string | null);\n /** Obfuscated profile ID */\n obfuscatedProfileId?: (string | null);\n /** Purchase token for upgrades/downgrades */\n purchaseToken?: (string | null);\n /**\n * Replacement mode for subscription changes\n * @deprecated Use subscriptionProductReplacementParams instead for item-level replacement (8.1.0+)\n */\n replacementMode?: (number | null);\n /** List of subscription SKUs */\n skus: string[];\n /** Subscription offers */\n subscriptionOffers?: (AndroidSubscriptionOfferInput[] | null);\n /**\n * Product-level replacement parameters (8.1.0+)\n * Use this instead of replacementMode for item-level replacement\n */\n subscriptionProductReplacementParams?: (SubscriptionProductReplacementParamsAndroid | null);\n}\n\nexport interface RequestSubscriptionIosProps {\n /**\n * Advanced commerce data token (iOS 15+).\n * Used with StoreKit 2's Product.PurchaseOption.custom API for passing\n * campaign tokens, affiliate IDs, or other attribution data.\n * The data is formatted as JSON: {\"signatureInfo\": {\"token\": \"<value>\"}}\n */\n advancedCommerceData?: (string | null);\n andDangerouslyFinishTransactionAutomatically?: (boolean | null);\n appAccountToken?: (string | null);\n /**\n * Override introductory offer eligibility (iOS 15+, WWDC 2025).\n * Set to true to indicate the user is eligible for introductory offer,\n * or false to indicate they are not. When nil, the system determines eligibility.\n * Back-deployed to iOS 15.\n */\n introductoryOfferEligibility?: (boolean | null);\n /**\n * JWS promotional offer (iOS 15+, WWDC 2025).\n * New signature format using compact JWS string for promotional offers.\n * Back-deployed to iOS 15.\n */\n promotionalOfferJWS?: (PromotionalOfferJwsInputIOS | null);\n quantity?: (number | null);\n sku: string;\n /**\n * Win-back offer to apply (iOS 18+)\n * Used to re-engage churned subscribers with a discount or free trial.\n * The offer is available when the customer is eligible and can be discovered\n * via StoreKit Message (automatic) or subscription offer APIs.\n */\n winBackOffer?: (WinBackOfferInputIOS | null);\n /**\n * Promotional offer to apply for subscription purchases.\n * Requires server-signed offer with nonce, timestamp, keyId, and signature.\n */\n withOffer?: (DiscountOfferInputIOS | null);\n}\n\n/**\n * Platform-specific subscription request parameters.\n *\n * Note: \"Platforms\" refers to the SDK/OS level (apple, google), not the store.\n * - apple: Always targets App Store\n * - google: Targets Play Store by default, or Horizon when built with horizon flavor\n * (determined at build time, not runtime)\n */\nexport interface RequestSubscriptionPropsByPlatforms {\n /** @deprecated Use google instead */\n android?: (RequestSubscriptionAndroidProps | null);\n /** Apple-specific subscription parameters */\n apple?: (RequestSubscriptionIosProps | null);\n /** Google-specific subscription parameters */\n google?: (RequestSubscriptionAndroidProps | null);\n /** @deprecated Use apple instead */\n ios?: (RequestSubscriptionIosProps | null);\n}\n\nexport interface RequestVerifyPurchaseWithIapkitAppleProps {\n /** The JWS token returned with the purchase response. */\n jws: string;\n}\n\nexport interface RequestVerifyPurchaseWithIapkitGoogleProps {\n /** The token provided to the user's device when the product or subscription was purchased. */\n purchaseToken: string;\n}\n\n/**\n * Platform-specific verification parameters for IAPKit.\n *\n * - apple: Verifies via App Store (JWS token)\n * - google: Verifies via Play Store (purchase token)\n */\nexport interface RequestVerifyPurchaseWithIapkitProps {\n /** API key used for the Authorization header (Bearer {apiKey}). */\n apiKey?: (string | null);\n /** Apple App Store verification parameters. */\n apple?: (RequestVerifyPurchaseWithIapkitAppleProps | null);\n /** Google Play Store verification parameters. */\n google?: (RequestVerifyPurchaseWithIapkitGoogleProps | null);\n}\n\nexport interface RequestVerifyPurchaseWithIapkitResult {\n /** Whether the purchase is valid (not falsified). */\n isValid: boolean;\n /** The current state of the purchase. */\n state: IapkitPurchaseState;\n store: IapStore;\n}\n\n/**\n * Sub-response codes for more granular purchase error information (Android)\n * Available in Google Play Billing Library 8.0.0+\n */\nexport type SubResponseCodeAndroid = 'no-applicable-sub-response-code' | 'payment-declined-due-to-insufficient-funds' | 'user-ineligible';\n\nexport interface Subscription {\n /**\n * Fires when a user selects developer billing in the External Payments flow (Android only)\n * Triggered when the user chooses to pay via the developer's external payment option\n * instead of Google Play Billing in the side-by-side choice dialog.\n * Contains the externalTransactionToken needed to report the transaction.\n * Available in Google Play Billing Library 8.3.0+\n */\n developerProvidedBillingAndroid: DeveloperProvidedBillingDetailsAndroid;\n /** Fires when the App Store surfaces a promoted product (iOS only) */\n promotedProductIOS: string;\n /** Fires when a purchase fails or is cancelled */\n purchaseError: PurchaseError;\n /** Fires when a purchase completes successfully or a pending purchase resolves */\n purchaseUpdated: Purchase;\n /**\n * Fires when an active subscription enters a billing-issue state that needs user action\n * (payment method failed, card expired, etc.). Cross-platform unification:\n *\n * - iOS 18+: delivered via StoreKit 2 `Message.Reason.billingIssue`.\n * - Android (Play flavor, Billing 8.1+): emitted when `isSuspended == true` is first detected\n * on a previously healthy subscription. Requires Google Play Billing Library 8.1.0 or newer.\n * - Android (Horizon flavor): NOT emitted. The Horizon Billing Compatibility SDK implements\n * the Play Billing 7.0 API surface which does not expose a suspended-subscription signal.\n *\n * Listeners should not assume the event will fire on every store. Direct users to the\n * platform subscription management UI (`deepLinkToSubscriptions`) to resolve the issue.\n */\n subscriptionBillingIssue: Purchase;\n /**\n * Fires when a user selects alternative billing in the User Choice Billing dialog (Android only)\n * Only triggered when the user selects alternative billing instead of Google Play billing\n */\n userChoiceBillingAndroid: UserChoiceBillingDetails;\n}\n\n\nexport interface SubscriptionInfoIOS {\n introductoryOffer?: (SubscriptionOfferIOS | null);\n promotionalOffers?: (SubscriptionOfferIOS[] | null);\n subscriptionGroupId: string;\n subscriptionPeriod: SubscriptionPeriodValueIOS;\n}\n\n/**\n * Standardized subscription discount/promotional offer.\n * Provides a unified interface for subscription offers across iOS and Android.\n *\n * Both platforms support subscription offers with different implementations:\n * - iOS: Introductory offers, promotional offers with server-side signatures\n * - Android: Offer tokens with pricing phases\n *\n * @see https://openiap.dev/docs/types/ios#discount-offer\n * @see https://openiap.dev/docs/types/android#subscription-offer\n */\nexport interface SubscriptionOffer {\n /**\n * [Android] Base plan identifier.\n * Identifies which base plan this offer belongs to.\n */\n basePlanIdAndroid?: (string | null);\n /** Currency code (ISO 4217, e.g., \"USD\") */\n currency?: (string | null);\n /** Formatted display price string (e.g., \"$9.99/month\") */\n displayPrice: string;\n /**\n * Unique identifier for the offer.\n * - iOS: Discount identifier from App Store Connect\n * - Android: offerId from ProductSubscriptionAndroidOfferDetails\n */\n id: string;\n /**\n * [Android] Installment plan details for this subscription offer.\n * Only set for installment subscription plans; null for non-installment plans.\n * Available in Google Play Billing Library 7.0+\n */\n installmentPlanDetailsAndroid?: (InstallmentPlanDetailsAndroid | null);\n /**\n * [iOS] Key identifier for signature validation.\n * Used with server-side signature generation for promotional offers.\n */\n keyIdentifierIOS?: (string | null);\n /** [iOS] Localized price string. */\n localizedPriceIOS?: (string | null);\n /**\n * [iOS] Cryptographic nonce (UUID) for signature validation.\n * Must be generated server-side for each purchase attempt.\n */\n nonceIOS?: (string | null);\n /** [iOS] Number of billing periods for this discount. */\n numberOfPeriodsIOS?: (number | null);\n /** [Android] List of tags associated with this offer. */\n offerTagsAndroid?: (string[] | null);\n /**\n * [Android] Offer token required for purchase.\n * Must be passed to requestPurchase() when purchasing with this offer.\n */\n offerTokenAndroid?: (string | null);\n /** Payment mode during the offer period */\n paymentMode?: (PaymentMode | null);\n /** Subscription period for this offer */\n period?: (SubscriptionPeriod | null);\n /** Number of periods the offer applies */\n periodCount?: (number | null);\n /** Numeric price value */\n price: number;\n /**\n * [Android] Pricing phases for this subscription offer.\n * Contains detailed pricing information for each phase (trial, intro, regular).\n */\n pricingPhasesAndroid?: (PricingPhasesAndroid | null);\n /**\n * [iOS] Server-generated signature for promotional offer validation.\n * Required when applying promotional offers on iOS.\n */\n signatureIOS?: (string | null);\n /**\n * [iOS] Timestamp when the signature was generated.\n * Used for signature validation.\n */\n timestampIOS?: (number | null);\n /** Type of subscription offer (Introductory or Promotional) */\n type: DiscountOfferType;\n}\n\n/**\n * iOS subscription offer details.\n * @deprecated Use the standardized SubscriptionOffer type instead for cross-platform compatibility.\n * @see https://openiap.dev/docs/types#subscription-offer\n */\nexport interface SubscriptionOfferIOS {\n displayPrice: string;\n id: string;\n paymentMode: PaymentModeIOS;\n period: SubscriptionPeriodValueIOS;\n periodCount: number;\n price: number;\n type: SubscriptionOfferTypeIOS;\n}\n\nexport type SubscriptionOfferTypeIOS = 'introductory' | 'promotional' | 'win-back';\n\n/** Subscription period value combining unit and count. */\nexport interface SubscriptionPeriod {\n /** The period unit (day, week, month, year) */\n unit: SubscriptionPeriodUnit;\n /** The number of units (e.g., 1 for monthly, 3 for quarterly) */\n value: number;\n}\n\nexport type SubscriptionPeriodIOS = 'day' | 'week' | 'month' | 'year' | 'empty';\n\n/** Subscription period unit for cross-platform use. */\nexport type SubscriptionPeriodUnit = 'day' | 'week' | 'month' | 'year' | 'unknown';\n\nexport interface SubscriptionPeriodValueIOS {\n unit: SubscriptionPeriodIOS;\n value: number;\n}\n\n/**\n * Product-level subscription replacement parameters (Android)\n * Used with setSubscriptionProductReplacementParams in BillingFlowParams.ProductDetailsParams\n * Available in Google Play Billing Library 8.1.0+\n */\nexport interface SubscriptionProductReplacementParamsAndroid {\n /** The old product ID that needs to be replaced */\n oldProductId: string;\n /** The replacement mode for this product change */\n replacementMode: SubscriptionReplacementModeAndroid;\n}\n\n/**\n * Replacement mode for subscription changes (Android)\n * These modes determine how the subscription replacement affects billing.\n * Available in Google Play Billing Library 8.1.0+\n */\nexport type SubscriptionReplacementModeAndroid = 'unknown-replacement-mode' | 'with-time-proration' | 'charge-prorated-price' | 'charge-full-price' | 'without-proration' | 'deferred' | 'keep-existing';\n\nexport interface SubscriptionStatusIOS {\n renewalInfo?: (RenewalInfoIOS | null);\n state: string;\n}\n\n/**\n * User Choice Billing event details (Android)\n * Fired when a user selects alternative billing in the User Choice Billing dialog\n */\nexport interface UserChoiceBillingDetails {\n /** Token that must be reported to Google Play within 24 hours */\n externalTransactionToken: string;\n /** List of product IDs selected by the user */\n products: string[];\n}\n\n/**\n * Valid time window for when an offer is available (Android)\n * Available in Google Play Billing Library 7.0+\n */\nexport interface ValidTimeWindowAndroid {\n /** End time in milliseconds since epoch */\n endTimeMillis: string;\n /** Start time in milliseconds since epoch */\n startTimeMillis: string;\n}\n\n/**\n * Apple App Store verification parameters.\n * Used for server-side receipt validation via App Store Server API.\n */\nexport interface VerifyPurchaseAppleOptions {\n /** Product SKU to validate */\n sku: string;\n}\n\n/**\n * Google Play Store verification parameters.\n * Used for server-side receipt validation via Google Play Developer API.\n *\n * ⚠️ SECURITY: Contains sensitive tokens (accessToken, purchaseToken). Do not log or persist this data.\n */\nexport interface VerifyPurchaseGoogleOptions {\n /**\n * Google OAuth2 access token for API authentication.\n * ⚠️ Sensitive: Do not log this value.\n */\n accessToken: string;\n /** Whether this is a subscription purchase (affects API endpoint used) */\n isSub?: (boolean | null);\n /** Android package name (e.g., com.example.app) */\n packageName: string;\n /**\n * Purchase token from the purchase response.\n * ⚠️ Sensitive: Do not log this value.\n */\n purchaseToken: string;\n /** Product SKU to validate */\n sku: string;\n}\n\n/**\n * Meta Horizon (Quest) verification parameters.\n * Used for server-side entitlement verification via Meta's S2S API.\n * POST https://graph.oculus.com/$APP_ID/verify_entitlement\n *\n * ⚠️ SECURITY: Contains sensitive token (accessToken). Do not log or persist this data.\n */\nexport interface VerifyPurchaseHorizonOptions {\n /**\n * Access token for Meta API authentication (OC|$APP_ID|$APP_SECRET or User Access Token).\n * ⚠️ Sensitive: Do not log this value.\n */\n accessToken: string;\n /** The SKU for the add-on item, defined in Meta Developer Dashboard */\n sku: string;\n /** The user ID of the user whose purchase you want to verify */\n userId: string;\n}\n\n/**\n * Platform-specific purchase verification parameters.\n *\n * - apple: Verifies via App Store Server API\n * - google: Verifies via Google Play Developer API\n * - horizon: Verifies via Meta's S2S API (verify_entitlement endpoint)\n */\nexport interface VerifyPurchaseProps {\n /** Apple App Store verification parameters. */\n apple?: (VerifyPurchaseAppleOptions | null);\n /** Google Play Store verification parameters. */\n google?: (VerifyPurchaseGoogleOptions | null);\n /** Meta Horizon (Quest) verification parameters. */\n horizon?: (VerifyPurchaseHorizonOptions | null);\n}\n\nexport type VerifyPurchaseResult = VerifyPurchaseResultAndroid | VerifyPurchaseResultHorizon | VerifyPurchaseResultIOS;\n\nexport interface VerifyPurchaseResultAndroid {\n autoRenewing: boolean;\n betaProduct: boolean;\n cancelDate?: (number | null);\n cancelReason?: (string | null);\n deferredDate?: (number | null);\n deferredSku?: (string | null);\n freeTrialEndDate: number;\n gracePeriodEndDate: number;\n parentProductId: string;\n productId: string;\n productType: string;\n purchaseDate: number;\n quantity: number;\n receiptId: string;\n renewalDate: number;\n term: string;\n termSku: string;\n testTransaction: boolean;\n}\n\n/**\n * Result from Meta Horizon verify_entitlement API.\n * Returns verification status and grant time for the entitlement.\n */\nexport interface VerifyPurchaseResultHorizon {\n /** Unix timestamp (seconds) when the entitlement was granted. */\n grantTime?: (number | null);\n /** Whether the entitlement verification succeeded. */\n success: boolean;\n}\n\nexport interface VerifyPurchaseResultIOS {\n /** Whether the receipt is valid */\n isValid: boolean;\n /** JWS representation */\n jwsRepresentation: string;\n /** Latest transaction if available */\n latestTransaction?: (Purchase | null);\n /** Receipt data string */\n receiptData: string;\n}\n\nexport interface VerifyPurchaseWithProviderError {\n code?: (string | null);\n message: string;\n}\n\nexport interface VerifyPurchaseWithProviderProps {\n iapkit?: (RequestVerifyPurchaseWithIapkitProps | null);\n provider: PurchaseVerificationProvider;\n}\n\nexport interface VerifyPurchaseWithProviderResult {\n /** Error details if verification failed */\n errors?: (VerifyPurchaseWithProviderError[] | null);\n /** IAPKit verification result */\n iapkit?: (RequestVerifyPurchaseWithIapkitResult | null);\n provider: PurchaseVerificationProvider;\n}\n\nexport type VoidResult = void;\n\n/**\n * Win-back offer input for iOS 18+ (StoreKit 2)\n * Win-back offers are used to re-engage churned subscribers.\n * The offer is automatically presented via StoreKit Message when eligible,\n * or can be applied programmatically during purchase.\n */\nexport interface WinBackOfferInputIOS {\n /** The win-back offer ID from App Store Connect */\n offerId: string;\n}\n// -- Query helper types (auto-generated)\nexport type QueryArgsMap = {\n canPresentExternalPurchaseNoticeIOS: never;\n currentEntitlementIOS: QueryCurrentEntitlementIosArgs;\n fetchProducts: QueryFetchProductsArgs;\n getActiveSubscriptions: QueryGetActiveSubscriptionsArgs;\n getAppTransactionIOS: never;\n getAvailablePurchases: QueryGetAvailablePurchasesArgs;\n getExternalPurchaseCustomLinkTokenIOS: QueryGetExternalPurchaseCustomLinkTokenIosArgs;\n getPendingTransactionsIOS: never;\n getPromotedProductIOS: never;\n getReceiptDataIOS: never;\n getStorefront: never;\n getStorefrontIOS: never;\n getTransactionJwsIOS: QueryGetTransactionJwsIosArgs;\n hasActiveSubscriptions: QueryHasActiveSubscriptionsArgs;\n isEligibleForExternalPurchaseCustomLinkIOS: never;\n isEligibleForIntroOfferIOS: QueryIsEligibleForIntroOfferIosArgs;\n isTransactionVerifiedIOS: QueryIsTransactionVerifiedIosArgs;\n latestTransactionIOS: QueryLatestTransactionIosArgs;\n subscriptionStatusIOS: QuerySubscriptionStatusIosArgs;\n validateReceiptIOS: QueryValidateReceiptIosArgs;\n};\n\nexport type QueryField<K extends keyof Query> =\n QueryArgsMap[K] extends never\n ? () => NonNullable<Query[K]>\n : undefined extends QueryArgsMap[K]\n ? (args?: QueryArgsMap[K]) => NonNullable<Query[K]>\n : (args: QueryArgsMap[K]) => NonNullable<Query[K]>;\n\nexport type QueryFieldMap = {\n [K in keyof Query]?: QueryField<K>;\n};\n// -- End query helper types\n\n// -- Mutation helper types (auto-generated)\nexport type MutationArgsMap = {\n acknowledgePurchaseAndroid: MutationAcknowledgePurchaseAndroidArgs;\n beginRefundRequestIOS: MutationBeginRefundRequestIosArgs;\n checkAlternativeBillingAvailabilityAndroid: never;\n clearTransactionIOS: never;\n consumePurchaseAndroid: MutationConsumePurchaseAndroidArgs;\n createAlternativeBillingTokenAndroid: never;\n createBillingProgramReportingDetailsAndroid: MutationCreateBillingProgramReportingDetailsAndroidArgs;\n deepLinkToSubscriptions: MutationDeepLinkToSubscriptionsArgs;\n endConnection: never;\n finishTransaction: MutationFinishTransactionArgs;\n initConnection: MutationInitConnectionArgs;\n isBillingProgramAvailableAndroid: MutationIsBillingProgramAvailableAndroidArgs;\n launchExternalLinkAndroid: MutationLaunchExternalLinkAndroidArgs;\n presentCodeRedemptionSheetIOS: never;\n presentExternalPurchaseLinkIOS: MutationPresentExternalPurchaseLinkIosArgs;\n presentExternalPurchaseNoticeSheetIOS: never;\n requestPurchase: MutationRequestPurchaseArgs;\n requestPurchaseOnPromotedProductIOS: never;\n restorePurchases: never;\n showAlternativeBillingDialogAndroid: never;\n showExternalPurchaseCustomLinkNoticeIOS: MutationShowExternalPurchaseCustomLinkNoticeIosArgs;\n showManageSubscriptionsIOS: never;\n syncIOS: never;\n validateReceipt: MutationValidateReceiptArgs;\n verifyPurchase: MutationVerifyPurchaseArgs;\n verifyPurchaseWithProvider: MutationVerifyPurchaseWithProviderArgs;\n};\n\nexport type MutationField<K extends keyof Mutation> =\n MutationArgsMap[K] extends never\n ? () => NonNullable<Mutation[K]>\n : undefined extends MutationArgsMap[K]\n ? (args?: MutationArgsMap[K]) => NonNullable<Mutation[K]>\n : (args: MutationArgsMap[K]) => NonNullable<Mutation[K]>;\n\nexport type MutationFieldMap = {\n [K in keyof Mutation]?: MutationField<K>;\n};\n// -- End mutation helper types\n\n// -- Subscription helper types (auto-generated)\nexport type SubscriptionArgsMap = {\n developerProvidedBillingAndroid: never;\n promotedProductIOS: never;\n purchaseError: never;\n purchaseUpdated: never;\n subscriptionBillingIssue: never;\n userChoiceBillingAndroid: never;\n};\n\nexport type SubscriptionField<K extends keyof Subscription> =\n SubscriptionArgsMap[K] extends never\n ? () => NonNullable<Subscription[K]>\n : undefined extends SubscriptionArgsMap[K]\n ? (args?: SubscriptionArgsMap[K]) => NonNullable<Subscription[K]>\n : (args: SubscriptionArgsMap[K]) => NonNullable<Subscription[K]>;\n\nexport type SubscriptionFieldMap = {\n [K in keyof Subscription]?: SubscriptionField<K>;\n};\n// -- End subscription helper types\n"]}
|
package/ios/ExpoIapHelper.swift
CHANGED
|
@@ -129,7 +129,8 @@ enum ExpoIapHelper {
|
|
|
129
129
|
module: ExpoIapModule,
|
|
130
130
|
purchaseUpdated: @escaping (Purchase) -> Void,
|
|
131
131
|
purchaseError: @escaping (PurchaseError) -> Void,
|
|
132
|
-
promotedProduct: @escaping (String) async -> Void
|
|
132
|
+
promotedProduct: @escaping (String) async -> Void,
|
|
133
|
+
subscriptionBillingIssue: @escaping (Purchase) -> Void
|
|
133
134
|
) {
|
|
134
135
|
// Clean up any existing listeners first
|
|
135
136
|
cleanupListeners()
|
|
@@ -152,7 +153,13 @@ enum ExpoIapHelper {
|
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
155
|
|
|
155
|
-
|
|
156
|
+
let billingIssueSub = OpenIapModule.shared.subscriptionBillingIssueListener { purchase in
|
|
157
|
+
Task { @MainActor in
|
|
158
|
+
subscriptionBillingIssue(purchase)
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
listeners = [purchaseUpdatedSub, purchaseErrorSub, promotedProductSub, billingIssueSub]
|
|
156
163
|
}
|
|
157
164
|
|
|
158
165
|
static func cleanupListeners() {
|
|
@@ -190,6 +197,11 @@ enum ExpoIapHelper {
|
|
|
190
197
|
OpenIapEvent.promotedProductIos.rawValue,
|
|
191
198
|
["productId": productId]
|
|
192
199
|
)
|
|
200
|
+
},
|
|
201
|
+
subscriptionBillingIssue: { [weak module] purchase in
|
|
202
|
+
guard let module else { return }
|
|
203
|
+
let payload = sanitizeDictionary(OpenIapSerialization.purchase(purchase))
|
|
204
|
+
module.sendEvent(OpenIapEvent.subscriptionBillingIssue.rawValue, payload)
|
|
193
205
|
}
|
|
194
206
|
)
|
|
195
207
|
}
|
package/ios/ExpoIapModule.swift
CHANGED
|
@@ -21,7 +21,8 @@ public final class ExpoIapModule: Module {
|
|
|
21
21
|
Events(
|
|
22
22
|
OpenIapEvent.purchaseUpdated.rawValue,
|
|
23
23
|
OpenIapEvent.purchaseError.rawValue,
|
|
24
|
-
OpenIapEvent.promotedProductIos.rawValue
|
|
24
|
+
OpenIapEvent.promotedProductIos.rawValue,
|
|
25
|
+
OpenIapEvent.subscriptionBillingIssue.rawValue
|
|
25
26
|
)
|
|
26
27
|
|
|
27
28
|
OnCreate {
|
package/openiap-versions.json
CHANGED
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -59,6 +59,12 @@ export enum OpenIapEvent {
|
|
|
59
59
|
* Only available in Japan. Contains externalTransactionToken for reporting.
|
|
60
60
|
*/
|
|
61
61
|
DeveloperProvidedBillingAndroid = 'developer-provided-billing-android',
|
|
62
|
+
/**
|
|
63
|
+
* Fired when an active subscription enters a billing-issue state (cross-platform).
|
|
64
|
+
* Unifies StoreKit 2 `Message.Reason.billingIssue` (iOS 18+) and Play Billing 8.1+
|
|
65
|
+
* `Purchase.isSuspended`. NOT fired on the Meta Horizon flavor.
|
|
66
|
+
*/
|
|
67
|
+
SubscriptionBillingIssue = 'subscription-billing-issue',
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
type ExpoIapEventPayloads = {
|
|
@@ -67,6 +73,7 @@ type ExpoIapEventPayloads = {
|
|
|
67
73
|
[OpenIapEvent.PromotedProductIOS]: Product;
|
|
68
74
|
[OpenIapEvent.UserChoiceBillingAndroid]: UserChoiceBillingDetails;
|
|
69
75
|
[OpenIapEvent.DeveloperProvidedBillingAndroid]: DeveloperProvidedBillingDetailsAndroid;
|
|
76
|
+
[OpenIapEvent.SubscriptionBillingIssue]: Purchase;
|
|
70
77
|
};
|
|
71
78
|
|
|
72
79
|
type ExpoIapEventListener<E extends OpenIapEvent> = (
|
|
@@ -287,6 +294,43 @@ export const developerProvidedBillingListenerAndroid = (
|
|
|
287
294
|
);
|
|
288
295
|
};
|
|
289
296
|
|
|
297
|
+
/**
|
|
298
|
+
* Listen for subscription billing-issue events (cross-platform).
|
|
299
|
+
*
|
|
300
|
+
* Fires when a user's active subscription enters a state that needs attention
|
|
301
|
+
* for a payment problem. Unifies:
|
|
302
|
+
* - iOS 18+ / Mac Catalyst 18+: StoreKit 2 `Message.Reason.billingIssue`.
|
|
303
|
+
* - Android (Play Billing 8.1+): when `Purchase.isSuspendedAndroid === true`.
|
|
304
|
+
* - Meta Horizon / iOS 17 / older platforms: never fires.
|
|
305
|
+
*
|
|
306
|
+
* Recommended UX: call `deepLinkToSubscriptions()` when this fires so the user
|
|
307
|
+
* can update their payment method in the platform subscription center.
|
|
308
|
+
*
|
|
309
|
+
* @example
|
|
310
|
+
* ```typescript
|
|
311
|
+
* const subscription = subscriptionBillingIssueListener((purchase) => {
|
|
312
|
+
* console.warn('Needs attention:', purchase.productId);
|
|
313
|
+
* deepLinkToSubscriptions({
|
|
314
|
+
* skuAndroid: purchase.productId,
|
|
315
|
+
* packageNameAndroid: 'com.example.app',
|
|
316
|
+
* });
|
|
317
|
+
* });
|
|
318
|
+
* ```
|
|
319
|
+
*/
|
|
320
|
+
export const subscriptionBillingIssueListener = (
|
|
321
|
+
listener: (purchase: Purchase) => void,
|
|
322
|
+
) => {
|
|
323
|
+
// Mirror purchaseUpdatedListener's platform normalization so consumers get
|
|
324
|
+
// a consistent payload regardless of native casing.
|
|
325
|
+
const wrappedListener = (event: Purchase) => {
|
|
326
|
+
listener(normalizePurchasePlatform(event));
|
|
327
|
+
};
|
|
328
|
+
return emitter.addListener(
|
|
329
|
+
OpenIapEvent.SubscriptionBillingIssue,
|
|
330
|
+
wrappedListener,
|
|
331
|
+
);
|
|
332
|
+
};
|
|
333
|
+
|
|
290
334
|
export const initConnection: MutationField<'initConnection'> = async (config) =>
|
|
291
335
|
ExpoIapModule.initConnection(config ?? null);
|
|
292
336
|
|
package/src/types.ts
CHANGED
|
@@ -457,7 +457,7 @@ export interface ExternalPurchaseNoticeResultIOS {
|
|
|
457
457
|
|
|
458
458
|
export type FetchProductsResult = ProductOrSubscription[] | Product[] | ProductSubscription[] | null;
|
|
459
459
|
|
|
460
|
-
export type IapEvent = 'purchase-updated' | 'purchase-error' | 'promoted-product-ios' | 'user-choice-billing-android' | 'developer-provided-billing-android';
|
|
460
|
+
export type IapEvent = 'purchase-updated' | 'purchase-error' | 'promoted-product-ios' | 'user-choice-billing-android' | 'developer-provided-billing-android' | 'subscription-billing-issue';
|
|
461
461
|
|
|
462
462
|
export type IapPlatform = 'ios' | 'android';
|
|
463
463
|
|
|
@@ -1560,6 +1560,20 @@ export interface Subscription {
|
|
|
1560
1560
|
purchaseError: PurchaseError;
|
|
1561
1561
|
/** Fires when a purchase completes successfully or a pending purchase resolves */
|
|
1562
1562
|
purchaseUpdated: Purchase;
|
|
1563
|
+
/**
|
|
1564
|
+
* Fires when an active subscription enters a billing-issue state that needs user action
|
|
1565
|
+
* (payment method failed, card expired, etc.). Cross-platform unification:
|
|
1566
|
+
*
|
|
1567
|
+
* - iOS 18+: delivered via StoreKit 2 `Message.Reason.billingIssue`.
|
|
1568
|
+
* - Android (Play flavor, Billing 8.1+): emitted when `isSuspended == true` is first detected
|
|
1569
|
+
* on a previously healthy subscription. Requires Google Play Billing Library 8.1.0 or newer.
|
|
1570
|
+
* - Android (Horizon flavor): NOT emitted. The Horizon Billing Compatibility SDK implements
|
|
1571
|
+
* the Play Billing 7.0 API surface which does not expose a suspended-subscription signal.
|
|
1572
|
+
*
|
|
1573
|
+
* Listeners should not assume the event will fire on every store. Direct users to the
|
|
1574
|
+
* platform subscription management UI (`deepLinkToSubscriptions`) to resolve the issue.
|
|
1575
|
+
*/
|
|
1576
|
+
subscriptionBillingIssue: Purchase;
|
|
1563
1577
|
/**
|
|
1564
1578
|
* Fires when a user selects alternative billing in the User Choice Billing dialog (Android only)
|
|
1565
1579
|
* Only triggered when the user selects alternative billing instead of Google Play billing
|
|
@@ -1965,6 +1979,7 @@ export type SubscriptionArgsMap = {
|
|
|
1965
1979
|
promotedProductIOS: never;
|
|
1966
1980
|
purchaseError: never;
|
|
1967
1981
|
purchaseUpdated: never;
|
|
1982
|
+
subscriptionBillingIssue: never;
|
|
1968
1983
|
userChoiceBillingAndroid: never;
|
|
1969
1984
|
};
|
|
1970
1985
|
|