Tip #2 - Cancellation of Offline Subscriptions based on the Expected Payment Date

Tip #2 - Cancellation of Offline Subscriptions based on the Expected Payment Date

Hello everyone,

As you all know, we are coming up with a custom function workflow every week to address specific business scenarios. In continuation of this previous blog, this week we will be seeing about Cancellation of Offline Subscriptions based on the Expected Payment Date.

Business Scenario:


In general, for any business, the customers make payments via online as well as offline. In case of subscription where the automatic collection of charge is enabled (aka online subscription), the customer's card on file will be automatically charged on the renewal date on a regular basis. If for some reason the collection of charge fails on renewal, the Retry Settings (Dunning Settings) will handle the payment collection and sending notification reminders on specified intervals. Upon failure of all the retry attempts, the system will automatically cancel that subscription.

Whereas in the subscription for which the payment is made via cash (or) check, the business (sales) person collects the payment and record it manually into the billing system. There can be situations where even after multiple reminders and personal follow-ups by the salesperson, the customer might not have still paid for the invoice. In such cases, to avoid churn and to keep the cash flow coming, there can be a negotiation between the salesperson and the customer to collect the payment before a final date. This final date can be marked as the Expected Payment Date in that particular invoice.

In most of these scenarios, the customers will usually pay within the expected payment date which was previously agreed upon. However, if the customer fails to do so, the salesperson might have to cancel their subscription manually as there is no business value associated with it. 

Now, let's see how we can automate this process without any manual work. By doing this, you could save a significant amount of time which can be put into developing your business.

Logic Explanation:

As you would have guessed by now, we would be using our Custom Function Workflow to achieve this. Since this scenario involves date based actions, we will be using Date based Workflow. The Date based workflow is something that can be configured to run after a particular date and at a particular time depending on our requirement.

Now, if you were wondering how to configure the custom function to automate our process, please find the answers to your questions below.

What type of Workflow is to be followed?
Date Based Workflow

When is the date of execution?
1 day(s) after the Expected Payment Date.


Are there any additional filters required?

Yes. Execute this workflow only for unpaid invoices.

So to summarize, this custom function should be set to run exactly one day after the expected payment date for the unpaid invoices. After configuring this custom function, you would have to code (the functionality) in such a way that the subscription associated with the invoice is cancelled immediately.

Please be informed that this custom function workflow will work only on the invoices which are created after configuring this custom function.


Code Explanation:

You can refer the code through this GitHub link. The code is written in Deluge script, which is easily understandable to non-programmers. 

1) This snippet of code will be executed only for invoices which are unpaid even after the expected payment date. Kindly replace the "authtoken variable" with your generated authtoken.

2) Initially, we will retrieve the Subscription that is associated with that particular invoice.

3) After retrieving the associated subscription, we will be cancelling it by using the Cancel Subscription API.


Getting started with the Custom Functions: 

1. Go to Settings -> Automation -> Custom Functions.


2. Create a new Custom function. Provide a name for the function. 


3. Choose the module as 'Invoice' and click on 'Create Custom Events'. 


4. Choose Date Based workflow type and Date of Execution as 1 day(s) after Expected Payment DateYou can also set a different Execution Time based on your requirement.

5. In order to run the function for unpaid invoices, Apply Advanced Filter as When Status isn't Paid

6. Copy the code which was given above.

7. Save the Custom function and you are good to go.


Further Enhancements:

1)  While using this custom function, there might be a scenario where you would like to exclude a few of your prime customers' subscription from being cancelled automatically without your consent. In order to do this, you can add a Custom Field of type CheckBox to the Subscription. 

While creating a subscription, you can leave this CheckBox marked (or) unmarked in order to differentiate your prime customers from others. Later, you can add this custom field in the Addition Criteria of your workflow, such that the workflow is executed only for your non-prime customers.

Please refer the below image for your reference, where the CheckBox custom field is named as "Cancel subscription automatically?".

2) When the subscription is cancelled, the last renewed invoice will still be in open status. If you would like to void that invoice before cancelling the subscription, you can modify the workflow to address that need. 

Found this useful? Try it out and let us know how it works! If you have questions, do not hesitate to ask!

