Update Prices on Subscriptions

Suppose that your customer's rate plans need to be adjusted. You can use the Create an order operation to update the prices on subscriptions.

In this guide, you will learn:

  • How to update a price through API

Step 1. Generate an OAuth token

See Create an OAuth token for details.

Step 2. Upgrade and downgrade products using the "Create an order" operation

When an end subscriber wants to upgrade or downgrade a product for a subscription, two order actions are required in the single Create an order operation: One action is to remove the previous rate plan from the subscription, and the other is to add the new rate plan.

In this scenario, both removeProduct and addProduct order actions are used in the "Create an order" operation. You should provide the following information in the API request:

  • orderDate : the date when the order is signed.
  • existingAccountNumber : the number of the account that owns this order.
  • subscriptionNumber : the number of the existing subscription to be updated.

The following fields are required for the removeProduct order action:

  • contractEffective : the contract effective date of product removal.
  • serviceActivation : the service activation date of product removal.
  • customerAcceptance : the end subscriber acceptance date of product removal.
  • ratePlanId : the ID of the rate plan to be removed from the subscription.

The following fields are required for the addProduct order action:

  • contractEffective : the contract effective date of the product addition.
  • serviceActivation : the service activation date of the product addition.
  • customerAcceptance : the end subscriber acceptance date of the product addition.
  • productRatePlanId : the ID of the product rate plan to add to the subscription.

The following cURL code sample shows how to remove a rate plan while adding a new product rate plan to a subscription:

Copy
Copied
 curl --location --request POST 'https://rest.zuora.com/v1/orders' \
      --header 'Authorization: Bearer 0228427979714ca690ff07d4d648ac21' \
      --header 'Content-Type: application/json' \
      --data-raw '{
        "description": "Price update by removing and adding products",
        "existingAccountNumber": "A00000521",
        "orderDate": "2022-12-01",
        "subscriptions": [
          {
            "orderActions": [
              {
                "removeProduct": {
                  "ratePlanId": "8a90a9b784ae5f180184c6c46a1a46b6"
                },
                "triggerDates": [
                  {
                    "name": "ServiceActivation",
                    "triggerDate": "2023-03-01"
                  },
                  {
                    "name": "CustomerAcceptance",
                    "triggerDate": "2023-04-01"
                  }
                ],
                "type": "RemoveProduct"
              }
            ]
          },
          {
            "orderActions": [
              {
                "addProduct": {
                  "productRatePlanId": "8a90a9b784ae5f180184c6c46a1a46b6"
                },
                "triggerDates": [
                  {
                    "name": "ContractEffective",
                    "triggerDate": "2023-04-01"
                  },
                  {
                    "name": "ServiceActivation",
                    "triggerDate": "2023-05-01"
                  },
                  {
                    "name": "CustomerAcceptance",
                    "triggerDate": "2023-05-01"
                  }
                ],
                "type": "AddProduct"
              }
            ],
            "subscriptionNumber": "A-S00000272"
          }
        ]
      }'

Step 3. Verify the result

After the preceding API call is done, you can verify the result in the Zuora UI or through the API.

To verify the result through the Zuora UI, you can search the subscription by ID at the All Subscriptions page by navigating to Customers > Subscriptions in the Zuora UI. By clicking the subscription, you will be able to find the details of the subscription, including the latest prices on the subscription.

To verify the result through the API, See Retrieve Object Information for details.