Welcome to Zuora Product Documentation

Explore our rich library of product information

Update the calculated charge using the REST API

Learn how to update a calculated charge’s percentage and reset its minimum and maximum amounts using the updateProduct order action.

Update a calculated charge using the updateProduct order action.

You can update the following attributes of a calculated charge:

  • minimumAmount

  • maximumAmount

  • percentage

  • eligibleAccountConditions

  • eligibleChargeConditions

  • clearingExistingMinimumAmount (set it to “true” to reset the amount to null)

  • clearingExistingMaximumAmount (set it to “true” to reset the amount to null)

The example order requests allows you to update the calculated charge’s percentage from 10% to 5% from 2025-12-11. Reset the minimum and maximum amount to Null.

  1. Determine the values of the following variables:

    Variable

    Description

    $AccountNum

    The number of the account that will own the order. For example, A00013328 .

    $Today

    Today’s date. For example, 2025-12-01.

    $SubscriptionNum

    The number of the subscription to update. For example, A-S00019059.

    $ChargeNum

    The charge number. For example, C-00020812.

    $Percentage

    The percentage of the total spend of eligible charges. For example, 10.

    $RatePlanId

    The ID of the product rate plan to subscribe to. For example, 41f98c3a3d8d45bc9d32709b0761be7b.

  2. Use the Create an order operation to create an order under an existing account:

    Request

    POST /v1/orders/

    Request Body

    {
       "existingAccountNumber": "$AccountNum",
       "orderDate": "$Today",
       "subscriptions": [
           {
               "subscriptionNumber": "$SubscriptionNum",
               "orderActions": [
                   {
                       "type": "UpdateProduct",
                       "triggerDates": [
                           {
                               "name": "ContractEffective",
                               "triggerDate": "2025-12-11"
                           },
                           {
                               "name": "ServiceActivation",
                               "triggerDate": "2025-12-11"
                           },
                           {
                               "name": "CustomerAcceptance",
                               "triggerDate": "2025-12-11"
                           }
                       ],
                       "updateProduct": {
                           "ratePlanId": "$RatePlanId",
                           "chargeUpdates": [
                               {
                                   "chargeNumber": "$ChargeNum",
                                   "pricing": {
                                       "recurringCalculated": {
                                           "percentage": "$Percentage",
                                           "clearingExistingMaximumAmount": true,
          "clearingExistingMinimumAmount": true
                                       }
                                   }
                               }
                           ],
                           "specificUpdateDate": "2025-12-11"
                       }
                   }
               ]
           }
       ]
    }