Update Subscription
PUT/subscriptions/:id
Updates the configuration of an existing subscription.
Modifiable Parameters:
- Billing information (priceId, amount, interval, intervalCount, description, allowedPaymentMethods)
- Customer details (contact information, billing/shipping addresses)
- Subscription settings (cancelAtPeriodEnd, pauseAtPeriodEnd, skipIntervalCount)
- Metadata (for your internal tracking)
Update Effects:
- Amount changes apply to the next billing cycle
- Interval changes apply from the next period, leaving the current one to run out
- Setting
prorateto true settles the price difference immediately instead, and an interval change then restarts the billing period from now nextPaymentAtmoves the next charge date on its own, leaving the price alone. Withprorateit also settles the time that moves: later charges for it, earlier refunds it- Customer information updates take effect immediately
- Setting
cancelAtPeriodEndto true will end the subscription after the current period - Setting
pauseAtPeriodEndto true will pause billing after the current period - Setting
skipIntervalCountskips billing for the specified number of intervals without changing subscription status
Switching price:
- A new
priceIdreplacesamount,intervalandintervalCountwith the price's values. The price must be active and in the subscription's currency - On a
PENDINGsubscription the switch also replaces the trial with the price's trial - The switch follows the same rules as a manual change: it applies from the next period, or
settles at once with
prorate - Without
priceId, changingamount,intervalorintervalCountremovespriceIdandproductId
Note: The currency cannot be changed once a subscription is created. To change it, cancel the subscription and create a new one.
Request
Responses
- 200
- 400
- 401
- 404
- 422
- 500
- 503
A subscription object
The request is incorrect or could not be processed
Unauthorized error. Please check your auth credentials
The specified resource was not found
The request was well-formed but could not be processed due to semantic errors
Unexpected server error
The service is temporarily unavailable
¿Te ha resultado útil esta página?