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

注

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

サブスクリプションの請求サイクル日を設定する

サブスクリプションの請求日を設定する方法をご紹介します。

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 for month and year intervals, and the month of year for year 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_cycle_anchor_config 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_cycle_anchor parameter directly.

billing_cycle_anchor_config を使用する

月次と年次のサブスクリプションを組み合わせて作成する場合は、サブスクリプションの作成の billing_cycle_anchor_config を使用して、起点となる日付を指定します。

Set day_of_month 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.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl https://api.stripe.com/v1/subscriptions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d customer=
{{CUSTOMER_ID}}
\ -d "items[0][price]"=
{{PRICE_ID}}
\ -d "billing_cycle_anchor_config[day_of_month]"=31

month を指定して、複数月および年次のサブスクリプションで起点となる月を管理することもできます。

年次サブスクリプションの開始を 7 月 1 日とするには、month を 7、day_of_month を 1 に指定して年次サブスクリプションを作成します。

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl https://api.stripe.com/v1/subscriptions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d customer=
{{CUSTOMER_ID}}
\ -d "items[0][price]"=
{{PRICE_ID}}
\ -d "billing_cycle_anchor_config[month]"=7 \ -d "billing_cycle_anchor_config[day_of_month]"=1

billing_cycle_anchor_config を使用して請求サイクルの起点の正確な月、日、時、分、秒を指定できます。時、分、秒を指定しない場合、デフォルトはサブスクリプションの作成時刻の値になります。

請求サイクルの起点には協定世界時 (UTC) が用いられています。たとえば、時間を指定せずに午後 5 時 (東部標準時) に billing_cycle_anchor_config を使用してサブスクリプションを作成した場合、時刻は午後 10 時 (UTC) としてシステムに記録されます。

billing_cycle_anchor_config は、遡及的な開始日による固定をサポートしていません。

たとえば、既存の月次サブスクリプションにおいて、日、時、分、秒 として 15、12、30、0 を含む billing_cycle_anchor タイムスタンプが指定されている場合、新しい月次サブスクリプションをこれに合わせることができます。そのためには、day_of_month、hour、minute、second を既存のサブスクリプションと同じ値に設定します。

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl https://api.stripe.com/v1/subscriptions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d customer=
{{CUSTOMER_ID}}
\ -d "items[0][price]"=
{{PRICE_ID}}
\ -d "billing_cycle_anchor_config[day_of_month]"=15 \ -d "billing_cycle_anchor_config[hour]"=12 \ -d "billing_cycle_anchor_config[minute]"=30 \ -d "billing_cycle_anchor_config[second]"=0

billing_cycle_anchor_config を使用すると、結果的に billing_cycle_anchor が将来の 1 請求期間を超える場合がありますが、全額が請求される最初の請求書の日付は常に、サブスクリプションの作成または無料トライアルの終了から 1 請求期間以内になります。

たとえば、請求期間が 2 カ月のサブスクリプションを 2 月に作成し、day_of_month を 31 に設定して請求サイクルを各月の最終日にするとします。2 カ月の請求期間を 2 月に開始した場合、31 日がある次の月は 8 月であるため、請求サイクルの起点は 8 月 31 日となります。ただし、全額が請求される最初の請求書の日付は、2 月のままです。サブスクリプションの作成から 2 月 28 日 (うるう年の場合は 29 日) までは最初の比例配分の期間であり、その後に通常の 2 カ月ごとの請求サイクルが開始されます。

billing_cycle_anchor を使用する

Subscriptions API または Checkout を使用して、明示的な請求サイクルの起点を指定したサブスクリプションを作成できます。

billing_cycle_anchor のタイムスタンプを設定して、サブスクリプションの作成を呼び出します。

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl https://api.stripe.com/v1/subscriptions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d customer=
{{CUSTOMER_ID}}
\ -d "items[0][price]"=
{{PRICE_ID}}
\ -d billing_cycle_anchor=1611008505

比例配分 (日割り / 秒割り計算) の動作を設定する

使用する API パラメーターに関係なく、サブスクリプションの作成日から全額が請求される最初の請求書の日付までの期間について、Stripe は自動的に比例配分が適用された請求書を作成します。

サブスクリプションの作成から全額が請求される最初の請求書の日付までの期間について、顧客への請求を直ちに行いたくない場合は、次のいずれかの方法を使用します。

  • Disable the proration by setting proration_behavior to none, making the initial period up to the first full invoice date free. This action doesn’t generate an invoice at all until the first billing period.
  • Combine a trial with the billing_cycle_anchor by setting trial_end to a timestamp representing the date when the free trial ends. Depending on the duration of the free trial and the number of days until the first full invoice date, this option might result in a prorated invoice following the trial period. For example, a free trial is 7 days and the billing renewal is monthly on the 1st. If the customer subscribes on the 15th, we generate a prorated invoice on the 22nd for the period between the 22nd and the 1st, then invoice for the full amount on the 1st of each month thereafter. If a customer subscribes on the 28th, the free trial extends past the 1st, generating a prorated invoice until the next month.

Change the billing period on existing subscriptions

Subscriptions API またはダッシュボードを使用し、既存のサブスクリプションの請求日を以下のいずれかのオプションの中から変更します。

  • 請求サイクルの起点を現在時刻にリセットします。
  • 無料トライアルを追加して、起点の日付がトライアルの終了日に自動的に設定されるようにします。トライアルは通常、サブスクリプションの作成時に開始しますが、既存のサブスクリプションに適用することもできます。これにより、顧客がすでに支払った前のサイクルの残り日数分について顧客にクレジットすることができます。

請求サイクルの日付は、このようなシナリオで変わります。ただし、billing_mode[type]=flexible を指定してサブスクリプションを作成または更新した場合、請求サイクルの起点は変更されません。詳しくは、柔軟な請求モードの設定とその制限事項をご覧ください。

  • すべての価格がゼロ金額の場合、1 つ以上の有料価格を追加すると、請求期間が即座にリセットされます。詳細については、サブスクリプション価格の変更ガイド をご覧ください。
  • The billing_cycle_anchor resets to the cancel_at date when creating a subscription with cancel_at set to a date before the subscription renews next, or modifying an existing cancel_at date on a subscription with a billing_cycle_anchor in the future of the new cancel_at date.
  • 異なる 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_cycle_anchor 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.

顧客が前のサイクルで支払った日数分による過剰請求を防ぐには、billing_cycle_anchorをnowに設定し、proration_behavior を create_prorations に設定してサブスクリプションの更新を呼び出します。

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl https://api.stripe.com/v1/subscriptions/sub_49ty4767H20z6a \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d billing_cycle_anchor=now \ -d proration_behavior=create_prorations

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_end 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_behavior=none. 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.

Call update subscription, setting trial_end to a Unix timestamp representing the end date for the trial and proration_behavior to none. Setting the trial_end sets the billing cycle anchor to the same date.

Command Line
cURL
Stripe CLI
Ruby
Python
PHP
Java
Node
Go
.NET
No results
curl https://api.stripe.com/v1/subscriptions/sub_49ty4767H20z6a \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d trial_end=1627801200 \ -d proration_behavior=none

従量課金ベース

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.

参照情報

  • トライアル期間の使用
  • サブスクリプションの更新
このページはお役に立ちましたか。
はいいいえ
  • お困りのことがございましたら 、サポートにお問い合わせください。
  • 早期アクセスプログラムにご参加ください。
  • 変更ログをご覧ください。
  • ご不明な点がございましたら、お問い合わせください。
  • LLM ですか?llms.txt を読んでください。
  • Powered by Markdoc
関連ガイド
テストクロックを使用して請求書をプレビューする