Subscriptions

Update subscription

Use when changing subscription details (e.g. quantity, billing anchor, or parent). Supports partial update; send "" to clear parent_subscription_id.

put/subscriptions/{id}

Path parameters

idstring required

Subscription ID

Request body

cancel_atstring date-time
cancel_at_period_endboolean
parent_subscription_idstring

ParentSubscriptionID sets or clears the parent subscription. Omit to leave unchanged; send "" to clear.

status'active' | 'paused' | 'cancelled' | 'incomplete' | 'trialing' | 'draft'

Response

OK

active_pause_idstring

ActivePauseID references the current active pause configuration This will be null if no pause is active or scheduled

auto_invoice_thresholdstring

AutoInvoiceThreshold is the usage amount (in subscription currency) that triggers an intermediate invoice. Overrides the plan-level threshold when set. Nil means: inherit from the plan's threshold (which may also be nil = disabled).

billing_anchorstring date-time

BillingAnchor is the reference point that aligns future billing cycle dates. It sets the day of week for week intervals, the day of month for month and year intervals, and the month of year for year intervals. The timestamp is in UTC format.

billing_cadence'RECURRING'
billing_cycle'anniversary' | 'calendar'
billing_period'MONTHLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY' | 'QUARTERLY' | 'HALF_YEARLY' | 'ONETIME'
billing_period_countinteger

BillingPeriodCount is the total number units of the billing period.

cancel_atstring date-time

CancelAt is the date the subscription will be canceled

cancel_at_period_endboolean

CancelAtPeriodEnd is whether the subscription was canceled at the end of the current period

cancelled_atstring date-time

CanceledAt is the date the subscription was canceled

collection_methodstring

CollectionMethod determines how invoices are collected

commitment_amountstring

CommitmentAmount is the minimum amount a customer commits to paying for a billing period

commitment_duration'MONTHLY' | 'ANNUAL' | 'WEEKLY' | 'DAILY' | 'QUARTERLY' | 'HALF_YEARLY' | 'ONETIME'
created_atstring date-time
created_bystring
currencystring

Currency is the currency of the subscription in lowercase 3 digit ISO codes

current_period_endstring date-time

CurrentPeriodEnd is the end of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.

current_period_startstring date-time

CurrentPeriodStart is the end of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.

customer_idstring

CustomerID is the identifier for the customer in our system

enable_true_upboolean
end_datestring date-time

EndDate is the end date of the subscription

environment_idstring

EnvironmentID is the environment identifier for the subscription

gateway_payment_method_idstring

GatewayPaymentMethodID is the gateway payment method ID for this subscription

idstring

ID is the unique identifier for the subscription

invoicing_customer_idstring

InvoicingCustomerID is the customer ID to use for invoicing This can differ from the subscription customer (e.g., parent company invoicing for child company)

lookup_keystring

LookupKey is the key used to lookup the subscription in our system

metadataTypesMetadata
overage_factorstring

OverageFactor is a multiplier applied to usage beyond the commitment amount

parent_subscription_idstring

ParentSubscriptionID is the parent subscription ID for hierarchy (e.g. child subscription under a parent)

pause_status'none' | 'active' | 'scheduled' | 'completed' | 'cancelled'
payment_behaviorstring

PaymentBehavior determines how subscription payments are handled

payment_terms'15 NET' | '30 NET' | '45 NET' | '60 NET' | '75 NET' | '90 NET'
plan_idstring

PlanID is the identifier for the plan in our system

proration_behavior'create_prorations' | 'none'
start_datestring date-time

StartDate is the start date of the subscription

status'published' | 'deleted' | 'archived'
subscription_status'active' | 'paused' | 'cancelled' | 'incomplete' | 'trialing' | 'draft'
subscription_type'standalone' | 'delegated_invoicing' | 'parent' | 'inherited' | 'grouped_invoicing'
synced_price_sequenceinteger

SyncedPriceSequence is the plan-price sequence up to which this subscription's line items have been reconciled. Bumped by the plan-price sync after a successful pass.

tenant_idstring
timezonestring
trial_endstring date-time

TrialEnd is the end date of the trial period

trial_startstring date-time

TrialStart is the start date of the trial period

updated_atstring date-time
updated_bystring
versioninteger

Version is used for optimistic locking

Changes

