Changing a Subscriber's Plan

This tutorial explains how you can change a subscription’s product in the Lemon Squeezy dashboard and with the API.


Change in the dashboard

  1. From Store » Subscriptions, click on a subscription to open its detail panel.
  2. Click on “Modify subscription”.
    • This opens a form that lets you choose a new product and variant for this subscription.
    • You’ll also see a few options offering you different ways to handle proration.
  3. Click “Apply changes”.
  4. All done! The subscription has been updated to the new product and variant.
Lemon Squeezy: Manage Subscription

If you chose to charge proration now, a charge will be attempted and, if successful, a receipt will be sent to the customer.

Change with the API

If you have an API integration with Lemon Squeezy, it’s easy peasy to change a subscriber’s plan.

You just need to make a single API request, specifying the new plan’s product and variant IDs.

curl -X "PATCH" "https://api.lemonsqueezy.com/v1/subscriptions/{subscription_id}" \
  -H 'Accept: application/vnd.api+json' \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {api_key}' \
  -d $'{
  "data": {
    "type": "subscriptions",
    "id": "{subscription_id}",
    "attributes": {
      "product_id": {product_id},
      "variant_id": {variant_id}
    }
  }
}'

That’s it! The subscription will now be on the specified plan.

Handling proration

By default, a prorated charge will be added to user’s next renewal if they are changing to a more expensive plan or to a plan with a different billing interval (e.g. changing from a monthly to a yearly plan).

There are two options available to change how proration works.

If you would rather charge the proration amount immediately (rather than adding to the next renewal charge), you can use "invoice_immediately": true in your request.

curl -X "PATCH" "https://api.lemonsqueezy.com/v1/subscriptions/{subscription_id}" \
  -H 'Accept: application/vnd.api+json' \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {api_key}' \
  -d $'{
  "data": {
    "type": "subscriptions",
    "id": "{subscription_id}",
    "attributes": {
      "product_id": {product_id},
      "variant_id": {variant_id},
      "invoice_immediately": true
    }
  }
}'

You can stop proration from happening by adding "disable_prorations": true to your request. The customer will just start paying the new price from the next renewal.

curl -X "PATCH" "https://api.lemonsqueezy.com/v1/subscriptions/{subscription_id}" \
  -H 'Accept: application/vnd.api+json' \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {api_key}' \
  -d $'{
  "data": {
    "type": "subscriptions",
    "id": "{subscription_id}",
    "attributes": {
      "product_id": {product_id},
      "variant_id": {variant_id},
      "disable_prorations": true
    }
  }
}'

You can read more about proration in our Developer Guide.


Was this page helpful?