Happy Business Starts Here

Student

Subscribe API - How to apply discount percentage?

Here is my Subscription Request - When I remove the RatePlanCharge for the "MyRatePlanChargeIdforReccurring", the subscription is getting created properly. Otherwise getting an error. 

 

{
   "subscribes":[
      {
         "SubscribeOptions":{
            "GenerateInvoice":false,	
            "ProcessPayments":false 	
         },
         "Account":{
            "Id":"MyAccountId"
         },
         "BillToContact":{
            "FirstName":"Aniket",
            "LastName":"Khare",
            "Country":"United States",
            "State":"PA"
         },
         "SubscriptionData":{
            "RatePlanData":[
               {
                  "RatePlan":{
                     "ProductRatePlanId":"MyProductRatePlanId"
                  },
                  "RatePlanChargeData":[
                     {
                        "RatePlanCharge":{
                           "ProductRatePlanChargeId":"MyRatePlanChargeIdforOneTime",
                           "Quantity":201
                        },
                        "RatePlanCharge":{
                           "ProductRatePlanChargeId":"MyRatePlanChargeIdforReccurring",
                           "ChargeModel":"Discount-Percentage",
                           "DiscountPercentage":"6.75",
                           "Quantity":201
                        }
                     }
                  ]
               }
            ],
            "Subscription":{               
               "InitialTerm":12,
               "RenewalTerm":12,
               "ContractEffectiveDate":"2018-10-01",
               "ServiceActivationDate":"2018-10-01",
               "TermType":"TERMED"               
            }
         }
      }
   ]
}

 Error -

[
    {
        "Errors": [
            {
                "Code": "MISSING_REQUIRED_VALUE",
                "Message": "Charge Quantity is required."
            }
        ],
        "Success": false
    }
]

 

1 REPLY 1
Highlighted
Zuora Support Moderator

Re: Subscribe API - How to apply discount percentage?

Hi @aniketkhare, thanks for reporting this. I just tried the same type of request and didn't receive any errors. Please could you submit your issue at https://support.zuora.com so that our Support team can investigate futher.