Update the subscription

Updates an existing subscription to change the associated product and plan. Updating the subscription may modify the price of the subscription, and if so the balance will be billed immediately at a pro-rated amount. Parameters specific to the vendor may be specified to change the payment method for the subscription. Changing to a plan with a different billing frequency from the existing subscription is not supported for some payment providers (Braintree).

SecurityCookieBlaizeSession or JwtQuery or JwtHeaderXBlaizeJwt or JwtHeaderXZephrJwt or JwtBearer or JwtCookie
Request
header Parameters
cookie
string

The session cookie.

Example: `blaize_session=...` (string)
Request Body schema: application/json
product_id
required
string

Product Id/slug

plan_id
required
string

Plan Id/slug

required
object

Parameters specific to the payment provider in use

navigated_from
string

Specify where the request was made from. Used as data to pass to change subscription webhooks.

Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

patch/zephr/subscriptions/:subscriptionId
Request samples
application/json
{
  • "product_id": "premium-access-monthly-recurring",
  • "plan_id": "plan-5",
  • "vendor_fields": {
    },
  • "navigated_from": "/some/path"
}
Response samples
application/json
{
  • "grant_id": "33d576c7-d036-40e7-8141-8a91998a5c79"
}