Skip to content

Stripe: Update a schedule

Stripe subscriptionSchedules.postSubscriptionSchedulesSchedule: arguments, response, policy and SDK examples.

← Subscription schedules operations · Get started

Operation stripe.postsubscriptionschedulesschedule

Provider route: POST /v1/subscription_schedules/{schedule}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/stripe with npm, or alter-sdk-stripe with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { StripeIntegration } from "@alter-ai/stripe";
async function execute(input: Parameters<StripeIntegration["subscriptionSchedules"]["postSubscriptionSchedulesSchedule"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new StripeIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.subscriptionSchedules.postSubscriptionSchedulesSchedule(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_stripe import StripeIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = StripeIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.subscription_schedules.post_subscription_schedules_schedule(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.schedulestringRequired within parentMaximum length: 5000
headersobjectOptionalAdditional keys: not allowed
headers.Idempotency-KeystringOptionalMinimum length: 1
Maximum length: 255
bodyobjectOptionalAdditional keys: not allowed
body.default_settingsModelOptionalExpand Create a schedule — request body — body default settings
body.end_behaviorstringOptionalBehavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
One of: cancel, none, release, renew
body.expandarrayOptionalSpecifies which fields in the response should be expanded.
body.expand[]stringEach itemMaximum length: 5000
body.metadataJSONOptionalSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
body.metadata (anyOf 1)objectAlternativeAdditional keys: see wildcard field
body.metadata (anyOf 1).*stringAdditional keys
body.metadata (anyOf 2)stringAlternativeOne of:
body.pause_schedulesJSONOptionalConfigures the subscription’s pause behavior and, optionally, its resume behavior. Only one entry is supported. Include a key to update an existing entry. Omit to leave an existing pause schedule unchanged, or pass "" to clear it.
body.pause_schedules (anyOf 1)arrayAlternative
body.pause_schedules (anyOf 1)[]objectEach item
body.pause_schedules (anyOf 1)[].keystringOptionalMaximum length: 40
body.pause_schedules (anyOf 1)[].pauseobjectOptional
body.pause_schedules (anyOf 1)[].pause.pause_atobjectOptional
body.pause_schedules (anyOf 1)[].pause.pause_at.timestampintegerOptionalFormat: unix-time
body.pause_schedules (anyOf 1)[].pause.pause_at.typestringRequired within parentOne of: now, timestamp
body.pause_schedules (anyOf 1)[].pause.settingsobjectOptional
body.pause_schedules (anyOf 1)[].pause.settings.bill_forobjectOptional
body.pause_schedules (anyOf 1)[].pause.settings.bill_for.outstanding_usage_throughobjectOptional
body.pause_schedules (anyOf 1)[].pause.settings.bill_for.outstanding_usage_through.typestringOptionalOne of: none, pause_at
body.pause_schedules (anyOf 1)[].pause.settings.bill_for.unused_time_fromobjectOptional
body.pause_schedules (anyOf 1)[].pause.settings.bill_for.unused_time_from.typestringOptionalOne of: item_current_period_start, none, pause_at
body.pause_schedules (anyOf 1)[].pause.settings.invoicing_behaviorstringOptionalOne of: invoice, pending_invoice_item
body.pause_schedules (anyOf 1)[].pause.settings.typestringOptionalOne of: subscription
body.pause_schedules (anyOf 1)[].resumeJSONOptional
body.pause_schedules (anyOf 1)[].resume (anyOf 1)objectAlternative
body.pause_schedules (anyOf 1)[].resume (anyOf 1).resume_atobjectOptional
body.pause_schedules (anyOf 1)[].resume (anyOf 1).resume_at.durationobjectOptional
body.pause_schedules (anyOf 1)[].resume (anyOf 1).resume_at.duration.intervalstringRequired within parentOne of: day, month, week, year
body.pause_schedules (anyOf 1)[].resume (anyOf 1).resume_at.duration.interval_countintegerOptional
body.pause_schedules (anyOf 1)[].resume (anyOf 1).resume_at.timestampintegerOptionalFormat: unix-time
body.pause_schedules (anyOf 1)[].resume (anyOf 1).resume_at.typestringRequired within parentOne of: duration, now, timestamp
body.pause_schedules (anyOf 1)[].resume (anyOf 1).settingsobjectOptional
body.pause_schedules (anyOf 1)[].resume (anyOf 1).settings.billing_cycle_anchorstringOptionalOne of: resume_at, unchanged
body.pause_schedules (anyOf 1)[].resume (anyOf 1).settings.payment_behaviorstringOptionalOne of: resume_on_payment_attempt, resume_on_payment_success
body.pause_schedules (anyOf 1)[].resume (anyOf 1).settings.proration_behaviorstringOptionalOne of: always_invoice, create_prorations, none
body.pause_schedules (anyOf 1)[].resume (anyOf 2)stringAlternativeOne of:
body.pause_schedules (anyOf 2)stringAlternativeOne of:
body.phasesarrayOptionalList representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted.
body.phases[]objectEach item
body.phases[].add_invoice_itemsarrayOptional
body.phases[].add_invoice_items[]ModelEach itemExpand Create a schedule — request body — body phases item add invoice items item
body.phases[].application_fee_percentnumberOptional
body.phases[].automatic_taxobjectOptional
body.phases[].automatic_tax.enabledbooleanRequired within parent
body.phases[].automatic_tax.liabilityobjectOptional
body.phases[].automatic_tax.liability.accountstringOptional
body.phases[].automatic_tax.liability.typestringRequired within parentOne of: account, self
body.phases[].billing_cycle_anchorstringOptionalOne of: automatic, phase_start
body.phases[].billing_thresholdsJSONOptional
body.phases[].billing_thresholds (anyOf 1)objectAlternative
body.phases[].billing_thresholds (anyOf 1).amount_gteintegerOptional
body.phases[].billing_thresholds (anyOf 1).reset_billing_cycle_anchorbooleanOptional
body.phases[].billing_thresholds (anyOf 2)stringAlternativeOne of:
body.phases[].collection_methodstringOptionalOne of: charge_automatically, send_invoice
body.phases[].default_payment_methodstringOptionalMaximum length: 5000
body.phases[].default_tax_ratesJSONOptional
body.phases[].default_tax_rates (anyOf 1)arrayAlternative
body.phases[].default_tax_rates (anyOf 1)[]stringEach itemMaximum length: 5000
body.phases[].default_tax_rates (anyOf 2)stringAlternativeOne of:
body.phases[].descriptionJSONOptional
body.phases[].description (anyOf 1)stringAlternativeMaximum length: 500
body.phases[].description (anyOf 2)stringAlternativeOne of:
body.phases[].discountsJSONOptional
body.phases[].discounts (anyOf 1)arrayAlternative
body.phases[].discounts (anyOf 1)[]objectEach item
body.phases[].discounts (anyOf 1)[].couponstringOptionalMaximum length: 5000
body.phases[].discounts (anyOf 1)[].discountstringOptionalMaximum length: 5000
body.phases[].discounts (anyOf 1)[].promotion_codestringOptionalMaximum length: 5000
body.phases[].discounts (anyOf 2)stringAlternativeOne of:
body.phases[].durationobjectOptional
body.phases[].duration.intervalstringRequired within parentOne of: day, month, week, year
body.phases[].duration.interval_countintegerOptional
body.phases[].end_dateJSONOptional
body.phases[].end_date (anyOf 1)integerAlternativeFormat: unix-time
body.phases[].end_date (anyOf 2)stringAlternativeOne of: now
Maximum length: 5000
body.phases[].invoice_settingsModelOptionalExpand Create a schedule — request body — body default settings invoice settings
body.phases[].itemsarrayRequired within parent
body.phases[].items[]ModelEach itemExpand Create a schedule — request body — body phases item items item
body.phases[].metadataobjectOptionalAdditional keys: see wildcard field
body.phases[].metadata.*stringAdditional keys
body.phases[].on_behalf_ofstringOptional
body.phases[].proration_behaviorstringOptionalOne of: always_invoice, create_prorations, none
body.phases[].start_dateJSONOptional
body.phases[].start_date (anyOf 1)integerAlternativeFormat: unix-time
body.phases[].start_date (anyOf 2)stringAlternativeOne of: now
Maximum length: 5000
body.phases[].transfer_dataobjectOptional
body.phases[].transfer_data.amount_percentnumberOptional
body.phases[].transfer_data.destinationstringRequired within parent
body.phases[].trialbooleanOptional
body.phases[].trial_endJSONOptional
body.phases[].trial_end (anyOf 1)integerAlternativeFormat: unix-time
body.phases[].trial_end (anyOf 2)stringAlternativeOne of: now
Maximum length: 5000
body.proration_behaviorstringOptionalIf the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`.
One of: always_invoice, create_prorations, none

Referenced models: Create a schedule — request body — body phases item add invoice items item, Create a schedule — request body — body default settings, Create a schedule — request body — body default settings invoice settings, Create a schedule — request body — body phases item items item

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Cancel a schedule — response body

Referenced models: Cancel a schedule — response body

712 more schemas are linked from the tables above, on the schema pages.

Cancel a schedule — response body
FieldTypePresenceDescription and constraints
$objectRootA subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes.

Related guide: [Subscription schedules](https://docs.stripe.com/billing/subscriptions/subscription-schedules)
applicationJSONOptional
application (anyOf 1)JSONAlternativeID of the Connect Application that created the schedule.
application (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
application (anyOf 1) (anyOf 2)ModelAlternativeExpand PostApplicationFeesIdRefund — response body — application / object: application
application (anyOf 1) (anyOf 3)ModelAlternativeExpand Accept a quote — response body — application / value / deleted: True, object: application
application (anyOf 2)nullAlternative
billing_modeModelRequired within parentExpand Cancel a schedule — response body — billing mode
canceled_atJSONOptional
canceled_at (anyOf 1)JSONAlternative
canceled_at (anyOf 1) (anyOf 1)integerAlternativeTime at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
Format: unix-time
canceled_at (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
canceled_at (anyOf 2)nullAlternative
completed_atJSONOptional
completed_at (anyOf 1)JSONAlternative
completed_at (anyOf 1) (anyOf 1)integerAlternativeTime at which the subscription schedule was completed. Measured in seconds since the Unix epoch.
Format: unix-time
completed_at (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
completed_at (anyOf 2)nullAlternative
createdJSONRequired within parent
created (anyOf 1)integerAlternativeTime at which the object was created. Measured in seconds since the Unix epoch.
Format: unix-time
created (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
current_phaseJSONOptional
current_phase (anyOf 1)JSONAlternativeObject representing the start and end dates for the current phase of the subscription schedule, if it is `active`.
current_phase (anyOf 1) (anyOf 1)ModelAlternativeExpand Cancel a schedule — response body — current phase value end date, start date
current_phase (anyOf 2)nullAlternative
customerJSONRequired within parentID of the customer who owns the subscription schedule.
customer (anyOf 1)stringAlternativeMaximum length: 5000
customer (anyOf 2)ModelAlternativeExpand Create a customer — response body
customer (anyOf 3)ModelAlternativeExpand Delete a customer — response body
customer_accountJSONOptional
customer_account (anyOf 1)stringAlternativeID of the account who owns the subscription schedule.
Maximum length: 5000
customer_account (anyOf 2)nullAlternative
default_settingsModelRequired within parentExpand Cancel a schedule — response body — default settings
end_behaviorstringRequired within parentBehavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
Known values: cancel, none, release, renew
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
livemodebooleanRequired within parentIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadataJSONOptional
metadata (anyOf 1)objectAlternativeSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Additional keys: see wildcard field
metadata (anyOf 1).*stringAdditional keysMaximum length: 500
metadata (anyOf 2)nullAlternative
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: subscription_schedule
pause_schedulesarrayOptionalThe pause schedules for this subscription schedule.
pause_schedules[]ModelEach itemExpand Cancel a schedule — response body — pause schedules item
phasesarrayRequired within parentConfiguration for the subscription schedule's phases.
phases[]ModelEach itemExpand Cancel a schedule — response body — phases item
released_atJSONOptional
released_at (anyOf 1)JSONAlternative
released_at (anyOf 1) (anyOf 1)integerAlternativeTime at which the subscription schedule was released. Measured in seconds since the Unix epoch.
Format: unix-time
released_at (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
released_at (anyOf 2)nullAlternative
released_subscriptionJSONOptional
released_subscription (anyOf 1)stringAlternativeID of the subscription once managed by the subscription schedule (if it is released).
Maximum length: 5000
released_subscription (anyOf 2)nullAlternative
statusstringRequired within parentThe present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://docs.stripe.com/billing/subscriptions/subscription-schedules).
Known values: active, canceled, completed, not_started, released
subscriptionJSONOptional
subscription (anyOf 1)JSONAlternativeID of the subscription managed by the subscription schedule.
subscription (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
subscription (anyOf 1) (anyOf 2)ModelAlternativeExpand Pause a subscription — response body
subscription (anyOf 2)nullAlternative
test_clockJSONOptional
test_clock (anyOf 1)JSONAlternativeID of the test clock this subscription schedule belongs to.
test_clock (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
test_clock (anyOf 1) (anyOf 2)ModelAlternativeExpand Create a test clock — response body
test_clock (anyOf 2)nullAlternative

Referenced models: PostApplicationFeesIdRefund — response body — application / object: application, Create a customer — response body, Accept a quote — response body — application / value / deleted: True, object: application, Delete a customer — response body, Pause a subscription — response body, Cancel a schedule — response body — current phase value end date, start date, Cancel a schedule — response body — phases item, Cancel a schedule — response body — default settings, Cancel a schedule — response body — pause schedules item, Cancel a schedule — response body — billing mode, Create a test clock — response body

Create a schedule — request body — body default settings invoice settings
FieldTypePresenceDescription and constraints
$objectRoot
account_tax_idsJSONOptional
account_tax_ids (anyOf 1)arrayAlternative
account_tax_ids (anyOf 1)[]stringEach itemMaximum length: 5000
account_tax_ids (anyOf 2)stringAlternativeOne of:
custom_fieldsJSONOptional
custom_fields (anyOf 1)arrayAlternative
custom_fields (anyOf 1)[]objectEach item
custom_fields (anyOf 1)[].namestringRequired within parentMaximum length: 40
custom_fields (anyOf 1)[].valuestringRequired within parentMaximum length: 140
custom_fields (anyOf 2)stringAlternativeOne of:
days_until_dueintegerOptional
descriptionJSONOptional
description (anyOf 1)stringAlternativeMaximum length: 1500
description (anyOf 2)stringAlternativeOne of:
footerJSONOptional
footer (anyOf 1)stringAlternativeMaximum length: 5000
footer (anyOf 2)stringAlternativeOne of:
issuerobjectOptional
issuer.accountstringOptional
issuer.typestringRequired within parentOne of: account, self

SDK function policy ID: stripe.postsubscriptionschedulesschedule. Catalog operation: PostSubscriptionSchedulesSchedule. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"Stripe-Version": "2026-09-30.endive"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.