Update subscription

Update an existing subscription.

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

Overview

Update an existing subscription. You can modify various attributes like metadata, shipping address, or auto-renewal settings. When plan_id is provided, the subscription is changed to the new plan with proration.

Example: Update a subscription's shipping address when a customer moves to a new location. Or change from a Monthly to an Annual plan with prorated billing.


Conditional Requirements

ConditionRequired Fields
collection_method=charge_automaticallysource_id
plan_id is set (plan change)proration_behavior, payment_behavior, billing_cycle_anchor auto-default if not provided
end_date is setMust be a Unix timestamp >= current period end
auto_renew is setCannot also set plan_id in the same request
plan_id + address_id when taxes enabledNot allowed — update address and plan separately
Subscription is scheduledCannot be updated
Subscription has pending paymentCannot be updated

Webhooks

All updates trigger the subscription.updated webhook event.

Plan changes additionally trigger the subscription.changed webhook event.

Path Params
int32
required

The unique identifier of the subscription.

Query Params
int32
required

The unique identifier your site.

Body Params
int32

Shipments remaining to update the current one

boolean

A boolean that determines whether the subscription will auto-renew or not at the end of the last phase. (overrides the plan configuration when set)

metadata
object

Set of key-value pairs that can be saved on subscription level. This can be useful for storing additional information about the object in a structured format.

ip_addresses
array of strings

IP addresses that will identify end-users as members of this subscription upon registration/login. This attribute can only be set when the subscription plan type is membership. Two format are accepted for strings:

A single public IP address
This should be a valid public IP address following the standard IPv4 format (e.g., 192.168.1.100).

A range of public IP addresses
This should be a range of public IP addresses following the CIDR notation (e.g., 198.51.100.0/24).

You can use this tool calculate the appropriate CIDR notation for your needs.

ip_addresses
domains
array of strings

Email domains that will allow end-users with these domains to be members of this subscription upon registration/login. It can only be sent when the subscription plan type is membership.

domains
int32

A valid Unix timestamp in the future represents the exact day to which the subscription will be extended. Note: While you can set an exact Unix timestamp, the end_date will be rounded to the end of that specified day (23:59:59 in UTC). Please note you may only change the end date to a time after the current period end.

string
enum

The payment collection method of subscription.

Allowed:
int32
boolean

A boolean that determines whether subscription is imported.

int32

The unique identifier of the payment method. Must be in a chargeable state. Required if collection_method is set to charge_automatically.

integer

Shipping address ID. Cannot be updated together with plan_id when taxes are enabled.

integer

Target plan ID to change to. Cannot be used with auto_renew. Cannot downgrade to a lower-priced plan.

integer | null
≥ 0

Vendor tip amount. Minimum 0.

string | null
enum

Proration behavior when changing plan. Default: always_invoice. Only applicable when plan_id is set.

Allowed:
string | null
enum

Payment behavior for plan change. Default: allow_incomplete. Only applicable when plan_id is set.

Allowed:
string | null

Billing cycle anchor for plan change. Values: unchanged (default), automatic, now, or a Unix timestamp. Only applicable when plan_id is set.

Headers
string
required
Defaults to Bearer eyJ***
Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json