Cheers,
Sasidaran K,
Zoho Subscriptions.

    Access your files securely from anywhere


            All-in-one knowledge management and training platform for your employees and customers.






                                  Zoho Developer Community




                                                        • Desk Community Learning Series


                                                        • Digest


                                                        • Functions


                                                        • Meetups


                                                        • Kbase


                                                        • Resources


                                                        • Glossary


                                                        • Desk Marketplace


                                                        • MVP Corner


                                                        • Word of the Day


                                                        • Ask the Experts



                                                                  • Sticky Posts

                                                                  • Tip #4 : Refer and Earn Workflow system for your Subscription Business

                                                                    Hello everyone, We've been coming up with a tip every week to address specific business scenarios which can be implemented for your business. In continuation to the previous post, this week we will be seeing about how you can implement the Refer and Earn Workflow system to acquire more customers. Why are Referrals important? Customer Acquisition is crucial for any business to sustain itself in a constantly evolving market. It involves persuading new consumers to purchase your products. Customers
                                                                  • Tip #2 - Cancellation of Offline Subscriptions based on the Expected Payment Date

                                                                    Hello everyone, As you all know, we are coming up with a custom function workflow every week to address specific business scenarios. In continuation of this previous blog, this week we will be seeing about Cancellation of Offline Subscriptions based on the Expected Payment Date. Business Scenario: In general, for any business, the customers make payments via online as well as offline. In case of subscription where the automatic collection of charge is enabled (aka online subscription), the customer's
                                                                  • Tip #3 : Send SMS Reminders for your Subscription Business

                                                                    Hello everyone, As you all know, we are coming up with a tip every week to address specific business scenarios. In continuation to the previous blog, this week we will be seeing how you can use SMS reminders for your Subscription Business. Using SMS messages for your Subscription Business: While managing your subscription business, more often than not, you need to keep your customers informed about upcoming renewals, payment reminders and cancellations. By keeping them informed in advance, you can
                                                                  • Tips And Tricks - Announcement

                                                                    Hello everyone, Every business is unique and each of them follows a specific workflow. While managing your customers' subscriptions with Zoho, you might have some needs unique to your business. Custom Functions helps you address such needs. This is a start to a series of posts, where we will be coming up with a custom function workflow every week that addresses specific business scenarios. Watch this space for further updates! Also, if you have any specific business scenario which needs to be addressed,
                                                                  • Tip #6 : Accessing external URLs from Zoho Subscriptions

                                                                    Hello everyone, We have been sharing a tip every week to address specific business scenarios which you can implement for your subscription business. Last week, we shared a tip about implementing the Approval Workflow system. This week, let's look at how you can access external URLs with the help of Custom Link. Business Scenario: Every business functions differently and has its unique requirements. At times, businesses might want to access other websites or applications by appending specific information


                                                                  Manage your brands on social media



                                                                        Zoho TeamInbox Resources



                                                                            Zoho CRM Plus Resources

                                                                              Zoho Books Resources


                                                                                Zoho Subscriptions Resources

                                                                                  Zoho Projects Resources


                                                                                    Zoho Sprints Resources


                                                                                      Qntrl Resources


                                                                                        Zoho Creator Resources



                                                                                            Zoho CRM Resources

                                                                                            • CRM Community Learning Series

                                                                                              CRM Community Learning Series


                                                                                            • Kaizen

                                                                                              Kaizen

                                                                                            • Functions

                                                                                              Functions

                                                                                            • Meetups

                                                                                              Meetups

                                                                                            • Kbase

                                                                                              Kbase

                                                                                            • Resources

                                                                                              Resources

                                                                                            • Digest

                                                                                              Digest

                                                                                            • CRM Marketplace

                                                                                              CRM Marketplace

                                                                                            • MVP Corner

                                                                                              MVP Corner









                                                                                                Design. Discuss. Deliver.

                                                                                                Create visually engaging stories with Zoho Show.

                                                                                                Get Started Now


                                                                                                  Zoho Show Resources

                                                                                                    Zoho Writer

                                                                                                    Get Started. Write Away!

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

                                                                                                      Zoho CRM コンテンツ




                                                                                                        Nederlandse Hulpbronnen


                                                                                                            ご検討中の方





                                                                                                                      • Recent Topics

                                                                                                                      • Analytics Dashboard User Filters Default Value

                                                                                                                        User Filters on Dashboard do not allow Unknown to be set as a default filter value. I have to include NULL values in my dashboard among other values but I can't include NULL/Unknown by default in Dashboard User Filters.
                                                                                                                      • Microsoft is retiring Exchange Web Services (EWS): Here's what it means for Zoho Mail users

                                                                                                                        Microsoft has officially announced the retirement of Exchange Web Services (EWS) for Exchange Online. If your organization is planning to migrate from Microsoft 365 to Zoho Mail, you may be wondering what this change means for you. The good news is that
                                                                                                                      • Zoho Writer page break in a merge repeating region always adds an unwanted blank page

                                                                                                                        Hi I'm merging a Zoho CRM record to a Zoho Writer document with a repeating region to display subform records on their own page within the document. When I try to insert a page break in a repeating region, the resulting merge always adds an unwanted blank
                                                                                                                      • ZeptoMail account pending review, SMTP blocked with relaying-issues

                                                                                                                        Hi ZeptoMail team/community, Our ZeptoMail account has been pending review for more than 3 business days and still shows: “Your account is yet to be reviewed.” I already created a support ticket, but have not received an update yet. Ticket details: Request
                                                                                                                      • Zoho ERP | Product updates | June 2026

                                                                                                                        Hello users, We launched Zoho ERP on January 23, and since then, our goal has been to help businesses streamline and manage their operations with greater efficiency, flexibility, and control. Since the launch, we've continued to enhance the platform every
                                                                                                                      • Tip #83- Give Customers a Faster Way to Reach You with the Quick Support Plugin – 'Insider Insights'

                                                                                                                        Hello Zoho Assist Community! Think about the last time a customer needed urgent support. They emailed in, waited for a response, got a session link, couldn't find it in their inbox, called back, and by the time the session actually started, a good chunk
                                                                                                                      • How to Open .mbox file in Gmail with Attachments?

                                                                                                                        Gmail offer users to backup INBOX folder in .mbox file format via Google Takeout Feature. Howver there is no such option to Restore Gmail MBOX. Thus I would like to suggest you to choose an alternate approach i.e. MBOX to Gmail Wizard. This utility will open .mbox file in Gmail with attachments.  Steps to open MBOX file in Gmail are; Run MBOX to Gmail Wizard Click Add File and add .mbox file. Enter your Gmail login credentials. Click Convert button. Finished! This is how you can open MBOX file in
                                                                                                                      • Seperate rating scales for KRA's and Competencies in appraisals

                                                                                                                        Is there a way to set-up different rating scales for KRA's and Competencies?? I would like to have; Met/Not met for KRA's and a 1-5 scale for the competencies I know how to set up custom ratings but it spans across both sections and I need them to be
                                                                                                                      • Is there a CRM Deluge function available to convert an RTF (rich text field) to plain text (with no formatting tags)?

                                                                                                                        I know that we can run reports so that RTF fields can either show as plain text or the text or the text with the formatting fields included (which is wonderful, btw, as it helps me adjust tags when I need to troubleshoot and just see what I need to see
                                                                                                                      • How do I set the value of a Lookup field in SlyteUI?

                                                                                                                        I am using the "crm-field" component in a SlyteUI project (code attached) https://www.zohocrm.dev/explore/slyteui/ui-components/crm-field/api#Properties The client would like to have this field pre-populated with a value. When I try to input the record
                                                                                                                      • Mise à jour de Zoho Books – France

                                                                                                                        Chers clients, Merci pour votre patience et votre soutien continu. Avec les évolutions réglementaires à venir en France nous introduisons de nouvelles fonctionnalités dans Zoho Books pour les clients français. Ces mises à jour ont été conçues pour répondre
                                                                                                                      • CRM Developer Update: Mandatory field behavior changes in Zoho CRM APIs

                                                                                                                        We are planning a few updates to Zoho CRM APIs that are expected to be rolled out by the end of October 2026. These changes are not live yet. We are sharing this early so developers and partners can review the impact and prepare in advance. What is changing?
                                                                                                                      • Show Available Stock as a Column in Item Views (Including by Warehouse)

                                                                                                                        It would be very useful to have Available Stock as a standard column in the Items list view. Currently Stock On Hand does not show the real picture for businesses managing orders and inventory. Example: Stock on Hand: 100 Committed to Sales Orders: 80
                                                                                                                      • What's New in Zoho POS - July 2026

                                                                                                                        Hello everyone, Welcome to Zoho POS’s monthly update, where we share our latest feature updates, enhancements, events, and more. Let’s take a look at how July went. Support for Saudi's ZATCA Phase 2 e-invoicing We have added support for ZATCA (Zakat,
                                                                                                                      • How to make Contact a Help Center User

                                                                                                                        I see a "IsPortalUser" checkbox on each of the Customer account, but I am unable to check the checkbox. How is this configured?
                                                                                                                      • Introducing the new Fields API

                                                                                                                        Hello everyone, Greetings from Zoho Desk's API corner! With the rising need for integrations to connect multiple tools in businesses, APIs need to be adaptive, reliable, consistent, and ready for dynamic operations. To support better performance, efficiency,
                                                                                                                      • Service locations are tied to contacts?

                                                                                                                        Trying the system out. And what I discovered is that it seems that the whole logic of the app is, I'd say, backwards. There is a Customer - a company. The company has contact persons and service locations can be associated with different contact persons.
                                                                                                                      • Zoho ResearchStudio Shutdown Notice

                                                                                                                        Hi ResearchStudio fam, We are writing to inform you that Zoho ResearchStudio will be discontinued from Oct 5, 2026. Thank you for being a part of our journey and for trusting us with your qualitative research work. What this means for your data: Your
                                                                                                                      • SlideShare Downloader PDF not syncing in Zoho WorkDrive

                                                                                                                        Hi everyone, I use SlideShare Downloader for save study PPT and PDF files. After download I upload files in Zoho WorkDrive, but sometimes PDF preview not showing or sync take very long time. Small files work okay but some bigger presentation files have
                                                                                                                      • メモの保存場所、見直しませんか?― Zoho Notebookで始める情報管理

                                                                                                                        ユーザーの皆様、こんにちは。ゾーホージャパンの朝香です。 AIを利用した業務が広がる中、AIによる情報漏洩対策を進めている組織も多いのではないでしょうか。 一方で、日常的に使っているメモの管理については、対策できていますか? 業務中のメモには、重要な情報が含まれていることがあります。 そのため、AIへの入力だけでなく、メモの保存先についても是非確認をおすすめしたいと思います。 そこで今回は、使いやすさだけでなく、セキュリティにも配慮して設計されたZohoのノートアプリ「Zoho Notebook」をご紹介します!
                                                                                                                      • Zoho Sheet offline is now live on iPhone

                                                                                                                        Hello everyone, We've just rolled out offline support for Zoho Sheet on iOS—you can now create, edit, and analyze spreadsheets on your iPhone without an internet connection. Offline support has been a sustained priority for us. We're on the verge of bringing
                                                                                                                      • You can now sync records from Custom Modules in Zoho CRM

                                                                                                                        p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0.0cm; font-size: 12.0pt; font-family: Cambria; } p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph { margin-top: 0.0cm; margin-right: 0.0cm; margin-bottom: 0.0cm; margin-left: 36.0pt; font-size: 12.0pt; font-family: Cambria; } p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst { margin-top: 0.0cm; margin-right: 0.0cm; margin-bottom: 0.0cm; margin-left: 36.0pt; font-size: 12.0pt; font-family: Cambria;
                                                                                                                      • Zoho ERP | Product updates | July 2026

                                                                                                                        Hello users, We're back with another round of updates to help you streamline your operations. This month's release brings new features and enhancements designed to help you work more efficiently. Read on to discover everything that's new in Zoho ERP this
                                                                                                                      • Fixed cost per task

                                                                                                                        Is there any way to assign a fixed cost per task, but track time for internal reporting? Don't see a way to do this currently.
                                                                                                                      • Please critique my CRM design

                                                                                                                        I run a disability healthcare business with 2 business units. We run on Zoho One and are re-designing our CRM. We have developed the design concept ourselves, and I am hoping to get some critical feedback: 1) Noting that this is an early design of the
                                                                                                                      • Set custom date creation for ticket using API in Desk

                                                                                                                        Hi. all.. I want know if is possible to add ticket with custom creation date via API... This would to be great because we are moving from another platform to Zoho and we have need to keep all statistics for old tickets also. In api docs i didnt see nothing about custom date in ticket creation but i would prefer a confirm from comunity/support. Thank you P.S.: Sorry for bad english language
                                                                                                                      • Allow Shopify / marketplace orders to be cloned

                                                                                                                        Many businesses now use Shopify as a B2B ordering portal, not just a D2C ecommerce website. For B2B businesses, once these orders are imported into Zoho Inventory, Zoho often becomes the main system used to manage purchasing, stock, fulfilment and customer
                                                                                                                      • How to Display a Logo Image on a Public Form?

                                                                                                                        I would like to display a logo image in the header of a form. To achieve this, I added an Add Notes field to the form. The code below works perfectly for Zoho users accessing the form. However, when the form is made public, the image does not load properly:
                                                                                                                      • Possible to define default font and size in Zoho Campaigns?

                                                                                                                        Is it possible to define a default font (font, size and colour) for the text, H1 and H2 in Zoho Campaigns? For example: In a campaign, I add a text block, and the text is automatically century gothic, size 11, grey (6f6f6e) by default? Thank you!
                                                                                                                      • Set Custom Colurs/Fonts/Style

                                                                                                                        I know I can save blocks as books marks but it would be nice to be able to define a custom colour pallet, the style of the H1, H2 etc to save me having to copy a previous block and set them manually over and over again. Since the colour picker doesn't
                                                                                                                      • Stop Zoho Projects From Automatically Adding Client Users

                                                                                                                        I have a custom function that creates a Zoho Project for every Quote attached to a Deal when it moves to Closed Won. Everything works fine, except for the fact that connecting a Zoho Project to the CRM automatically takes the Contact associated with the
                                                                                                                      • Zoho CRM - Kiosk Studio: Build Once, Execute Multiple Times with Loops

                                                                                                                        Hello Everyone, Introducing Loop Functionality in Kiosk Studio. If you've ever built a Kiosk that needed to perform the same action multiple times like updating a list of contacts, scheduling calls for a batch of leads, or processing multiple products
                                                                                                                      • Switching from Notebook to another product, too unreliable

                                                                                                                        Not only is the spell check worse than useless, now there is a lag AFTER EVERY KEYSTROKE! This makes it impossible to use when there are innumerable products which provide this basic function. I made the mistake of relying on Notebook and have so many
                                                                                                                      • Accidentally deleted a meeting recording -- can it be recovered?

                                                                                                                        Hi, I accidentally deleted the recording for a meeting I had today. Is there a way I can recover it?
                                                                                                                      • Zoho Desk: A Estruturação do Atendimento ao Cliente na era da IA

                                                                                                                        O mercado de atendimento ao cliente vem passando por uma transformação que não é apenas tecnológica, é também comportamental. As empresas que antes mediam qualidade de suporte pelo tempo de resposta, hoje precisam medir pela experiência completa, unindo
                                                                                                                      • API bookings/v1/json/appointment not adding additional fields he is returning this "customer_more_info": {"booking_form_type": "service"}

                                                                                                                        Hi, I'm trying to add additional fields inside zoho booking appointment api and I'm passing same data as you told inside your documentation. He is returning following response "customer_more_info": { "booking_form_type": "service" } I'm using this parameter
                                                                                                                      • Basic report- open sales order by item, with filter for customer ..

                                                                                                                        HI, we really need a basic report that sorts all open sales orders by Item, so you can see which items in your inventory are awaiting invoicing. Then you need a filter by customer, so you can see all the items a particular customer is waiting for. daily,
                                                                                                                      • Record sharing for Activities modules in CRM

                                                                                                                        Hello everyone, We've got a few quick enhancements to what we covered in this previous announcement: record sharing is now available for Activities modules. 1. Sharing Tasks, Meetings, and Calls Until now, activity records could only be shared indirectly
                                                                                                                      • Stock Count

                                                                                                                        The stock count is a nice new feature, but we cannot figure out how to: 1. Use it without assigning to a person, we have a team or one of multiple do stock counts as do most any company. 2. Add any extra fields to what the "counter" sees. The most important
                                                                                                                      • Action Required: Update your TLS configuration to ensure uninterrupted access to Zoho WorkDrive

                                                                                                                        Hi everyone, To further strengthen the security of Zoho WorkDrive, we’re updating the TLS cipher suites supported across our services. As part of this change, older and less secure cipher suites are being phased out. If your browser, API client, desktop
                                                                                                                      • Next Page