サブスクリプションの請求サイクル日を設定する
サブスクリプションの請求日を設定する方法をご紹介します。
A subscription’s billing period depends on two factors:
- 単一の料金または複数の料金の継続期間 (月次、年次、週次など)。
- The billing cycle anchor is the reference point that aligns future billing period dates. It sets the day of week for
week
intervals, the day of month formonth
andyear
intervals, and the month of year foryear
intervals. The default value is either the subscription creation date or the trial end date (if you’re using a trial period). You can also explicitly set this value at the time you create the subscription.
注
請求サイクルアンカーは、現在のエポックからの秒単位の Unix タイムスタンプです。
The following are examples of monthly subscriptions with different billing periods:
- 請求サイクルの起点の日付が 9 月 2 日の月次サブスクリプションの場合、常に毎月 2 日に請求されます。
- 請求サイクルの起点の日付が 1 月 31 日の月次サブスクリプションの場合、請求日は起点の日付に最も近いその月の最終日になります。したがって、請求日は 2 月 28 日 (うるう年の場合は 2 月 29 日)、3 月 31 日、4 月 30 日というようになります。
- 請求サイクルの起点の日付が 6 月 3 日 (金) の週次サブスクリプションの場合、翌週から毎週金曜日に請求されます。
完全な請求期間は、全額が請求される最初の請求書の日付に開始されます。多くの場合、その日付は請求サイクルの起点と同じであり、必ずこれに合わせて期間が調整されます。
新しいサブスクリプションの請求サイクルの起点を指定する
注
サブスクリプションの作成時刻は、リクエストの時刻と一致します。サブスクリプションの開始日とは異なります。詳細は遡及適用と請求サイクルの起点をご覧ください。
新しいサブスクリプションの請求サイクルの起点を指定する方法として、以下の 2 つがあります。
billing_
を使用して、タイムスタンプを計算する (月次または年次のサブスクリプションのみ).cycle_ anchor_ config billing_
を使用して、タイムスタンプを直接受け付ける。cycle_ anchor
If you’re creating a monthly or yearly subscription, we recommend using the billing_
parameter because it automatically factors in short months and leap years for you. If you’re creating a daily or weekly subscription, or if you prefer to set the renewal date of your subscription using a timestamp, use the billing_
parameter directly.
billing_cycle_anchor_config を使用する
月次と年次のサブスクリプションを組み合わせて作成する場合は、サブスクリプションの作成の billing_
を使用して、起点となる日付を指定します。
Set day_
to 31
to create a monthly subscription that renews at the end of the month, even in months with less than 31 days. If a month has less than 31 days, the subscription renews on the last day of that month.
month
を指定して、複数月および年次のサブスクリプションで起点となる月を管理することもできます。
年次サブスクリプションの開始を 7 月 1 日とするには、month
を 7
、day_
を 1
に指定して年次サブスクリプションを作成します。
billing_
を使用して請求サイクルの起点の正確な月、日、時、分、秒を指定できます。時、分、秒を指定しない場合、デフォルトはサブスクリプションの作成時刻の値になります。
請求サイクルの起点には協定世界時 (UTC) が用いられています。たとえば、時間を指定せずに午後 5 時 (東部標準時) に billing_
を使用してサブスクリプションを作成した場合、時刻は午後 10 時 (UTC) としてシステムに記録されます。
billing_
は、遡及的な開始日による固定をサポートしていません。
たとえば、既存の月次サブスクリプションにおいて、日、時、分、秒 として 15、12、30、0 を含む billing_
タイムスタンプが指定されている場合、新しい月次サブスクリプションをこれに合わせることができます。そのためには、day_
、hour
、minute
、second
を既存のサブスクリプションと同じ値に設定します。
billing_
を使用すると、結果的に billing_
が将来の 1 請求期間を超える場合がありますが、全額が請求される最初の請求書の日付は常に、サブスクリプションの作成または無料トライアルの終了から 1 請求期間以内になります。
たとえば、請求期間が 2 カ月のサブスクリプションを 2 月に作成し、day_
を 31
に設定して請求サイクルを各月の最終日にするとします。2 カ月の請求期間を 2 月に開始した場合、31 日がある次の月は 8 月であるため、請求サイクルの起点は 8 月 31 日となります。ただし、全額が請求される最初の請求書の日付は、2 月のままです。サブスクリプションの作成から 2 月 28 日 (うるう年の場合は 29 日) までは最初の比例配分の期間であり、その後に通常の 2 カ月ごとの請求サイクルが開始されます。
billing_cycle_anchor を使用する
Subscriptions API または Checkout を使用して、明示的な請求サイクルの起点を指定したサブスクリプションを作成できます。
Change the billing period on existing subscriptions 
Subscriptions API またはダッシュボードを使用し、既存のサブスクリプションの請求日を以下のいずれかのオプションの中から変更します。
- 請求サイクルの起点を現在時刻にリセットします。
- 無料トライアルを追加して、起点の日付がトライアルの終了日に自動的に設定されるようにします。トライアルは通常、サブスクリプションの作成時に開始しますが、既存のサブスクリプションに適用することもできます。これにより、顧客がすでに支払った前のサイクルの残り日数分について顧客にクレジットすることができます。
請求サイクルの日付は、このようなシナリオで変わります。ただし、billing_
を指定してサブスクリプションを作成または更新した場合、請求サイクルの起点は変更されません。詳しくは、柔軟な請求モードの設定とその制限事項をご覧ください。
- すべての価格がゼロ金額の場合、1 つ以上の有料価格を追加すると、請求期間が即座にリセットされます。詳細については、サブスクリプション価格の変更ガイド をご覧ください。
- The
billing_
resets to the cancel_at date when creating a subscription withcycle_ anchor cancel_
set to a date before the subscription renews next, or modifying an existingat cancel_
date on a subscription with aat billing_
in the future of the newcycle_ anchor cancel_
date.at - 異なる recurring.interval の料金に切り替えると、
billing_
が現在の時刻にリセットされます。cycle_ anchor
Reset the billing period to the current time 
To reset the billing cycle anchor to the current time, make an update request with billing_
set to now
. This sets the billing cycle anchor to the time of the update request. After you reset the billing cycle anchor, Stripe immediately sends an invoice. Enable proration to credit the customer for any days already paid in the previous period. Disabling proration might result in overcharging your customer.
Change the billing period using a trial period
You can change the billing cycle anchor by using a free trial to automatically set the billing cycle anchor date to the trial_
date.
例えば、顧客が 7 月 23 日に次回請求予定のアクティブなサブスクリプションを持っており、7 月 15 日に 8 月 1 日終了のトライアル期間を導入したとします。
- 顧客は 7 月 15 日に 0 USD の請求書を受け取ります。顧客は前回のサイクルで 7 月 23 日まで既に支払い済みのため、「無料」期間は 7 月 24 日から 7 月 31 日までのみ適用されます。
- 顧客は 7 月 23 日には請求されません。
- 8 月 1 日に請求される新しいサイクルは通常料金での完全なサイクルとなり、その後は毎月 1 日に継続されます。
Optionally, you can prevent prorations when you update a subscription to start a trial by using proration_
. In most cases, if you’re using the trial period to change the billing period without issuing a prorated invoice, you disable proration because the length of the trial period accounts for the portion already paid from the previous billing period.
従量課金ベース
With usage-based billing, the price paid by the customer varies based on consumption during the billing period. When changing the billing period results in ending a subscription’s service period early, you charge the customer for the usage accrued during the shortened billing period.
しきい値
通常のサイクルに加えて、請求金額がしきい値に達したときに請求するようにサブスクリプションを設定できます。
If you have a subscription configured to invoice this way, you can set it up to reset the subscription service period when it hits the threshold.