Skip to main content
PATCH
Update a subscription recast

Authorizations

X-SALESBRICKS-KEY
string
header
required

API key for authentication

Path Parameters

order_id
string
required
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
subscription_id
string
required
Pattern: ^([a-zA-Z\d\-]+)$

Body

Subscription input serializer for recast PATCH operations. Excludes immutable fields: starts_at, currency.

  • starts_at: Defaults to current date when recast is created and cannot be changed
  • currency: Must remain the same as the original subscription
contract_length
integer

The length of the contract in months. Required unless phases is provided, in which case it is the sum of the phase lengths.

Required range: x >= 1
billing_frequency
enum<string>

The billing frequency. Required unless phases is provided, in which case each phase declares its own billing_frequency.

  • MONTHLY - Monthly
  • QUARTERLY - Quarterly
  • SEMI_ANNUALLY - Semi-annually
  • ANNUALLY - Annually
  • ALL_UPFRONT - All upfront
Available options:
MONTHLY,
QUARTERLY,
SEMI_ANNUALLY,
ANNUALLY,
ALL_UPFRONT
plan_id
string<uuid>

The ID of the plan. Required unless every phase declares its own plan_id — it is the plan for any phase that does not.

bricks
object[]

The bricks included in the subscription. Required unless phases is provided, in which case every brick comes from the phases.

discount_coupons
string[]

Discount coupon codes to apply to the subscription. Currently only supports one discount coupon - only the first one in the list will be applied.

phases
object[] | null

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.

point_of_contact_id
string<uuid>

The ID of the point of contact (Person) object

signatory_user_id
string<uuid>

The ID of the signatory user (Person) object

auto_renews
boolean

Whether the subscription auto-renews. Defaults to true.

accounts_payable_emails
string<email>[]

List of email addresses for accounts payable contacts

customer_id
string<uuid>

The ID of the customer

payment_terms
integer

The number of days from an invoice being generated that the buyer is expected to pay in

Required range: 0 <= x <= 999
renewal_contract_period
integer | null

The contract period for renewals in months. If null, inherits from initial contract period.

Required range: x >= 1
renewal_uplifted_rate
string<decimal> | null

The percentage rate to uplift renewal pricing. If null, no uplift is applied.

Pattern: ^-?\d{0,3}(?:\.\d{0,2})?$
transaction_method
enum<string>

The medium by which the order is agreed.

  • ORDER_FORM - Order form
  • STRIPE - Stripe
Available options:
ORDER_FORM,
STRIPE
metadata
any | null

Optional metadata to add to the subscription. Sending an empty map will delete all keys. Keys prefixed with _ are private and will be ignored.

custom_order_form_html
string

The custom order form html to use with <html><body>...</body></html> formatting

accepted_payment_methods_config
object | null

Configuration for accepted payment methods during checkout and paywall

first_charge_date
enum<string>

When the first invoice should be charged. If not provided, defaults to seller's first_charge_date setting, or CHECKOUT_DATE if seller has no setting.

  • CONTRACT_START_DATE - Contract Start Date
  • CHECKOUT_DATE - Checkout Date
Available options:
CONTRACT_START_DATE,
CHECKOUT_DATE
purchase_order
object | null

Purchase order for the subscription. Applies to every invoice generated for it, unless an invoice carries its own override. Omit or pass null for no change; pass an empty object or an empty code to clear.

Optional ID of the legal entity that issues this subscription. Falls back to the seller's default legal entity when omitted.

adjustment_credit
integer | null

Credit that will be applied against future invoices. Send null to clear a manual override and re-enable auto-calculation.

adjustment_credit_label
string | null

The label for the adjustment credit. Defaults to 'Adjustment credit'

Response

subscription_id
string