Hi, Developers!
I am running into a logic loop that is preventing me from canceling an active subscription via api. For context here is my current setup:
- Customer Payment Subscription is created via embedded payment link in my SaaS app.
- Credit card information is stored so that we can charge customers on a monthly bases (example subscription $10.00 / month)
- I am currently enrolled in this beta: Product Updates
- I currently have these permissions in my private app:
crm.objects.subscriptions.write
crm.schemas.subscriptions.write
crm.objects.subscriptions.read
crm.schemas.subscriptions.read
crm.schemas.commercepayments.read
crm.objects.commercepayments.read
Along with deals, contacts, orders, line items and more.
- The turn off invoices display is turned on: Display option to turn off invoices inside the create subscription tool
When on, an option will appear that allows you to decide whether or not invoices should be created for the subscription. Typically used to record subscriptions managed outside of HubSpot.
The issue I am running into is the following. There is a logic loop that prevents me from modifying the subscription while hs_invoice_creation is turned on.
Error Message: Property update for hs_status not allowed for subscriptions with invoice creation enabled
When I try to change the hs_invoice_creation via api I get this messge:
Error Message: Property update for hs_invoice_creation not allowed for subscriptions with invoice creation enabled
When I try to bypass all of this by deleting (definitely not my preferred solution):
Error Message: Deleting CRM subscription with hs_invoice_creation=on is not allowed unless status is expired or canceled
Can someone please let me know if there is a way to break this logic loop?
Best,
Lisle
Hey, @LisleBuckley
I’d suggest submitting this to the Developer Feedback form. While it is not a direct support form, it will get this issue on to the Developer and Product teams more directly. — Jaycee
Hi @LisleBuckley @Jaycee_Lewis
I am having the same issue. How can I cancel a subscription via the API which has invoicing enabled?
Any updates on this issue?
Best regards
Arjan
Hi @ArjanVerma and welcome, we are so glad to have you here!
Thanks for asking the HubSpot Community!
Here is an article on the topic, for information: “Edit subscriptions billed in HubSpot”.
There is a workaround from @GLePage on this post “Cancel User Payment Subscription from external app” that you may want to look at.
Also, I’ve noticed a similar idea already present in our Ideas Forum: Allow Payment Subscriptions To Be Cancelled Using Workflows.
To contribute, you can upvote the existing idea and share more details about your specific use case in the comments.
I have added my vote.
I’d love to ask our Top Experts: Hi @sylvain_tirreau and @Anton can you think of other workarounds to help @ArjanVerma, please?
Thanks so much in advance for your help!
Have a great day!
Bérangère
Thanks for the reply @BérangèreL
Unfortunately, I cannot use workflows.
I tried using the DELETE function from the API, but I get the error message that for invoice based subscriptions I am not able to delete the subscription.
Invoicing is an important feature that we need.
Since the user can start the subscription itself, by the payment link I think it is crucial to be able to manage the subscription. Like pausing or at least cancelling is very important. Any additional information on this?
Hi @ArjanVerma, thanks for getting back to me.
I understand how important this feature is for you, in that case I recommend to upvote the Idea I shared in previous comments and to share this via the HubSpot Developer Feedback form so that the right Team can review this.
Thanks for your contribution!
Bérangère
I’ve hit the same loop with hs_invoice_creation enabled. Right now, HubSpot doesn’t let you directly flip hs_status or hs_invoice_creation once invoices are tied to the subscription. The workaround that worked for me was: Cancel the subscription via Commerce API endpoints instead of directly updating hs_status. If cancellation fails, mark the subscription inactive through the associated payment object, then retry. In some cases, support had to manually unlock the subscription on their end — worth opening a ticket if neither of the above works.
Hey, @Floydmarks
thank you for sharing your work around. If you or @LisleBuckley @ArjanVerma haven’t submitted this unexpected API behaviour to the developer feedback form, please consider it. It is not a support form, but it is the best way to get developer-related feedback to correct internal teams. — Jaycee
Which endpoint are you referring to?
Hey @JLagorio - thanks for following up here!
To clarify - are you requesting this information from @LisleBuckley?
Shane, Senior Community Moderator
Hi!
No, sorry, I was trying to respond to the comment below.
Floydmarks
I’ve hit the same loop with hs_invoice_creation enabled. Right now, HubSpot doesn’t let you directly flip hs_status or hs_invoice_creation once invoices are tied to the subscription. The workaround that worked for me was: Cancel the subscription via Commerce API endpoints instead of directly updating hs_status. If cancellation fails, mark the subscription inactive through the associated payment object, then retry. In some cases, support had to manually unlock the subscription on their end — worth opening a ticket if neither of the above works.
Hey @JLagorio - thanks for clarifying!
Tagging in @Floydmarks here to see if they have any insight on this request!
Shane, Senior Community Moderator