Welcome to Zuora Product Documentation

Explore our rich library of product information

Subscribe to a calculated charge rate plan using the REST API (Use Case 1)

Learn how to subscribe to a calculated charge rate plan using the REST API and override charge attributes such as percentage, minimum and maximum amounts, and eligibility conditions.

The supported order actions are createSubscription, addProduct, and changePlan.

  • 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 below are of createSubscription order action. For addProduct, changePlan

Note:

Default Account Filter is the eligible subscription rate plan charge's subscription owner account is the same as the calculated charge's subscription owner. If you do not provide the eligibleAccountConditions in the payload, the default value Account.Id = {{CurrentAccountId}} will be saved automatically.

Default Charge Filter is All Charges. If you do not provide the eligibleChargeConditions in a payload, the charge filter will not be applied.

Subscribe to a rate plan with calculated charge by ID decd3ce382a4430ab87e362aafec9c59 and override the following attributes:

  • Change percentage to 10%

  • Change minimum amount to 100

  • Change maximum amount to 2000

  • Set eligible accounts to the ones whose custom field EntityID__c value is ENT0001

  • Set eligible charges to the ones from the product family, Classic.

  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.

    $MinimumAmount

    The minimum amount of calculated charges. 100.

    $MaximumAmount

    The maximum amount of calculated charges. 2000.

    $Percentage

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

    $ProductRPId

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

    $ProductRPChargeId

    The ID of the product rate plan charge to use when adding the product rate plan. For example, decd3ce382a4430ab87e362aafec9c59..

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

    Request

    POST /v1/orders/

    Request Body

    {
       "category":"$Category",
           
            "existingAccountNumber":"$                
    AccountNum",
       "orderDate": "$Today",
       "subscriptions": [
           {
               "orderActions": [
                   {
                       "createSubscription": {
                           "subscribeToRatePlans": [
                               {
                                   "chargeOverrides": [
                                       {
                                           "pricing": {
                                               "recurringCalculated": {
                                                   "minimumAmount":"$MinimumAmount",
                                                   "maximumAmount":"$MaximumAmount",
                                                   "percentage":"$Percentage",
                                                   "eligibleAccountConditions": {
                                                       "field":"Account.EntityID__c",
                                                       "operator": "eq",
                                                       "value": "ENT0001"
                                                   },
                                                   "eligibleChargeConditions": {
                                                       "field":"Product.ProductFamily__c",
                                                       "operator": "eq",
                                                       "value": "Classic"
                                                   }
                                               }
                                           },
                                           "productRatePlanChargeId":
    "$ProductRPChargeId"
                                       }
                                   ],
                                   "productRatePlanId": 
    "$ProductRPId"
                               }
                           ],
                           "terms": {
                               "autoRenew": false,
                               "initialTerm": {
                                   "period": 12,
                                   "periodType": "Month",
                                   "startDate": "2025-12-01",
                                   "termType": "TERMED"
                               },
                               "renewalSetting": 
    "RENEW_WITH_SPECIFIC_TERM",
                               "renewalTerms": [
                                   {
                                       "period": 2,
                                       "periodType": "Month"
                                   }
                               ]
                           }
                       },
                       "triggerDates": [
                           {
                               "name": 
    "ContractEffective",
                               "triggerDate": "$Today"
                           },
                           {
                               "name": 
    "ServiceActivation",
                               "triggerDate": "$Today"
                           },
                           {
                               "name": 
    "CustomerAcceptance",
                               "triggerDate": "$Today"
                           }
                       ],
                       "type": "CreateSubscription"
                   }
               ]
           }
       ]
    }