Commerce Tools

LisleBuckley
Member

Cancelling an active subscription via API

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: https://app.hubspot.com/product-updates/45051528/in-beta?query=sub&rollout=206901
  • 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

0 Upvotes
1 Reply 1
Jaycee_Lewis
Community Manager
Community Manager

Cancelling an active subscription via API

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


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 Upvotes