put

PUT /v2/ecommerceSubscriptions/{id} — Update subscription

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Updates mutable fields on an existing subscription: the product variations it bills, its billing schedule, its status, address/billing details, and total amount. Only the fields you include in the request body are changed; omitted fields are left as-is.

Changes to productVariations and schedule take effect on the next renewal. The renewal worker reads the subscription's current productVariations and schedule fresh each time a renewal is generated, so an update made between cycles is applied automatically to the next order — no manual intervention is required. Updating a subscription does not charge the customer; payment is only collected when a renewal order is created.

Request body

All fields are optional. Send only the fields you want to change.

FieldTypeDescription
productVariationsarrayReplaces the subscription's entire set of product variations with the array provided. See Product variations below.
scheduleobjectUpdates the billing cadence and/or dates. See Schedule below.
statusstringNew status. One of active, on-hold, cancelled, expired, pending, pending-cancel. To pause/resume/cancel, prefer the dedicated actions/pause, actions/resume, and cancel endpoints, which enforce valid transitions.
totalAmountnumberOverrides the recurring charge amount. If omitted while productVariations is provided, the total is recalculated automatically from the variations (see Pricing).
addressobjectNew address. Provide either address or billingDetails/shippingDetails.
billingDetailsobjectBilling address details.
shippingDetailsobjectShipping address details.

Product variations

productVariations is a full replacement — the array you send becomes the subscription's complete new set of variations. To switch a subscription from one variation to another, send a single-element array containing the new variation.

Each element:

FieldTypeRequiredDescription
variationIdstringYesThe id of an ecommerce product variation (e.g. epvt::…). Retrieve available variations via GET /ecommerceProductVariations.
quantitynumberNoDefaults to 1.
pricePerUnitOverridenumberNoOverrides the variation's catalog price for this subscription. If omitted, the variation's regularPrice is used when the total is recalculated.

Schedule

FieldTypeDescription
intervalstringBilling cadence unit: day, week, month, or year. Defaults to month.
intervalCountnumberNumber of interval units between renewals. Defaults to 1 (e.g. interval: month, intervalCount: 3 = quarterly).
startDatestring (ISO 8601)Anchor date the cadence is calculated from.
endDatestring (ISO 8601) or nullWhen the subscription should stop. Must be after the next payment date, or the request is rejected. Send null for no end date.
billingCycleLengthnumberNumber of billing cycles before the subscription ends automatically. 0 (default) means open-ended.

The nextPayment date is derived from these fields; you don't set it directly here. To move only the next renewal date without changing cadence, use PUT /v2/ecommerceSubscriptions/{id}/actions/setRenewalDate.

Pricing

When you send productVariations without a totalAmount, the recurring total is recalculated as the sum of pricePerUnitOverride (falling back to the variation's regularPrice) × quantity across all variations. Send an explicit totalAmount to override this.

Common pattern: switching a plan across billing cycles

Because variation changes apply to the next renewal, your system can move a subscription through a pricing progression — for example an introductory variation for the first cycle, a standard variation for subsequent cycles, and later a bundle variation — entirely through this endpoint, without manual intervention.

Switch from an intro variation to the standard variation before the next renewal:

{
  "productVariations": [
    { "variationId": "epvt::sema-month-2plus", "quantity": 1 }
  ]
}

The next renewal order will bill the standard variation. Repeat as needed for later cycles.

Switch to a bundle that also changes billing cadence (e.g. monthly → quarterly):

{
  "productVariations": [
    { "variationId": "epvt::sema-quarterly-bundle", "quantity": 1 }
  ],
  "schedule": {
    "interval": "month",
    "intervalCount": 3
  }
}

If you need the cadence change to take effect from a specific date, follow up with setRenewalDate to align the next renewal.

Response 200

{
  "success": true,
  "message": "Subscription updated successfully",
  "data": {
    "id": "esub::123"
  }
}

To read back the applied product variations and schedule, call GET /v2/ecommerceSubscriptions/{id}.

Errors

StatusCodeDescription
422INVALID_FIELDschedule.endDate is not after the next payment date
404Subscription not found for this affiliate

Required role

Affiliate token required. The subscription must belong to the authenticated affiliate.

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here!