メインコンテンツにスキップ

サブスクリプション

Subscription機能は、ユーザーが選択したPlanを管理し、Application機能へのアクセスを簡単に制御するのに役立ちます。

ヒント

PlanRoleに基づいているため、ユーザーにPlanのRoleを割り当て、権限チェックのためにenforce APIを使用することができます。

Subscriptionは次の3つの方法で作成できます:

  • 管理者による手動
  • Via the Pricing flow when purchasing a product with pricing and plan information (available for all user types)
  • API経由

Any user can create a subscription when purchasing a product, enabling flexible conversion from free to paid tiers. Subscription enforcement (requiring an active subscription for access) only applies to users with type = "paid-user".

PricingPlanSubscriptionProductPaymentの関係は以下の通りです:

関係

サブスクリプションのプロパティ

すべてのサブスクリプションには以下のプロパティがあります:

  • オーナー
  • 名前
  • 作成時間
  • 表示名
  • 説明
  • Duration:サブスクリプションの期間。
  • StartTime:サブスクリプションが効力を発する開始時間。
  • EndTime:サブスクリプションが効力を発する終了時間。
  • Pricing:関連する料金設定。
  • Plan:関連するプラン。
  • Payment:関連する支払い。
  • User:このサブスクリプションを保持するユーザー。
  • State:現在、サブスクリプションには以下の状態があります:PendingErrorSuspendedActiveUpcomingExpired

サブスクリプションの編集