Subscriptions

Add addon to subscription

Changed on

Deprecated: use POST /subscriptions/{id}/modify/execute with type "addon" and action "add", which also supports previewing the proration charge first. Use when adding an optional product or add-on to an existing subscription (e.g. extra storage or support tier).

post/subscriptions/addon

Request

  • Base URL
    https://us.api.flexprice.io/v1
  • URL
    https://us.api.flexprice.io/v1/subscriptions/addon
  • Auth
    API key in header x-api-key

Request body

addon_idstring required
cadence'onetime' | 'recurring'
change_at'immediate' | 'end_of_period'
line_item_commitmentsobject

LineItemCommitments allows setting commitment configuration per addon line item (keyed by price_id)

metadataobject
proration_behavior'create_prorations' | 'none'
start_datestring date-time
subscription_idstring required

Response

OK

addon_idstring
addon_status'active' | 'cancelled' | 'pending'
cancellation_reasonstring
cancelled_atstring date-time
created_atstring date-time
created_bystring
end_datestring date-time
entity_idstring
entity_type'subscription' | 'plan' | 'addon'
environment_idstring
idstring
metadataobject
start_datestring date-time
status'published' | 'deleted' | 'archived'
synced_price_sequenceinteger

SyncedPriceSequence is the addon price sequence this association's line items have been reconciled up to. Written only by the addon usage-price sync.

tenant_idstring
updated_atstring date-time
updated_bystring

Changes