POST /v1/subscription_schedules

Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

Request body fields

Name Type Required Description
customer String No

The identifier of the customer to create the subscription schedule for.

end_behavior String No

Behavior 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.

Possible values:

  • "cancel"
  • "release"
  • "renew"
  • "none"
start_date No

When the subscription schedule starts. We recommend using now so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.

expand[] Array No

Specifies which fields in the response should be expanded.

metadata No

Set of key-value pairs 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.

phases[] Array No

List 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.

phases[].add_invoice_items[] Array No
phases[].add_invoice_items[].discounts[] Array No
phases[].add_invoice_items[].discounts[].promotion_code String No
phases[].add_invoice_items[].discounts[].coupon String No
phases[].add_invoice_items[].discounts[].discount String No
phases[].add_invoice_items[].price String No
phases[].add_invoice_items[].tax_rates No
phases[].add_invoice_items[].price_data Object No
phases[].add_invoice_items[].price_data.unit_amount Integer No
phases[].add_invoice_items[].price_data.unit_amount_decimal String No
phases[].add_invoice_items[].price_data.product String Yes
phases[].add_invoice_items[].price_data.tax_behavior String No

Possible values:

  • "inclusive"
  • "unspecified"
  • "exclusive"
phases[].add_invoice_items[].price_data.currency String Yes
phases[].add_invoice_items[].quantity Integer No
phases[].application_fee_percent Number No
phases[].discounts No
phases[].description No
phases[].automatic_tax Object No
phases[].automatic_tax.enabled Boolean Yes
phases[].automatic_tax.liability Object No
phases[].automatic_tax.liability.account String No
phases[].automatic_tax.liability.type String Yes

Possible values:

  • "account"
  • "self"
phases[].items[] Array Yes
phases[].items[].discounts No
phases[].items[].price String No
phases[].items[].tax_rates No
phases[].items[].billing_thresholds No
phases[].items[].price_data Object No
phases[].items[].price_data.unit_amount Integer No
phases[].items[].price_data.unit_amount_decimal String No
phases[].items[].price_data.product String Yes
phases[].items[].price_data.recurring Object Yes
phases[].items[].price_data.recurring.interval String Yes

Possible values:

  • "month"
  • "day"
  • "week"
  • "year"
phases[].items[].price_data.recurring.interval_count Integer No
phases[].items[].price_data.tax_behavior String No

Possible values:

  • "inclusive"
  • "unspecified"
  • "exclusive"
phases[].items[].price_data.currency String Yes
phases[].items[].quantity Integer No
phases[].items[].metadata Object No
phases[].metadata Object No
phases[].proration_behavior String No

Possible values:

  • "create_prorations"
  • "always_invoice"
  • "none"
phases[].collection_method String No

Possible values:

  • "send_invoice"
  • "charge_automatically"
phases[].currency String No
phases[].on_behalf_of String No
phases[].default_payment_method String No
phases[].iterations Integer No
phases[].trial Boolean No
phases[].default_tax_rates No
phases[].end_date Integer No
phases[].billing_thresholds No
phases[].billing_cycle_anchor String No

Possible values:

  • "phase_start"
  • "automatic"
phases[].trial_end Integer No
phases[].transfer_data Object No
phases[].transfer_data.destination String Yes
phases[].transfer_data.amount_percent Number No
phases[].invoice_settings Object No
phases[].invoice_settings.days_until_due Integer No
phases[].invoice_settings.account_tax_ids No
phases[].invoice_settings.issuer Object No
phases[].invoice_settings.issuer.account String No
phases[].invoice_settings.issuer.type String Yes

Possible values:

  • "account"
  • "self"
default_settings Object No

Object representing the subscription schedule's default settings.

default_settings.on_behalf_of No
default_settings.application_fee_percent Number No
default_settings.default_payment_method String No
default_settings.description No
default_settings.billing_thresholds No
default_settings.automatic_tax Object No
default_settings.automatic_tax.enabled Boolean Yes
default_settings.automatic_tax.liability Object No
default_settings.automatic_tax.liability.account String No
default_settings.automatic_tax.liability.type String Yes

Possible values:

  • "account"
  • "self"
default_settings.billing_cycle_anchor String No

Possible values:

  • "phase_start"
  • "automatic"
default_settings.collection_method String No

Possible values:

  • "send_invoice"
  • "charge_automatically"
default_settings.transfer_data No
default_settings.invoice_settings Object No
default_settings.invoice_settings.days_until_due Integer No
default_settings.invoice_settings.account_tax_ids No
default_settings.invoice_settings.issuer Object No
default_settings.invoice_settings.issuer.account String No
default_settings.invoice_settings.issuer.type String Yes

Possible values:

  • "account"
  • "self"
from_subscription String No

Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls.

billing_mode Object No

Controls how prorations and invoices for subscriptions are calculated and orchestrated.

billing_mode.type String Yes

Possible values:

  • "flexible"
  • "classic"

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.