Skip to navigation

Change Prepaid Renewal Behavior

View as Markdown

Sets a prepaid subscription’s renewal_behavior to autorenew, cancel or downgrade. See Managing Prepaid Renewal Behaviors for what each one does.

Returns 400 when the merchant doesn’t have prepaid subscriptions enabled, the subscription isn’t prepaid or isn’t live, or renewal_behavior is missing or invalid. If prepaid_orders_remaining is 0, cancel cancels the subscription and downgrade converts it to pay-as-you-go right away.

Authentication

x-api-keystring

Application API Scope — server-to-server, sent in the x-api-key header. See Authentication.

OR
authorizationstring

Storefront API Scope — client-side, scoped to one customer, sent as a signature in the authorization header. See Authentication.

Path parameters

subscription_idstringRequired
Unique subscription ID

Request

This endpoint expects an object.
renewal_behaviorenumRequired
Allowed values:

Response

200
customerstringOptional
merchantstringOptional
productstringOptional
paymentstringOptional
shipping_addressstringOptional
offerstringOptional
subscription_typestringOptional
raw_subscription_typestringOptional
componentslist of objectsOptional
extra_dataobjectOptional
public_idstringOptional
quantityintegerOptionalDefaults to 0
pricestring or nullOptional
frequency_daysintegerOptionalDefaults to 0
reminder_daysintegerOptionalDefaults to 0
everyintegerOptionalDefaults to 0
every_periodintegerOptionalDefaults to 0
start_datestringOptional
cancelledstring or nullOptional
cancel_reasonstring or nullOptional
iterationanyOptional
sequenceanyOptional
session_idstringOptional
merchant_order_idstringOptional
createdstringOptional
updatedstringOptional
livebooleanOptionalDefaults to true
external_idstringOptional
product_attributeanyOptional
cancel_reason_codeinteger or nullOptional
customer_repinteger or nullOptional
clubanyOptional
queued_actionslist of objectsOptional
prepaid_subscription_contextobjectOptional

Errors

400
Bad Request Error