POST /v1/subscription_schedules/{schedule}

Updates an existing subscription schedule.

Servers

Path parameters

Name Type Required Description
schedule String Yes

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
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"
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. Note that past phases can be omitted.

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[].on_behalf_of String No
phases[].default_payment_method String No
phases[].iterations Integer No
phases[].trial Boolean No
phases[].start_date No
phases[].default_tax_rates No
phases[].end_date No
phases[].billing_thresholds No
phases[].billing_cycle_anchor String No

Possible values:

  • "phase_start"
  • "automatic"
phases[].trial_end 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"
proration_behavior String No

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

Possible values:

  • "create_prorations"
  • "always_invoice"
  • "none"
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"

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.