--- title: "Create Schedule" openapi: "openapi POST /v1/billing.create_schedule" --- import { DynamicParamField } from "/components/dynamic-param-field.jsx"; import { DynamicResponseField } from "/components/dynamic-response-field.jsx"; import { DynamicResponseExample } from "/components/dynamic-response-example.jsx"; ### Body Parameters The ID of the customer to create the schedule for. Optional entity ID for an entity-scoped schedule. Invoice mode creates and sends an invoice instead of charging the customer's payment method immediately for the first phase. When true, creates an invoice and sends it to the customer instead of charging their card immediately. Uses Stripe's send_invoice collection method. If true, enables the plan immediately even though the invoice is not paid yet. If true, finalizes the invoice so it can be sent to the customer. If false, keeps it as a draft for manual review. URL to redirect to after successful checkout. Additional parameters to pass into the creation of the Stripe checkout session. Controls when to return a checkout URL for the immediate phase. 'always' forces a confirmation or checkout flow, 'if_required' only redirects when needed, and 'never' disables redirects. Whether to prorate the immediate phase. 'none' skips proration charges and credits. Pass 'now' to reset the billing cycle anchor of the immediate phase to the current time. If true, the immediate-phase cusProducts are activated immediately (and scheduled-phase cusProducts pre-inserted) even when payment is pending via Stripe checkout. The Autumn schedule rows are persisted on checkout.session.completed. Ordered phase definitions for the schedule. When this phase should start, in epoch milliseconds. Plans to materialize for this phase. The ID of the plan to schedule in this phase. Optional prepaid feature quantities for this phase's plan. The ID of the feature to set quantity for. The quantity of the feature. Whether the customer can adjust the quantity. Optional explicit plan version to schedule. Customize the plan to schedule. Can override the price, items, or both. Base price configuration for a plan. Base price amount for the plan. Billing interval (e.g. 'month', 'year'). Number of intervals per billing cycle. Defaults to 1. Override the items in the plan. The ID of the feature to configure. Number of free units included. Balance resets to this each interval for consumable features. If true, customer has unlimited access to this feature. Reset configuration for consumable features. Omit for non-consumable features like seats. Interval at which balance resets (e.g. 'month', 'year'). For consumable features only. Number of intervals between resets. Defaults to 1. Pricing for usage beyond included units. Omit for free features. Price per billing_units after included usage. Either 'amount' or 'tiers' is required. Tiered pricing. Either 'amount' or 'tiers' is required. Billing interval. For consumable features, should match reset.interval. Number of intervals per billing cycle. Defaults to 1. Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200). 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go. Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Proration settings for prepaid features. Controls mid-cycle quantity change billing. Billing behavior when quantity increases mid-cycle. Credit behavior when quantity decreases mid-cycle. Rollover config for unused units. If set, unused included units carry over. Max rollover units. Omit for unlimited rollover. Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max. When rolled over units expire. Number of periods before expiry. Unsupported for create_schedule today. Requests that include this field will be rejected. ### Response The ID of the customer. The entity ID for the schedule, or null when customer-level. Whether the schedule is fully created or waiting for payment or confirmation to complete. The ID of the created schedule. Null when the schedule is waiting on Autumn checkout confirmation. Persisted phases in ascending starts_at order. Empty when waiting on Autumn checkout confirmation. The ID of the persisted phase row. When this phase starts, in epoch milliseconds. Customer products materialized for this phase. Invoice details if an invoice was created. Only present when a charge was made. The status of the invoice (e.g., 'paid', 'open', 'draft'). The Stripe invoice ID. The total amount of the invoice in cents. The three-letter ISO currency code (e.g., 'usd'). URL to the hosted invoice page where the customer can view and pay the invoice. URL to redirect the customer to complete payment. Null if no payment action is required. The type of action required to complete the payment. A human-readable explanation of why this action is required. ```json 200 { "customer_id": "cus_123", "entity_id": null, "status": "created", "schedule_id": "sch_1234", "phases": [ { "phase_id": "sphs_1111", "starts_at": 1735689600000, "customer_product_ids": [ "cus_prod_1111" ] }, { "phase_id": "sphs_2222", "starts_at": 1736899200000, "customer_product_ids": [ "cus_prod_2222" ] } ], "invoice": null, "payment_url": null } ```