# サブスクリプション請求の更新日を設定する

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

導入で [customer-configured Accounts](https://docs.stripe.com/api/v2/core/accounts/create.md#v2_create_accounts-configuration-customer) を使用している場合は、コード例内の `Customer` とイベント参照を、対応する Accounts v2 API リファレンスに置き換えてください。詳細については、[Account オブジェクトで顧客を表す](https://docs.stripe.com/accounts-v2/use-accounts-as-customers.md)をご覧ください。

サブスクリプションの請求期間は、次の 2 つの要因により決定されます。

- 単一の[料金](https://docs.stripe.com/products-prices/overview.md)または複数の料金の継続期間 (月次、年次、週次など)。
- [請求サイクルのアンカー](https://docs.stripe.com/api/subscriptions/object.md#subscription_object-billing_cycle_anchor)は、今後の請求期間の日付を調整するための参照点です。`week` の期間には曜日、`month` と `year` の期間には日、`year` の期間には月が設定されます。デフォルト値は、サブスクリプションの作成日またはトライアルの終了日 (トライアル期間を使用している場合) です。また、サブスクリプションの作成時にこの値を明示的に設定することもできます。

> 請求サイクルアンカーは、現在のエポックからの秒単位の Unix タイムスタンプです。

以下に、さまざまな請求期間が設定された月次サブスクリプションの例を示します。

- 請求サイクルの起点の日付が 9 月 2 日の月次サブスクリプションの場合、常に毎月 2 日に請求されます。
- 請求サイクルの起点の日付が 1 月 31 日の月次サブスクリプションの場合、請求日は起点の日付に最も近いその月の最終日になります。したがって、請求日は 2 月 28 日 (うるう年の場合は 2 月 29 日)、3 月 31 日、4 月 30 日というようになります。
- 請求サイクルの起点の日付が 6 月 3 日 (金) の週次サブスクリプションの場合、翌週から毎週金曜日に請求されます。

完全な請求期間は、全額が請求される最初の*請求書* (Invoices are statements of amounts owed by a customer. They track the status of payments from draft through paid or otherwise finalized. Subscriptions automatically generate invoices, or you can manually create a one-off invoice)の日付に開始されます。多くの場合、その日付は請求サイクルの起点と同じであり、必ずこれに合わせて期間が調整されます。

## 新しいサブスクリプションの請求サイクルの起点を指定する

> サブスクリプションの作成時刻はリクエストの時刻と同じです。サブスクリプションの開始日とは異なります。[遡及と請求サイクルアンカー](https://docs.stripe.com/billing/subscriptions/backdating.md#backdating-billing-cycle)の詳細をご確認ください。

新しいサブスクリプションの請求サイクルの起点を指定する方法として、以下の 2 つがあります。

- `billing_cycle_anchor_config` を使用して、タイムスタンプを計算する (月次または年次のサブスクリプションのみ).
- `billing_cycle_anchor` を使用して、タイムスタンプを直接受け付ける。

月次または年次のサブスクリプションを作成している場合、短い月とうるう年が自動的に考慮される `billing_cycle_anchor_config` パラメーターの使用をお勧めします。日次または週次のサブスクリプションを作成している場合、またはタイムスタンプを使用してサブスクリプションの更新日を設定したい場合、`billing_cycle_anchor` パラメーターを直接使用します。

### billing_cycle_anchor_config を使用する

月次と年次のサブスクリプションを組み合わせて作成する場合は、[サブスクリプションの作成](https://docs.stripe.com/api.md#create_subscription)の `billing_cycle_anchor_config` を使用して、起点となる日付を指定します。

`day_of_month` を `31` に設定すると、日数が 31 日未満の月であっても月末に更新される月次サブスクリプションを作成できます。日数が 31 日未満の月には、その月の最終日にサブスクリプションが更新されます。

```curl
curl https://api.stripe.com/v1/subscriptions \
  -u "<<YOUR_SECRET_KEY>>:" \
  -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` に指定して年次サブスクリプションを作成します。

```curl
curl https://api.stripe.com/v1/subscriptions \
  -u "<<YOUR_SECRET_KEY>>:" \
  -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` を既存のサブスクリプションと同じ値に設定します。

```curl
curl https://api.stripe.com/v1/subscriptions \
  -u "<<YOUR_SECRET_KEY>>:" \
  -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 を使用して、明示的な請求サイクルの起点を指定したサブスクリプションを作成できます。

#### 定期支払い API

`billing_cycle_anchor` のタイムスタンプを設定して、[サブスクリプションの作成](https://docs.stripe.com/api.md#create_subscription)を呼び出します。

#### Accounts v2

```curl
curl https://api.stripe.com/v1/subscriptions \
  -u "<<YOUR_SECRET_KEY>>:" \
  -d "customer_account={{CUSTOMERACCOUNT_ID}}" \
  -d "items[0][price]={{PRICE_ID}}" \
  -d billing_cycle_anchor=1611008505
```

#### Customers v1

```curl
curl https://api.stripe.com/v1/subscriptions \
  -u "<<YOUR_SECRET_KEY>>:" \
  -d "customer={{CUSTOMER_ID}}" \
  -d "items[0][price]={{PRICE_ID}}" \
  -d billing_cycle_anchor=1611008505
```

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

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

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

- `proration_behavior` を `none` に設定することで、[比例配分を無効化](https://docs.stripe.com/billing/subscriptions/prorations.md#disable-prorations)します。これにより、全額請求される最初の請求書の日付までの期間が無料になります。そのため、最初の請求期間まで請求書は生成されません。
- [trial_end](https://docs.stripe.com/billing/subscriptions/trials/free-trials.md#combine-trial-anchor) に無料トライアルが終了する日付を表すタイムスタンプを設定して `billing_cycle_anchor` と組み合わせます。この方法を使用した場合、無料トライアルの期間と最初の全額請求書日までの日数によっては、トライアル期間の後に比例配分された請求書が生成される可能性があります。たとえば、無料トライアル期間が 7 日で請求の更新が毎月 1 日に行われる場合、顧客が 15 日にサブスクリプションに登録すると、22 日から毎月 1 日までの期間について比例配分された請求書が 22 日に生成され、その後は毎月 1 日に全額の請求書が生成されます。顧客が 28 日にサブスクリプションに登録した場合、無料トライアルは 1 日を超えて延長され、比例配分された請求書が翌月まで生成されます。

#### Checkout

`subscription_data.billing_cycle_anchor` のタイムスタンプを指定して、Stripe Checkout の[セッションの作成](https://docs.stripe.com/api/checkout/sessions/create.md#create_checkout_session)を呼び出します。

#### cURL

```bash
curl https://api.stripe.com/v1/checkout/sessions \
  -u <<YOUR_SECRET_KEY>>: \
  -d "line_items[][price]"="{{PRICE_ID}}" \
  -d "line_items[][quantity]"=1 \
  -d "mode"="subscription" \
  -d "success_url"="https://example.com/success?session_id={CHECKOUT_SESSION_ID}" \
  -d "subscription_data[billing_cycle_anchor]"=1611008505
```

Checkout で請求サイクルアンカーを設定するには、`subscription` モードである必要があります。

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

`proration_behavior` パラメーターを使用して、サブスクリプションの作成から、全額が請求される最初の請求書の日付までの期間をどのように処理するかを設定できます。Checkout ではトライアルと請求サイクルの起点の組み合わせはサポートされていません。

- デフォルトの `create_prorations` 設定を維持し、サブスクリプションの日付から、全額が請求される最初の請求書の日付までの期間について、顧客に対して直ちに請求書が発行されるようにします。
- [比例配分を無効にする](https://docs.stripe.com/payments/checkout/billing-cycle.md?ui=embedded-page#disable-prorations)には、`proration_behavior` を `none` に設定します。これにより、初回の期間が無料になり (最初の完全な請求書の日付まで)、最初の請求期間までは請求書がまったく生成されません。

> `proration_behavior` が `none` の場合、Checkout セッションでは 1 回限りの価格は使用できません。

## 既存サブスクリプションの請求期間変更

[Subscriptions API](https://docs.stripe.com/api/subscriptions/update.md) または[ダッシュボード](https://dashboard.stripe.com/subscriptions)を使用し、既存のサブスクリプションの請求日を以下のいずれかのオプションの中から変更します。

- 請求サイクルの起点を現在時刻にリセットします。
- Reset the billing cycle anchor to a specific timestamp.
- [無料トライアル](https://docs.stripe.com/billing/subscriptions/trials/free-trials.md)を追加すると、起点日は自動的にトライアルの終了日に設定されます。通常、トライアルはサブスクの作成時に開始されますが、既存のサブスクに適用することもできます。これにより、前のサイクルで支払い済みの残り日数分のクレジットを顧客に付与できます。

これらのシナリオでは、請求周期の日付が変更されます。ただし、`billing_mode[type]=flexible` を使用してサブスクを作成または更新した場合、請求周期のアンカーは変更されません。[フレキシブルな請求モードの設定](https://docs.stripe.com/billing/subscriptions/billing-mode.md)の詳細を表示。

- すべての価格がゼロ金額の場合、1 つ以上の有料価格を追加すると、請求期間が即座にリセットされます。詳細については、[サブスクリプション価格の変更ガイド](https://docs.stripe.com/billing/subscriptions/change-price.md#handle-zero-amount-prices-and-quantities) をご覧ください。
- `billing_cycle_anchor` が [cancel_at](https://docs.stripe.com/api/subscriptions/object.md#subscription_object-cancel_at) の日付にリセットされるのは、`cancel_at` を次にサブスクリプションが更新される前の日付に設定してサブスクリプションを作成するか、`billing_cycle_anchor` が新しい `cancel_at` 日付よりも将来の日付に設定されているサブスクリプションで既存の `cancel_at` の日付を変更する場合です。
- 異なる [recurring.interval](https://docs.stripe.com/api/prices/object.md#price_object-recurring) の料金に切り替えると、`billing_cycle_anchor` が現在の時刻にリセットされます。

### 請求期間を現在時刻にリセットする

To reset the billing cycle anchor to the current time, make an update request with `billing_cycle_anchor.type` 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](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-proration_behavior) to credit the customer for any days already paid in the previous period. Disabling proration might result in overcharging your customer.

> **フレキシブルモードの動作:** サブスクで `billing_mode[type]=flexible` を使用している場合、請求サイクルのアンカーを `now` にリセットしても、新しい請求書は自動的に生成されません。BCA のリセット時に請求書の発行をトリガーするには、`proration_behavior` も `always_invoice` に設定する必要があります。
> 
> 例外: BCA のリセットと同時にサブスクの項目も変更し、比例配分が完全に相殺されない場合、`proration_behavior` に関係なく、即座に請求が生成されます。

#### API

Call [update the subscription](https://docs.stripe.com/api.md#update_subscription), setting `billing_cycle_anchor.type` to `now` and `proration_behavior` to `create_prorations` to prevent overcharging the customer for any days they already paid in the previous cycle.

```curl
curl https://api.stripe.com/v1/subscriptions/{{SUBSCRIPTION_ID}} \
  -u "<<YOUR_SECRET_KEY>>:" \
  -H "Stripe-Version: 2026-09-30.endive" \
  -d "billing_cycle_anchor[type]=now" \
  -d proration_behavior=create_prorations
```

#### ダッシュボード

1. [サブスク](https://dashboard.stripe.com/subscriptions)で、オーバーフローメニュー⋯をクリックし、**サブスクの更新**を選択します。
2. **詳細設定**までスクロールして、**請求サイクルをリセット**を選択します。
3. **比例配分による調整**トグルを選択して、前のサイクルですでに支払われている日数分に対する過剰請求を防ぎます。
4. **サブスクリプションを更新**をクリックします。

### Reset the billing period to a specific time 

> The ability to reset the billing period to a specific time is in [private preview](https://docs.stripe.com/release-phases.md).

### Get early access to reset the billing period to a specific time

Enter your email to request access.

```bash
curl https://docs.stripe.com/preview/register \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Referer: https://docs.stripe.com/billing/subscriptions/billing-cycle" \
  -d '{"email": "EMAIL", "preview": "subscription_update_billing_cycle_anchor_timestamp_private_preview"}'
```

Before you begin, note the following requirements:

- Use [API version](https://docs.stripe.com/api/versioning.md) `2026-09-30.preview`.
- You can only reset the billing cycle anchor to a specific time for subscriptions that use [flexible billing mode](https://docs.stripe.com/billing/subscriptions/billing-mode/compare.md).

To reset the billing cycle anchor to a specific time, make an [update](https://docs.stripe.com/api/subscriptions/update.md) request with `billing_cycle_anchor.type` set to `timestamp` and `billing_cycle_anchor.timestamp` set to the Unix timestamp representing the new billing cycle anchor time. Depending on the new billing cycle anchor time, the update either advances the start and end time of the previous period or truncates the end time of the previous period.

After you reset the billing period, Stripe automatically creates [prorations](https://docs.stripe.com/billing/subscriptions/prorations.md) to either credit the customer for any days already paid in the previous period or debit the customer for any days in the new period that haven’t yet been paid for. You can set [proration behavior](https://docs.stripe.com/api/subscriptions/update.md#update_subscription-proration_behavior) to invoice the customer immediately, or to disable creating prorations.

```curl
curl https://api.stripe.com/v1/subscriptions/{{SUBSCRIPTION_ID}} \
  -u "<<YOUR_SECRET_KEY>>:" \
  -H "Stripe-Version: 2026-09-30.preview" \
  -d "billing_cycle_anchor[type]=timestamp" \
  -d "billing_cycle_anchor[timestamp]=1788220800" \
  -d proration_behavior=create_prorations
```

Stripe accepts any billing cycle anchor time that’s within one price interval of the current time with the following exceptions:

- For [mixed interval subscriptions](https://docs.stripe.com/billing/subscriptions/mixed-interval.md), Stripe considers the smallest price interval associated with the subscription.
- For subscriptions with a [free trial period](https://docs.stripe.com/billing/subscriptions/trials/free-trials.md), the new billing cycle anchor must be after the current [trial end](https://docs.stripe.com/api/subscriptions/object.md#subscription_object-trial_end).

The following are examples of possible new billing cycle anchors for different subscriptions. In all examples, the update request happens on September 10:

- A monthly subscription can accept a new billing cycle anchor time between August 10 and October 10.
- A mixed interval subscription with both a monthly and annual price can accept a new billing cycle anchor between August 10 and October 10.
- A monthly subscription with a free trial ending October 1 can accept a new billing cycle anchor time between October 1 and October 10.

You can also set a specific billing cycle anchor timestamp when you [create a preview invoice](https://docs.stripe.com/api/invoices/create_preview.md#create_invoice-subscription_details-billing_cycle_anchor-timestamp) and when you [resume a paused subscription](https://docs.stripe.com/api/subscriptions/resume.md#resume_subscription-billing_cycle_anchor-timestamp).

### トライアル期間を使用した請求期間の変更

[無料トライアル](https://docs.stripe.com/billing/subscriptions/trials/free-trials.md)を利用して、請求サイクルの起点日を自動的に `trial_end` 日に設定することで請求サイクルの起点を変更できます。

例えば、顧客が 7 月 23 日に次回請求予定のアクティブなサブスクリプションを持っており、7 月 15 日に 8 月 1 日終了のトライアル期間を導入したとします。

- 顧客は 7 月 15 日に 0 USD の請求書を受け取ります。顧客は前回のサイクルで 7 月 23 日まで既に支払い済みのため、「無料」期間は 7 月 24 日から 7 月 31 日までのみ適用されます。
- 顧客は 7 月 23 日には請求されません。
- 8 月 1 日に請求される新しいサイクルは通常料金での完全なサイクルとなり、その後は毎月 1 日に継続されます。

オプションで、`proration_behavior=none` を使用して、トライアルを開始するようにサブスクリプションを更新するときに比例配分を適用しないようにできます。ほとんどの場合、比例配分請求書を発行せずに請求期間を変更するためにトライアル期間を使用している場合は、比例配分を無効にします。これは、トライアル期間の長さが、以前の請求期間からすでに決済された部分を占めるためです。

#### API

[サブスクリプション更新](https://docs.stripe.com/api.md#update_subscription)を呼び出し、`trial_end` をトライアル終了日を表す Unix タイムスタンプに設定し、`proration_behavior` を `none` にします。`trial_end` を設定すると、請求サイクルの起点が同じ日付に設定されます。

```curl
curl https://api.stripe.com/v1/subscriptions/{{SUBSCRIPTION_ID}} \
  -u "<<YOUR_SECRET_KEY>>:" \
  -d trial_end=1627801200 \
  -d proration_behavior=none
```

#### ダッシュボード

1. [サブスク](https://dashboard.stripe.com/subscriptions)ページで、更新するサブスクを見つけます。
2. **サブスクリプションを更新**をクリックします。
3. **トライアルを追加**をクリックして、トライアルの日数を入力します。トライアルの終了日が新しい請求サイクルの起点の日付になります。
4. **比例配分による調整**トグルの選択を解除して、すでに支払われている日数分について顧客にクレジットするのを防ぎます。
5. **サブスクリプションを更新**をクリックします。

## 従量課金ベース

[従量課金](https://docs.stripe.com/products-prices/pricing-models.md)を使用すると、請求期間中の使用量に応じて顧客が支払う価格が変動します。請求期間を変えると、サブスクリプションのサービス期間の終了が早まり、短縮された請求期間中に発生した使用量に対して顧客に請求することになります。

### しきい値

通常のサイクルに加えて、請求金額が[しきい値](https://docs.stripe.com/billing/subscriptions/usage-based/thresholds.md)に達したときに請求するようにサブスクリプションを設定できます。

この方法で請求するようにサブスクリプションを設定している場合、しきい値に達したときにサブスクリプションのサービス期間をリセットするように設定できます。

## See also

- [トライアル期間を使用する](https://docs.stripe.com/billing/subscriptions/trials/free-trials.md)
- [サブスクリプションの更新](https://docs.stripe.com/api.md#update_subscription)
- [テストクロックを使用して請求書をプレビューする](https://docs.stripe.com/billing/testing.md#test-clocks)
