Upgrade Plan (Immediately)

A great way to grow your revenue is to convince your current customers that they should upgrade to a more expensive version of your product or service that has more bells and whistles. To enable customers to upgrade their plans, integrate the following flow into your system:

Step 1: Show customer price of upgrade

If a customer would like to upgrade, call the Update Subscription Item API endpoint to generate a preview of the pro-rated price that the customer will pay for the new plan for the remainder of the current billing interval. In the API call, do the following:

  • Submit the ProductId that pertains to the premium product.
  • Set AlignToCurrentInterval to true in the AlignmentSettings argument to generate the pro-rated cost of upgrade for the remainder of the current billing interval.
  • Set GetCustomerPricePreviewOnly to true in the AlignmentSettings argument and set GenerateMail to false to generate a preview that will not be processed or communicated via email.
  • Set UpdateAction to Upgrade for reporting purposes.
  • Set ExtendInterval to true to apply the new subscription interval.
curl --request POST \
  --url https://rest.cleverbridge.com/subscription/updatesubscriptionitem \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
  --data '{
    "AlignmentSettings": {
      "AlignToCurrentInterval": true,
      "ExtendInterval": true,
      "GetCustomerPricePreviewOnly": true
    },
    "GenerateMail": false,
    "ProductId": 123456,
    "Quantity": 1,
    "RunningNumber": 1,
    "SubscriptionId": "S12345678",
    "UpdateAction": "Upgrade"
  }'

For more information about the AlignmentSettings argument, see Alignment Settings.

Step 2: Process upgrade for customer

After the customer confirms the previewed price, set GetCustomerPricePreviewOnly to false in the AlignmentSettings argument and set GenerateMail to true. Call the Upgrade Subscription Item API endpoint again. Cleverbridge will process the upgrade using the payment details that we have stored in our database and send a confirmation email to the customer.

curl --request POST \
  --url https://rest.cleverbridge.com/subscription/updatesubscriptionitem \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
  --data '{
    "AlignmentSettings": {
      "AlignToCurrentInterval": true,
      "ExtendInterval": true,
      "GetCustomerPricePreviewOnly": false
    },
    "GenerateMail": true,
    "ProductId": 123456,
    "Quantity": 1,
    "RunningNumber": 1,
    "SubscriptionId": "S12345678",
    "UpdateAction": "Upgrade"
  }'

Step 3: Cleverbridge sends you a PaidOrderNotification

For more information, see Step 3: Cleverbridge sends you a PaidOrderNotification in Add Product (Immediately).