Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

[BUG] Billing Cycle Error Blocking Subscription Billings and Updates

[BUG] Billing Cycle Error Blocking Subscription Billings and Updates

Brian_S
Shopify Partner
170 21 44

Hi - we've recently run into an issue where we can't update or create billing attempts for a subscription and are receiving the following error: 

 

{
	"code": "INVALID",
	"field": null,
	"message": "Validation failed: Billing cycles cycle index of value 3 already exists."
}

 

 

We've never edited this subscriptions Billing Cycles and can't figure out how to set it back to a normal state. It seems that possibly Shopify may have updated billing cycles incorrectly during or after the previous billing of the subscription (because this hasn't been an issue for this subscriptions prior to its last billing).  Unfortunately since I know that we didn't manipulate the billing cycles I have very little in terms of "steps to reproduce" the issue but we've already seen a few instances in a very short period of time. Is there anyway for the Shopify Eng team to figure out how this happened so we can be sure it's prevented in the future and how it could get put back in a good state for the subscriptions that we know its an issue on?  Also - any ideas on how to remedy the currently broken subscriptions would be much appreciated. 

 

One thing we've seen them have in common is two billing attempts that were created very close to each other (timewise). 

 

One strange thing to note: We can update the next billing date if we use the `subscriptionContractSetNextBillingDate` mutation but if we try to create a draft, update the nextBillingDate on the draft and then commit the draft it fails with that error. 

 

 

Example Subscription with this issue: 

gid://shopify/SubscriptionContract/10384539730

 

x-request-id of a failed contract draft commit

61164256-0c5e-4b6b-b311-9d8b3dd648c6

 

Thanks in advance for any support or advice!

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic
Replies 5 (5)

Brian_S
Shopify Partner
170 21 44

Just adding more information to this - we can't cancel these subs either. We get this error message: 

{
      "message": "An internal error has occurred.",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "subscriptionContractCancel"
      ]
    }

 

request iddf2ecbe6-128e-4308-9eaf-ba061439ea0c

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic

qc11
Shopify Staff (Retired)
47 14 12

Hi Brian_S, thanks for reporting. We will look into it!

To learn more visit the Shopify Help Center or the Community Blog.

Brian_S
Shopify Partner
170 21 44

Thanks @qc11 - looking forward to hearing back because we're still seeing it on these same subscriptions. 

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic
Brian_S
Shopify Partner
170 21 44

@qc11  we're still seeing this issue on more subs.  Here's a new sub that has billing cycles blocking updates even though we've never updated billing cycles: gid://shopify/SubscriptionContract/4996595794

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic
Brian_S
Shopify Partner
170 21 44

@qc11  any updates? 

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic