API Reference

Update a subscription by id

Updates current term ends date of a subscription with the specified id

Here are the enums that are contained in the answer:

namevalue
statusFuture, InTrial, Active, NonRenewing, Paused, Cancel, Deleted, PendingPayment
billingCyclesForever, Fixed
discounts[type]FixedAmount, Percentage
discounts[applyOn]InvoiceAmount, SpecificItemPrice
discounts[durationType]OneTime, Forever
items[status]Active
items[chargeOnEvent]SubscriptionCreation, SubscriptionActivation, Immediately

Error codes:

NotFoundA subscription with such an Id cannot be found
PlanItemPriceNotFoundThere is no plan with any of ids specified in “items” array
ItemPricesNotFoundsome of ids in “items” array belong to product family item prices that cannot be found, or “discounts” array contains product family item prices that are not listed in “items” array
ItemPricesHasDifferentPricingModelpricing model of some of the product family item prices is different from the pricing model specified in the request
Path Params
string
required
Defaults to your-site-name-1

Name of your project

string
required

Subscription id

Body Params
date-time

The date when the subscription must start

string
required

Can be Fixed or Forever

int32

Count billing Cycles. Required when billingCycles is Fixed

string

Optional, on/off, default=off

string

Obsolete. Use "autoCollection" parameter instead.

string

A customer-facing note added to all invoices associated with this subscription. This note is one among all the notes displayed on the invoice PDF

metadata
object

Key-value pairs of some additional information about the subscription

int32

How many days before billing period end should be left to generate invoice

daysNotifyAboutUnpaidInvoice
array of int32s

How many days before invoice due date should be left to send a reminder about the invoice to the customer. There can be a few reminders sent

daysNotifyAboutUnpaidInvoice
newDiscounts
array of objects

new Discounts for subscription items

newDiscounts
items
array of objects
required

Array of item prices which are applied to the subscription

items*
addOneTimeCharges
array of objects
addOneTimeCharges
deletedDiscountIds
array of strings

Discounts that have been removed

deletedDiscountIds
string

Change options (Obsolete)

applyOptions
object

The options describe how to change the subscription. Describes when to apply changes, how to issue a corrective invoice and how to issue credit notes

Responses

Language
Credentials
:
Choose an example:
application/json