混合期間のサブスクリプション非公開プレビュー
さまざまな期間のアイテムをサブスクリプションに追加する方法をご紹介します。
You can bill for multiple recurring prices with different intervals on a single subscription using mixed interval subscription. This allows you to combine different pricing structures within a single subscription.
For example, if a customer subscribes to a service with an annual flat fee of 500 USD and a monthly usage-based fee, you can include both prices as items on the same subscription. Stripe generates combined invoices when item-level billing cycles align and generates separate invoices when only one item is due.
Mixed interval subscription private preview
The mixed interval subscription is currently in private preview and might change in functionality and integration path before it becomes generally available. We recommend testing your integration with non-production traffic.
Get started with mixed interval subscriptions 
Billing mode public preview
billing_
is currently in public preview. Learn more about public preview limitations.
To enable mixed interval subscriptions, you must set billing_
on the following API endpoints and upgrade your API version to 2025-04-30.
or later.
期間が混在するサブスクリプションを作成する
異なる継続期間値を持つ価格を使用してサブスクリプションを作成し、ばらばらのタイミングで更新されるサブスクリプションアイテムに対して請求します。
2024 年 1 月 1 日に開始される四半期あたり 100 USD、月額 15 USD のサブスクリプションの例では、以下のサブスクリプションを作成します:
応答には、最初のインボイス (latest_
) に両方のアイテムと請求書を含むサブスクリプションが含まれます。
{ "object": "subscription", "id":
, "current_period_start": 1704067200, // Jan 1 2024 "current_period_end": 1706745600, // Feb 1 2024 "items": { "data": [ { "id": "si_A", "price": "price_id_monthly",'{{SUBSCRIPTION_ID}}'
2 月 1 日と 3 月 1 日に、サブスクリプションが更新され、月額料金の新しいインボイスが生成される。 4 月 1 日に、サブスクリプションの更新で月次と四半期の両方の料金のインボイスが作成されます。
サブスクリプションをキャンセルする
- 期間が混在するサブスクリプションまたはスケジュールをキャンセルすると、Stripe は、期間に関係なく、すべてのサブスクリプションアイテムをキャンセルします。
- Subscriptions have a single behavior for dunning, even if an invoice only bills for one of the items on the subscription. If all retries for a payment fail, Stripe cancels the entire subscription and marks it as unpaid or past due, depending on your configured dunning settings.
混合期間のサブスクリプションの請求期間
各サブスクリプションアイテムには、独自のcurrent_period_start と current_period_end があります。
Stripe はサブスクリプションアイテムの請求期間に基づいて、サブスクリプションの現在の期間を設定します。
- current_period_start は、アイテムの
current_
の日付の最大値 (最も遅い日付) です。period_ start - current_period_end は、アイテムの
current_
の日付の最小値 (最も早い日付) です。period_ end
subscription.
は、常にアイテムの現在のサイクルが終了する次の日付を示します。
たとえば、月次、隔月、四半期ごとのアイテムを含むサブスクリプションを 1 月 1 日に作成した場合、次の期間が含まれます。
current_period_start | current_period_end | |
---|---|---|
月次アイテム | 1 月 1 日 | 2 月 1 日 |
隔月アイテム | 1 月 1 日 | 3 月 1 日 |
四半期ごとのアイテム | 1 月 1 日 | 4 月 1 日 |
サブスクリプション | 1 月 1 日 | 2 月 1 日 |
2 月 1 日 (subscription.
) の更新後、サブスクリプションの現在の期間は、すべてのアイテムの最も遅い current_
と最も早い current_
に合わせて調整されます。
current_period_start | current_period_end | |
---|---|---|
月次アイテム | 2 月 1 日 | 3 月 1 日 |
隔月アイテム | 1 月 1 日 | 3 月 1 日 |
四半期ごとのアイテム | 1 月 1 日 | 4 月 1 日 |
サブスクリプション | 2 月 1 日 | 3 月 1 日 |
3 回目のサイクル後:
current_period_start | current_period_end | |
---|---|---|
月次アイテム | 3 月 1 日 | 4 月 1 日 |
隔月アイテム | 3 月 1 日 | 5 月 1 日 |
四半期ごとのアイテム | 1 月 1 日 | 4 月 1 日 |
サブスクリプション | 3 月 1 日 | 4 月 1 日 |
サブスクリプションのパラメーターを廃止しました
サブスクリプションのパラメーターである subscription.current_period_start と subscription.current_period_end の使用を廃止しました。代わりに、サブスクリプション項目で期間値を定義するようになります。
請求期間の調整
無料トライアル
アイテムレベルの請求期間の日付は、通常のサブスクリプションと同様に、無料トライアルの終了日の影響を受けます。サブスクリプションに将来の日付の trial_end が設定されている場合、すべての current_
の日付 (サブスクリプションとアイテム) も trial_
の日付に設定されます。
トライアル期間の終了時に一時停止して再開する
混合間隔のサブスクリプションは、通常のサブスクリプションと同様に、trial_settings.end_behavior.missing_payment_method パラメーターで決済手段を指定しないことで、トライアル終了時に一時停止するように設定できます。一時停止されたサブスクリプションは、通常のサブスクリプションと同様に stripe.subscription.resume を使用して再開することができます。現在、proration_
パラメーターと billing_
パラメーターのみがサポートされています。
注
billing_
and proration_
で混合間隔のサブスクリプションを再開する場合、各項目の再開日から現在の請求期間の終了日までの部分的な期間に対する日割り計算は行われず、請求もされません。以下の例を参照してください。
月次項目と隔月項目の混合間隔のサブスクリプションの場合
billing_
= 1 月 1 日cycle_ anchor trial_
= 2 月 1 日end trial_
= 「一時停止」settings. end_ behavior. missing_ payment_ method
この例では、決済手段が指定されていないことを理由にこのサブスクリプションが 2 月 1 日に一時停止され、2 月 15 日に proration_
で再開されるケースを想定しています。
billing_cycle_anchor: 変更なし | billing_cycle_anchor: 現在 | |
---|---|---|
月次アイテム | 項目に設定されている期間: 2 月 1 日から 3 月 1 日
| 項目に設定されている期間: 2 月 15 日から 3 月 15 日
|
隔月項目 | 項目に設定されている期間: 2 月 1 日から 4 月 1 日
| 項目に設定されてる期間: 2 月 15 日から 4 月 15 日
|
サブスクリプション |
|
|
期間が混在する場合の考慮事項
期間混在機能には、いくつかの制限があります。
サイクルの一致
すべてのサブスクリプションアイテムの価格サイクルは、サブスクリプションに存在する最短の価格サイクルの倍数である必要があります。価格の期間は、price.
フィールドと price.
フィールドの組み合わせです。
サポートされている期間の組み合わせの例:
- 1 カ月、3 カ月
- 1 カ月、1 年
- 1 日、1 週間
- 1 日、3 カ月
- 1 日、2 年
- 2 週間、4 週間
- 2 カ月、4 カ月、6 カ月
サポートされていない期間の組み合わせの例:
- 2 カ月、3 カ月
- 4 カ月、6 カ月
- 1 週間、1 カ月
- 2 日、1 週間
- 5 カ月、1 年
制限事項
プライベートプレビュー版の場合、期間が混在するサブスクリプションには、開発中に変更される可能性がある次の制限が適用されます。
- All subscription item prices must specify
recurring.
andusage_ type: licensed billing_
. We don’t support metered pricing.scheme: per_ unit - Mixed interval subscriptions are currently available in the Stripe API only, and not the customer portal.
- You can’t use cancel_at_period_end on a mixed interval subscription because it’s unclear which subscription item’s
current_
to use to determine the cancellation date.period_ end