コンテンツにスキップ
アカウントを作成
または
サインイン
Stripe ドキュメントのロゴ
/
AI に質問する
アカウントを作成
サインイン
始める
支払い
売上
プラットフォームおよびマーケットプレイス
資金管理
開発者向けリソース
概要
Billing
概要Billing API について
サブスクリプション
    概要
    サブスクリプションの仕組み
    始める
    クイックスタート
    連携の計画を立てる
    連携機能の構築
    ユースケース
    サブスクリプションについて
    請求モードを有効にする
    サブスクリプションイベントの定義
    エンタイトルメント
    サブスクリプションの請求書
    サブスクリプションのスケジュール
    継続的な料金体系モデル
    強力な顧客認証 (SCA)
    サブスクリプションを設定する
    請求回収方法の設定
    料金表を埋め込む
    請求サイクルの設定
    サブスクリプションを管理
    サブスクリプションを Stripe に移行する
    Set product or subscription quantities
    複数のサブスクリプション期間
    サブスクリプションの遡及適用
    トライアル期間を設定
    後払い支払いによるサブスクリプションの処理
    クーポンを適用
    サブスクリプションの修正
    サブスクリプションの決済方法の管理
    アナリティクス
    iOS でサブスクリプションを管理する
Invoicing
従量課金
見積もり
顧客管理
Billing と他のプロダクトの連携
売上回収
オートメーション
実装内容をテストする
税金
概要
Stripe tax を使用
法規制の遵守・対応管理
レポート機能
概要
レポートの選択
レポートを設定
Reports API
複数のアカウントのレポート
収益認識
データ
概要スキーマ
カスタムレポート
Data Pipeline
データ管理
ホーム売上Subscriptions

注

このページはまだ日本語ではご利用いただけません。より多くの言語で文書が閲覧できるように現在取り組んでいます。準備が整い次第、翻訳版を提供いたしますので、もう少しお待ちください。

サブスクリプションの仕組み

継続支払いとサブスクリプションのライフサイクルを管理します。

サブスクリプションでは、顧客は商品を利用するために継続的に支払いを行います。サブスクリプションの場合、以降も顧客に請求する必要があるため、1 回限りの購入よりも顧客について多くの情報を保持する必要があります。

Stripe では、サブスクリプション請求の管理に役立つ多くの機能を提供しています。

  • さまざまな料金体系モデルのサポート
  • サブスクリプション割引管理
  • トライアル管理
  • 変更されたサブスクリプションの比例配分
  • 顧客セルフサービス管理
  • 決済を徴収するための請求
  • 売上回収の自動化
  • レポートと分析

サブスクリプションのライフサイクル

The process of creating and managing subscriptions relies on core Stripe API resources, including Customers, Invoices, and PaymentIntents. See API object definitions for the full list of subscription-related resources.

推奨されるサブスクリプションフローは次のとおりです。

定期支払いを作成する

You can create a new subscription in the Dashboard or with the API. Every time you create a subscription, this triggers an event. Listen for these events with webhook endpoints, and make sure that your integration properly handles them.

Optionally, you can create a trial that doesn’t require payments for the subscription. In that case, the status is trialing. When the trial is over, the subscription moves to active and the subscribed customer gets charged.

支払い処理

We recommend that you set the payment_behavior of a subscription to default_incomplete to help handle failed payments and complex payment flows like 3DS. This creates subscriptions with status incomplete if payment is required, which allows you to subsequently collect and confirm payment information to activate the subscription.

If you set payment_behavior to allow_incomplete, Stripe immediately attempts to collect payment on the invoice. If the payment fails, the subscription’s status changes to incomplete. If you set payment_behavior to error_if_incomplete, the subscription creation fails if the payment fails.

Subscriptions that you create in the Dashboard default to the appropriate payment behavior depending on the payment method.

Handle the invoice

When you create a subscription, Stripe automatically creates an invoice with the status open. Your customer has about 23 hours to make a successful payment. During this time, the subscription status is incomplete and the invoice status remains open. The 23-hour window exists because your customer usually makes the first payment for a subscription while on-session. If the customer returns to your application after 23 hours, create a new subscription for them.

顧客が支払う

If your customer pays the invoice, the subscription updates to active and the invoice to paid. If they don’t make a payment, the subscription updates to incomplete_expired and the invoice becomes void.