Changed in 7 of the 12 revisions of this API.12125

  • cef2964c102c18See the full diff
    • removed the optional property customer_timezone from the response with the 200 status

      response-optional-property-removed

    • added the optional property coupon_associations/items/coupon/coupon_code to the response with the 200 status

      response-optional-property-added

    • added the optional property coupon_associations/items/subscription_line_item to the response with the 200 status

      response-optional-property-added

    • added the optional property customer/integrations/items/metadata to the response with the 200 status

      response-optional-property-added

    • added the optional property customer/timezone to the response with the 200 status

      response-optional-property-added

    • added the optional property line_items/items/commitment_time_buckets to the response with the 200 status

      response-optional-property-added

    • added the optional property line_items/items/price/sequence to the response with the 200 status

      response-optional-property-added

    • added the optional property synced_price_sequence to the response with the 200 status

      response-optional-property-added

    • added the optional property timezone to the response with the 200 status

      response-optional-property-added

    • removed the optional property details from the response with the 400 status

      response-optional-property-removed

    • removed the optional property details from the response with the 500 status

      response-optional-property-removed

    • added the new too_many_requests enum value to the code response property for the response status 400

      response-property-enum-value-added

    • added the new too_many_requests enum value to the code response property for the response status 500

      response-property-enum-value-added

    This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 0cb3425d658084See the full diff
    • removed the optional property line_items/items/trial_period_days from the response with the 200 status

      response-optional-property-removed

    • added the new ONETIME enum value to the billing_period response property for the response status 200

      response-property-enum-value-added

    • added the new ONETIME enum value to the commitment_duration response property for the response status 200

      response-property-enum-value-added

    • added the new ONETIME enum value to the line_items/items/billing_period response property for the response status 200

      response-property-enum-value-added

    • added the new ONETIME enum value to the line_items/items/commitment_duration response property for the response status 200

      response-property-enum-value-added

    • added the new ONETIME enum value to the line_items/items/price/billing_period response property for the response status 200

      response-property-enum-value-added

    • added the new delegated_invoicing enum value to the subscription_type response property for the response status 200

      response-property-enum-value-added

    • added the new grouped_invoicing enum value to the subscription_type response property for the response status 200

      response-property-enum-value-added

    • added the optional property auto_invoice_threshold to the response with the 200 status

      response-optional-property-added

    • added the optional property line_items/items/addon_association_id to the response with the 200 status

      response-optional-property-added

    • removed the ONETIME enum value from the billing_cadence response property for the response status 200

      response-property-enum-value-removed

    • removed the ONETIME enum value from the line_items/items/price/billing_cadence response property for the response status 200

      response-property-enum-value-removed

    This revision also has 6 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 82f205e0f42922See the full diff
    • removed the optional property line_items/items/price/trial_period from the response with the 200 status

      response-optional-property-removed

    • removed the optional property line_items/items/trial_period from the response with the 200 status

      response-optional-property-removed

    • added the optional property line_items/items/price/trial_period_days to the response with the 200 status

      response-optional-property-added

    • added the optional property line_items/items/trial_period_days to the response with the 200 status

      response-optional-property-added

    • removed the optional property customer/parent_customer from the response with the 200 status

      response-optional-property-removed

    • removed the optional property customer/parent_customer_id from the response with the 200 status

      response-optional-property-removed

    • removed the optional property error from the response with the 400 status

      response-optional-property-removed

    • removed the optional property error from the response with the 500 status

      response-optional-property-removed

    • removed the optional property success from the response with the 400 status

      response-optional-property-removed

    • removed the optional property success from the response with the 500 status

      response-optional-property-removed

    • added the optional property code to the response with the 400 status

      response-optional-property-added

    • added the optional property code to the response with the 500 status

      response-optional-property-added

    • added the optional property details to the response with the 400 status

      response-optional-property-added

    • added the optional property details to the response with the 500 status

      response-optional-property-added

    • added the optional property http_status_code to the response with the 400 status

      response-optional-property-added

    • added the optional property http_status_code to the response with the 500 status

      response-optional-property-added

    • added the optional property message to the response with the 400 status

      response-optional-property-added

    • added the optional property message to the response with the 500 status

      response-optional-property-added

    • added the optional property subscription_type to the response with the 200 status

      response-optional-property-added

    This revision also has 7 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • the cancel_at request property type/format changed from string/ to string/date-time

      request-property-type-changed

    • added the optional property customer/integrations to the response with the 200 status

      response-optional-property-added

    This revision also has 223 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • endpoint added

      endpoint-added

    This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog