v1

latestOpenAPI 3.0.02026-08-0610682246.0 KB
Payments

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).

patch/zephr/subscriptions/:subscriptionId

Headers

cookiestring

The session cookie.

Request body

product_idstring required

Product Id/slug

plan_idstring required

Plan Id/slug

navigated_fromstring

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

Example request

{
  "product_id": "premium-access-monthly-recurring",
  "plan_id": "plan-5",
  "vendor_fields": {
    "payment_nonce": "eyJ2ZXmsaW5nQWdyZWmVubW8iOiJvZmYifQ=="
  },
  "navigated_from": "/some/path"
}

Response

OK

grant_idstring

New grant of product bundle to user.

Example response

{
  "grant_id": "33d576c7-d036-40e7-8141-8a91998a5c79"
}