Create a subscription recast
Creates a subscription recast which can be used to replace the terms, dates, and/or entitlements of a customer’s current contract. It essentially scraps the existing agreement and creates a completely new one. Estimate the pricing for the newly created recast order using the /subscriptions/{subscription_id}/recast/{order_id}/estimate endpoint, or start it using /subscriptions/{subscription_id}/recast/{order_id}/start.
How bricks affects existing discounts:
Per-brick discounts are replaced, not merged. The discount sent on a brick becomes that brick’s complete set of discounts for this order, and a brick sent without a discount ends up with none — any discount it previously carried is dropped.
This applies to every brick in the payload, not only the ones being changed. A brick included solely to keep it on the order still needs its discount resent, or it loses it.
Read the current values from the subscription’s line items — discount is returned there in the same shape this endpoint accepts — and send them back for every brick whose discount should carry over.
Authorizations
API key for authentication
Path Parameters
^([a-zA-Z\d\-]+)$Body
- SubscriptionInputRecastSinglePhase
- SubscriptionInputRecastMultiPhase
Subscription recast input serializer; similar to SubscriptionInputUpgradeSerializer but with adjustment credits.
This payload has two forms — see anyOf:
- Single-phase — omit
phases; the order-levelstarts_at,contract_length,billing_frequencyandbricksdefine the one phase and are required. - Multi-phase — send
phases; the phases own the timeline, billing frequency and bricks, and the order-level equivalents become optional (omitted, they are derived from the phases).
The fields are declared optional because OpenAPI 3.0 cannot make one field's required depend on another. Sending neither form is a 400.
The start date of the subscription. Required unless phases is provided, in which case phase 0's start date is used.
The length of the contract in months. Required unless phases is provided, in which case it is the sum of the phase lengths.
x >= 1The billing frequency. Required unless phases is provided, in which case each phase declares its own billing_frequency.
MONTHLY- MonthlyQUARTERLY- QuarterlySEMI_ANNUALLY- Semi-annuallyANNUALLY- AnnuallyALL_UPFRONT- All upfront
MONTHLY, QUARTERLY, SEMI_ANNUALLY, ANNUALLY, ALL_UPFRONT The bricks included in subscription recast. Quantity is used to update the add-on quantity (ie. adding 2 more units should be quantity 2 -> quantity 4). For usage, quantity is used to set the pre-commitment (ie. previously having 5 pre-commitment quantity and updating it to 10 would update the pre-commitment quantity to 10.) Required unless phases is provided.
Credit that will be applied against future invoices. Send null to clear a manual override and re-enable auto-calculation.
The label for the adjustment credit. Defaults to 'Adjustment credit'
Optional plan id to switch plans, otherwise it will use the base order's latest plan version.
Discount coupon codes to apply to the subscription. Currently only supports one discount coupon - only the first one in the list will be applied.
Optional list of phases for multi-phase orders. When provided, ALL phases come from this array (first element = phase 0, second = phase 1, etc.) and starts_at, contract_length, billing_frequency and bricks become optional — omit them and they are derived from the phases. plan_id is still required, and every brick in every phase must belong to it. When absent, the order-level fields define a single phase.
The number of days from an invoice being generated that the buyer is expected to pay in
0 <= x <= 999The medium by which the order is agreed.
ORDER_FORM- Order formSTRIPE- Stripe
ORDER_FORM, STRIPE The custom order form html to use with <html><body>...</body></html> formatting
Optional metadata to add to the subscription. Sending an empty map will delete all keys. Keys prefixed with _ are private and will be ignored.
Response
Serializer for individual subscription order
Unique identifier for the order
Total contract value with currency
URL to download signed order form PDF
TRIAL- TrialSTANDARD- New BusinessRENEWAL- RenewalUPGRADE- UpgradeRECAST- Recast
TRIAL, STANDARD, RENEWAL, UPGRADE, RECAST