To confirm whether the invoice has been paid:

  • Webhookエンドポイントまたはその他のタイプのイベント送信先を設定し、invoice.paidイベントをリッスンします。
  • サブスクリプションオブジェクトを手動で確認し、subscription.status=active を探します。自動請求または顧客による手動での支払いによって請求書への支払いが行われると、status は active になります。

For more details, see Subscription statuses and Payment statuses.

Provision access to your product

When you create a subscription for a customer, this creates an active entitlement for each feature associated with that product. When a customer accesses your services, use their active entitlements to grant them access to the features included in their subscription.

Alternatively, you can use track active subscriptions with webhook events and provision the product for the customer based on that activity.

サブスクリプションを更新する

You can modify existing subscriptions as needed without having to cancel and recreate them. Some of the most significant changes you might make are upgrading or downgrading the subscription price or pausing payment collection for an active subscription.

You can listen to subscription events with webhook endpoints for changes to the subscription. For example, you might want to email a customer if a payment fails or revoke a customer’s access when they cancel their subscription.

For Stripe Checkout integrations, you can’t update the subscription or its invoice if the session’s subscription is incomplete. You can listen to the checkout.session.completed event to make the update after the session has completed. You can also expire the session instead if you want to cancel the session’s subscription, void the subscription invoice, or mark the invoice as uncollectible.

Handle unpaid subscriptions

For subscriptions with unpaid invoices, the unpaid invoices remain open but further payment attempts are paused. The subscription continues to generate invoices each billing period, which remain in the draft status. To reactivate the subscription:

  1. 必要に応じて新しい支払い情報を収集します。
  2. 請求書の下書きで auto_advance を true に設定して、自動回収を有効にします。
  3. 未払い請求書の確定と支払いを行います。無効になっていない最新の請求書を期日前に支払うと、サブスクリプションのステータスが active に更新されます。

Invoices marked as uncollectable keep the underlying subscription active. Stripe ignores voided invoices when determining subscription status and uses the most recent non-voided invoice instead.

The unpaid subscription’s status depends on your failed payment settings in the Dashboard.

Cancel the subscription

You can cancel a subscription at any time, including at the end of a billing cycle or after a set number of billing cycles.

By default, cancelling a subscription disables creating new invoices and stops automatic collection of all outstanding invoices from the subscription. It also deletes the subscription and you can no longer update the subscription or its metadata. If your customer wants to resubscribe, you need to collect new payment information from them and create a new subscription.

サブスクリプションステータス

Subscriptions can have the following statuses. The actions you can take on a subscription depend on its status.

ステータス説明
trialingサブスクリプションは現在トライアル期間中であり、顧客にプロダクトを支障なく提供できます。初回の支払いが行われると、サブスクリプションは自動的に active に移行します。
activeサブスクリプションは良好な状態です。past_due のサブスクリプションの場合、関連する請求書への最新の支払いまたは回収不能という判定によって、サブスクリプションは active に移行します。active は、サブスクリプションに関連するすべての未払いの請求書が支払われたことを示しているわけではないことに注意してください。その他の未払いの請求書は、支払い対象として残すか、回収不能と判定するか、必要に応じて無効化することができます。
incompleteサブスクリプションを有効にするには、顧客が 23 時間以内に支払いを成功させる必要があります。または、支払いで顧客認証などの対応が必要です。保留中の支払いがあり、PaymentIntent のステータスが processing の場合も、サブスクリプションが incomplete になることがあります。
incomplete_expiredサブスクリプションの初回の支払いが失敗し、サブスクリプションの作成から 23 時間以内に支払いが成功しませんでした。これらのサブスクリプションは顧客に請求されません。このステータスは、サブスクリプションの有効化に失敗した顧客を追跡するために存在します。
past_duePayment on the latest finalized invoice either failed or wasn’t attempted. The subscription continues to create invoices. Your Dashboard subscription settings determine the subscription’s next status. If the invoice is still unpaid after all attempted smart retries, you can configure the subscription to move to canceled, unpaid, or leave it as past_due. To reactivate the subscription, have your customer pay the most recent invoice. The subscription status becomes active regardless of whether the payment is done before or after the latest invoice due date.
canceledサブスクリプションがキャンセルされました。キャンセル時に未払いのすべての請求書の自動回収が無効化されます (auto_advance=false)。これは、更新できない最終的なステータスです。
unpaid最新の請求書は支払われていませんが、サブスクリプションはそのまま保持されます。最新の請求書は未処理のままになり、請求書は引き続き生成されますが、支払いの試行は行われません。サブスクリプションが unpaid の場合は、past_due の時点で支払いの試行と再試行がすでに行われているため、プロダクトへのアクセスを取り消します。サブスクリプションのステータスを active にするには、期日前に最新の請求書を支払う必要があります。
pausedデフォルトの決済手段が設定されずにサブスクリプションのトライアル期間が終了し、trial_settings.end_behavior.missing_payment_method が pause に設定されています。サブスクリプションの請求書は今後作成されなくなります。デフォルトの決済手段を顧客に関連付けた後、サブスクリプションを再開できます。

