Update a Subscription

PUT /subscriptionsplans/v1/subscriptions/subscription_id

You can update an existing subscription as you require, with some limitations.

  • You can modify a subscription provided it has the status of ACTIVE, SUSPENDED, or PAST_DUE.
  • You cannot modify a subscription if it has the status of CANCELLED or EXPIRED.

See the status row in this table for a description of the statuses.

The following elements are required when updating a subscription with a PUT request:

  • merchantRefNum
  • accountId
  • paymentToken
  • itemQuantity
  • startDate

However, only the following subscription elements can be updated with a PUT request:

  • accountId
  • paymentToken
  • paymentDescriptor
  • itemQuantity – The change takes effect on the next billing cycle. For example, if a subscription is billed at the first day of the cycle and this value is changed in the middle of the current cycle, it will take effect on the next payment, since that is at the first day of the next cycle.
  • startDate – If a billing cycle has already started (the current start date is in the past) this cannot be changed.
  • endDate
  • status – You can change the status to CANCELLED or SUSPENDED only.
  • reasonForCancellation – This can be specified only when the status is being changed to CANCELLED.

Any nullable element that is part of an existing subscription but that is not included in the update PUT request will be set either to null or to the default value if it has one.

To update a subscription, you must initiate a PUT request to the subscriptions endpoint.

Before trying the example, you should:

  • Replace the subscription ID (382d5b82-5e3f-40b7-a36d-eb982116c2b3) with the id you received in the response to your subscription creation request.
  • Replace the API key (after the -u) with the Test API key you have received.

For a description of the elements in the request and response for this example, see Create a Subscription.

For a complete list and description of the elements and values associated with a subscription, consult the subscription creation API request.

Did you find this page useful?