Updating Plan count in subscription

Updating Plan count in subscription

Im running automation where we want to to increment the quantity of a customers subscription plan by 1. Ive been testing with different update bodies but even though I get the "successfully updated" message on calling the update method, the quantity does not increase. 

See code below for an example:
subscriptionURL = "https://subscriptions.zoho.com/api/v1/subscriptions/" + foundSubscriptionID;
info foundSubscriptionID;
getSubscriptionResponse = invokeurl
[
url :subscriptionURL
type :GET
connection:"subscriptions_connection"
];

subscription = getSubscriptionResponse.get("subscription");
plan = subscription.get("plan");
planTotal = plan.get("total");
planTotalDouble = planTotal.toDecimal();

planPrice = plan.get("price");
planPriceDecimal = planPrice.toDecimal();


// Update the total amount
planTotalDouble = planTotalDouble + planPriceDecimal;
plan.put("total", planTotalDouble);

planQuantity = plan.get("quantity");
planQuantityNumber = planQuantity.toNumber();
planQuantityNumber = planQuantityNumber + 1;
//replace quantity of old plan with new plan;
plan.put("quantity",planQuantityNumber);

subscription.put("plan",plan);
info plan;

updateSubscriptionResponse =zoho.subscriptions.update("subscriptions",organizationID,foundSubscriptionID,subscription,"subscriptions_connection");

Another version I tried using just quantity:
otherUpdateBody = {"quantity":planQuantityNumber};
updateSubscriptionResponse = zoho.subscriptions.update("subscriptions",organizationID,foundSubscriptionID,otherUpdateBody,"subscriptions_connection");

What would be the best way to update a plans quantity in a subscription from deluge?



    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      • Sticky Posts

      • Zoho Billing will discontinue support for older browser versions soon

        Hello users, Starting from May 15, 2024, Zoho Billing will no longer support the following browser versions: Browsers Version Restrictions Firefox Browser Versions older than 100 Google Chrome Versions older than 100 Microsoft Edge Versions older than
      • Introducing Developer Space in Zoho Subscriptions

        Hello devs! At Zoho Subscriptions, we're constantly looking for ways to empower the developer community. Our goal is to provide you with the tools you need to integrate Zoho Subscriptions with your other platforms, and we also want to make it easy to

      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方