Payment statuses

A PaymentIntent tracks the lifecycle of every payment. Whenever a payment is due for a subscription, Stripe generates an invoice and a PaymentIntent. The PaymentIntent ID attaches to the invoice and you can access it from the Invoice and Subscription objects.

The status of the PaymentIntent affects the status of the invoice and the subscription. Here’s how the different outcomes of a payment map to the different statuses:

支払い結果PaymentIntent ステータス請求書のステータスサブスクリプションのステータス
成功succeededpaidactive
カードエラーによる失敗requires_payment_methodopenincomplete
認証による失敗requires_actionopenincomplete

注

Asynchronous payment methods, such as ACH Direct Debit, handle subscription status transitions differently than immediate payment methods. When you use asynchronous methods, subscriptions transition directly to an active state after creation, bypassing the incomplete state typically associated with other payment types. If an asynchronous payment fails later, it voids the associated invoice but the subscription remains in the active state. This behavior contrasts with immediate payment methods, where failed payments often lead to incomplete or past_due states. Be aware of this distinction and implement appropriate logic to manage subscription status, access control, and payment retry mechanisms.

以降のセクションでは、これらのステータスと、各ステータスに対するアクションを説明します。

支払いの成功

When the customer’s payment is successful:

  • The status of the PaymentIntent moves to succeeded.
  • The status of the subscription is active.
  • The status of the invoice is paid.
  • 設定済みの Webhook エンドポイントに Stripe が invoice.paid イベントを送信します。

For payment methods with longer processing periods, subscriptions are immediately activated. In these cases, the status of the PaymentIntent might be processing for an active subscription until the payment succeeds.

With your subscription now activated, provision access to your product.

支払い方法が必要

If payment fails because of a card error such as a decline:

  • The status of the PaymentIntent is requires_payment_method.
  • The status of the subscription is incomplete.
  • The status of the invoice is open.

これらのシナリオを処理するには、以下のステップに従います。

  • 顧客に通知します。
  • Collect new payment information and confirm the PaymentIntent.
  • サブスクリプションの default payment method (デフォルトの支払い方法) を更新します。
  • Stripe re-attempts payment using Smart Retries or based on your custom retry rules.
  • Use the invoice.payment_failed event to monitor subscription payment failure events and retry attempt updates. After a payment attempt on an invoice, its next_payment_attempt value is set using the current subscription settings in your Dashboard.

サブスクリプションの支払い失敗を処理する方法は以下のとおりです。

アクションが必要

Some payment methods require customer authentication with 3D Secure (3DS) to complete the payment process. 3DS completes the authentication process. Whether a payment method requires authentication depends on your Radar rules and the issuing bank for the card.

If payment fails because the customer needs to authenticate a payment:

  • The status of the PaymentIntent is requires_action.
  • The status of the subscription is incomplete.
  • The status of the invoice is open.

これらのシナリオを処理するには、以下のステップに従います。

  • Webhook エンドポイントを使用して invoice.payment_action_required イベントの通知を監視します。これには認証が必要です。
  • 認証が必要であることを顧客に通知します。
  • Retrieve the client secret for the PaymentIntent and pass it in a call to stripe.ConfirmCardPayment. This displays an authentication modal to your customers, attempts payment, then closes the modal and returns context to your application.
  • イベントの送信先で invoice.paid イベントをモニタリングし、支払いが成功したことを確認します。ユーザーは、confirmCardPayment() が完了する前にアプリケーションを離れることができます。支払いが成功したかどうかを確認することで、商品を正しく提供できます。

参照情報

  • Design a subscriptions integration
  • Subscriptions quickstart
  • Example: Subscription with a fixed price
このページはお役に立ちましたか。
はいいいえ
  • お困りのことがございましたら 、サポートにお問い合わせください。
  • 早期アクセスプログラムにご参加ください。
  • 変更ログをご覧ください。
  • ご不明な点がございましたら、お問い合わせください。
  • LLM ですか?llms.txt を読んでください。
  • Powered by Markdoc