Subscription billing cycle schedule edit mutation: fails with message "Contract with billing cycle subscription contract is invalid"

as per subscriptionBillingCycleScheduleEdit - GraphQL Admin

I am trying to change a billingAttemptExpectedDate to be within the cycleStartAt and cycleEndAt for a particular cycle.

for instance this particular subscriptionBillingCycle

{
          "node": {
            "cycleIndex": 1,
            "status": "UNBILLED",
            "billingAttemptExpectedDate": "2026-12-02T16:00:00Z",
            "cycleStartAt": "2025-12-02T16:28:41Z",
            "cycleEndAt": "2026-12-02T16:00:00Z",
            "skipped": false
          }
        }

passing the following variables into subscriptionBillingCycleScheduleEdit mutation

{
  "contractId": "gid://shopify/SubscriptionContract/21549318486",
  "index": 1,
  "date": "2026-11-02T16:30:00Z"
}

I receive the following response

{
    "subscriptionBillingCycleScheduleEdit": {
      "billingCycle": null,
      "userErrors": [
        {
          "code": "INVALID",
          "field": [
            "billingCycleInput",
            "contractId"
          ],
          "message": "Contract with billing cycle subscription contract is invalid"
        }
      ]
    }
  }

This same behaviour happens regardless of the index, or the time.

Please advise :slight_smile:

1 Like

I’m having the exact same issue here.

Hey @Jon_Reeves and @Miguel_Hernanz, I was able to reproduce this exact error just now in my test store. The most likely cause is that your contract is a prepaid subscription - the billing cycles docs explicitly state you can’t edit billing cycles on prepaid contracts.

A contract is prepaid when the billing interval differs from the delivery interval (e.g., bill every 3 months, deliver monthly). I created two test contracts - a pay-per-delivery one worked fine with subscriptionBillingCycleScheduleEdit, but a prepaid one returned your exact error.

Can you check your contract’s billingPolicy.intervalCount vs deliveryPolicy.intervalCount? If they’re different, that’s your answer - this mutation just doesn’t support prepaid subscriptions.

If they are the same (meaning it’s not prepaid), share the x-request-id from the response headers and I can dig into the logs to see what else might be blocking it. Thanks!

@Donal-Shopify Amazing thank you so much! I had not set the delivery interval to match the billing interval. I have done so now and it works as expected and fits my use case perfectly

1 Like