sincecutoff.com
← all changes

Stripe Checkout Sessions accept billing_cycle_anchor_config

Introduced 2026-06-24 · score 0.95

HOW TO USE IT

When creating a Checkout Session for a recurring subscription, set `mode=subscription` and `subscription_data[billing_cycle_anchor_config][day_of_month]` to the desired billing day. The `day_of_month` field is required; `hour`, `minute`, `month`, and `second` are optional, and this configuration cannot be combined with `billing_cycle_anchor` or trial period parameters.

curl https://api.stripe.com/v1/checkout/sessions -u "<SECRET_KEY>" -H "Stripe-Version: 2026-06-24.dahlia" --data-urlencode "success_url=https://example.com/success" -d "line_items[0][price]=<RECURRING_PRICE_ID>" -d "line_items[0][quantity]=1" -d "mode=subscription" -d "subscription_data[billing_cycle_anchor_config][day_of_month]=<DAY_OF_MONTH>"

WHY THIS HELPS

When implementing subscription-mode Checkout Session creation that aligns subscribers to a fixed billing date, configure the session's billing cycle anchor.

REQUIREMENTS AND LIMITATIONS

  • mode (required): Set to `subscription` to use Stripe Billing for fixed-price subscriptions.
  • line_items (required): Required for subscription mode; pass recurring Price items.
  • subscription_data[billing_cycle_anchor_config][day_of_month] (required): Required day of month for the configured billing cycle anchor.
  • subscription_data[billing_cycle_anchor_config][hour]: Optional hour for the configured billing cycle anchor.
  • subscription_data[billing_cycle_anchor_config][minute]: Optional minute for the configured billing cycle anchor.
  • subscription_data[billing_cycle_anchor_config][month]: Optional month for the configured billing cycle anchor.
  • subscription_data[billing_cycle_anchor_config][second]: Optional second for the configured billing cycle anchor.
  • subscription_data[billing_cycle_anchor_config]: Configuration is mutually exclusive with `subscription_data[billing_cycle_anchor]` and any trial period parameters.
  • Prerequisite: Create a recurring Price and use its ID in `line_items`; the API reference shows creating a monthly USD Price before creating the Checkout Session.
  • Prerequisite: Authenticate the API request with a Stripe secret key.
  • Available for Checkout Sessions in subscription mode.
  • `day_of_month` is required; `hour`, `minute`, `month`, and `second` are optional.
  • `billing_cycle_anchor_config` is mutually exclusive with `billing_cycle_anchor` and any trial period parameters.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card