Skip to content

@capgo/native-purchases

インアプリ購入を簡単にする

インアプリ購入が簡単になりました。

  • Native in-app purchases and subscriptions with StoreKit 2 and Google Play Billing.
  • Product metadata loaded directly from the stores, including localized titles and prices.
  • iOS StoreKit pricing terms for monthly subscriptions with 12-month commitments.
  • Purchase, restore, entitlement refresh, and native subscription management flows.
  • App Transaction helpers for migration from older business models.

Public API

Public API
メソッド説明
restorePurchasesユーザーの前の購入を復元し、App User ID をユーザー ID とリンクします。
getAppTransactionApp Transaction の情報を取得します。これにより、ユーザーがアプリを元でダウンロードしたときや購入したときの詳細が提供されます。
isEntitledToOldBusinessModelApp Transaction から取得した元のアプリバージョンを、対象バージョンと比較して、ユーザーが古いビジネスモデルから機能を受け取る資格があるかどうかを判断します。
purchaseProductNative購入フローを開始します。サポートされているiOSバージョンでは、 billingPlanType: 'monthly' サポートされているiOSバージョンでは、
getProducts指定された製品識別子に関連付けられた製品情報を取得します。サポートされているiOSバージョンでは、 pricingTerms.
getProduct指定された製品識別子に関連付けられた製品情報を取得します。
isBillingSupported現在のデバイスで請求がサポートされているかどうかを確認します。
getPluginVersion現在のCapacitorプラグインのバージョンを取得します。
getPurchasesユーザーの購入履歴(アプリ内購入とサブスクリプション)を取得します。このメソッドは、現在のユーザーの購入履歴をプラットフォームに問い合わせて取得します。
manageSubscriptionsプラットフォームのネイティブサブスクリプション管理ページを開きます。このページでは、ユーザーはサブスクリプションを表示、変更、またはキャンセルできます。
acknowledgePurchase購入トランザクションを手動で認可/完了します。
consumePurchaseAndroid上のアプリ内購入を消費します。
addListenerAppleのTransaction.updatesからStoreKitトランザクションの更新をリスンします。アプリ起動時に未完了のトランザクションがあれば発火し、以降の更新も発火します。iOSのみ。
addListenerAppleのTransaction.updatesからStoreKitトランザクションの検証失敗をリスンします。検証結果が未検証の場合に発火します。iOSのみ。
removeAllListenersリスナーをすべて削除します。

この参照は src/definitions.tscapacitor-native-purchases.

__CAPGO_KEEP_0__/native-purchasesを使用している場合 capgo/native-purchases __CAPGO_KEEP_0__/native-purchasesを使用して支払いと購入を計画する場合、 capgo/native-purchasesを接続してください。 native capabilityの使用に@capgo/native-purchasesを使用します。 Capgo Pricing Capgo Pricingの製品ワークフローに 決済システム 決済システムの実装詳細 Getting Started Getting Startedの実装詳細 Revenue Playbook Revenue Playbookの実装詳細