---
title: subscriptionBillingCycleEditsDelete - GraphQL Admin
description: >-
  Delete the current and future schedule and contract edits of a list of
  subscription billing cycles.
api_version: 2026-10
source_url:
  html: >-
    https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionBillingCycleEditsDelete
  md: >-
    https://shopify.dev/docs/api/admin-graphql/latest/mutations/subscriptionBillingCycleEditsDelete.md
api_name: admin
api_type: graphql
type: mutation
---

# subscription​Billing​Cycle​Edits​Delete

mutation

Requires `write_own_subscription_contracts` access scope. Also: The user must have manage\_orders\_information permission.

Delete the current and future schedule and contract edits of a list of subscription billing cycles.

## Arguments

* contract​Id

  [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)

  required

  The globally-unique identifier of the subscription contract that the billing cycle belongs to.

* target​Selection

  [Subscription​Billing​Cycles​Target​Selection!](https://shopify.dev/docs/api/admin-graphql/latest/enums/SubscriptionBillingCyclesTargetSelection)

  required

  Select billing cycles to be deleted.

***

## Subscription​Billing​Cycle​Edits​Delete​Payload returns

* billing​Cycles

  [\[Subscription​Billing​Cycle!\]](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionBillingCycle)

  The list of updated billing cycles.

* user​Errors

  [\[Subscription​Billing​Cycle​User​Error!\]!](https://shopify.dev/docs/api/admin-graphql/latest/objects/SubscriptionBillingCycleUserError)

  non-null

  The list of errors that occurred from executing the mutation.

***

## Examples

* ### Delete the edits on the current and all future billing cycles

  #### Description

  Deletes the schedule and contract edits on the current and all future billing cycles, and reverts the schedule and contract to the information on the base subscription contract.

  #### Query

  ```graphql
  mutation subscriptionBillingCycleEditsDelete($contractId: ID!) {
    subscriptionBillingCycleEditsDelete(contractId: $contractId, targetSelection: ALL) {
      billingCycles {
        cycleStartAt
        cycleEndAt
        cycleIndex
      }
      userErrors {
        field
        message
      }
    }
  }
  ```

  #### Variables

  ```json
  {
    "contractId": "gid://shopify/SubscriptionContract/398475269"
  }
  ```

  #### cURL

  ```bash
  curl -X POST \
  https://your-development-store.myshopify.com/admin/api/2026-10/graphql.json \
  -H 'Content-Type: application/json' \
  -H 'X-Shopify-Access-Token: {access_token}' \
  -d '{
  "query": "mutation subscriptionBillingCycleEditsDelete($contractId: ID!) { subscriptionBillingCycleEditsDelete(contractId: $contractId, targetSelection: ALL) { billingCycles { cycleStartAt cycleEndAt cycleIndex } userErrors { field message } } }",
   "variables": {
      "contractId": "gid://shopify/SubscriptionContract/398475269"
    }
  }'
  ```

  #### React Router

  ```javascript
  import { authenticate } from "../shopify.server";

  export const loader = async ({request}) => {
    const { admin } = await authenticate.admin(request);
    const response = await admin.graphql(
      `#graphql
    mutation subscriptionBillingCycleEditsDelete($contractId: ID!) {
      subscriptionBillingCycleEditsDelete(contractId: $contractId, targetSelection: ALL) {
        billingCycles {
          cycleStartAt
          cycleEndAt
          cycleIndex
        }
        userErrors {
          field
          message
        }
      }
    }`,
    {
      variables: {
          "contractId": "gid://shopify/SubscriptionContract/398475269"
      },
    },
    );
    const json = await response.json();
    return json.data;
  }
  ```

  #### Ruby

  ```ruby
  session = ShopifyAPI::Auth::Session.new(
    shop: "your-development-store.myshopify.com",
    access_token: access_token
  )
  client = ShopifyAPI::Clients::Graphql::Admin.new(
    session: session
  )

  query = <<~QUERY
    mutation subscriptionBillingCycleEditsDelete($contractId: ID!) {
      subscriptionBillingCycleEditsDelete(contractId: $contractId, targetSelection: ALL) {
        billingCycles {
          cycleStartAt
          cycleEndAt
          cycleIndex
        }
        userErrors {
          field
          message
        }
      }
    }
  QUERY

  variables = {
    "contractId": "gid://shopify/SubscriptionContract/398475269"
  }

  response = client.query(query: query, variables: variables)
  ```

  #### Node.js

  ```javascript
  const client = new shopify.clients.Graphql({session});
  const data = await client.query({
    data: {
      "query": `mutation subscriptionBillingCycleEditsDelete($contractId: ID!) {
        subscriptionBillingCycleEditsDelete(contractId: $contractId, targetSelection: ALL) {
          billingCycles {
            cycleStartAt
            cycleEndAt
            cycleIndex
          }
          userErrors {
            field
            message
          }
        }
      }`,
      "variables": {
          "contractId": "gid://shopify/SubscriptionContract/398475269"
      },
    },
  });
  ```

  #### Shopify CLI

  ```bash
  shopify app execute \
  --query \
  'mutation subscriptionBillingCycleEditsDelete($contractId: ID!) {
    subscriptionBillingCycleEditsDelete(contractId: $contractId, targetSelection: ALL) {
      billingCycles {
        cycleStartAt
        cycleEndAt
        cycleIndex
      }
      userErrors {
        field
        message
      }
    }
  }' \
  --variables \
  '{
    "contractId": "gid://shopify/SubscriptionContract/398475269"
  }'
  ```

  #### Direct API Access

  ```javascript
  const response = await fetch('shopify:admin/api/2026-10/graphql.json', {
    method: 'POST',
    body: JSON.stringify({
      query: `
        mutation subscriptionBillingCycleEditsDelete($contractId: ID!) {
          subscriptionBillingCycleEditsDelete(contractId: $contractId, targetSelection: ALL) {
            billingCycles {
              cycleStartAt
              cycleEndAt
              cycleIndex
            }
            userErrors {
              field
              message
            }
          }
        }
      `,
      variables: {
          "contractId": "gid://shopify/SubscriptionContract/398475269"
      },
    }),
  });

  const { data } = await response.json();
  console.log(data);
  ```

  #### Response

  ```json
  {
    "subscriptionBillingCycleEditsDelete": {
      "billingCycles": [
        {
          "cycleStartAt": "2021-12-15T15:33:01Z",
          "cycleEndAt": "2022-01-01T12:00:00Z",
          "cycleIndex": 1
        }
      ],
      "userErrors": []
    }
  }
  ```

* ### subscriptionBillingCycleEditsDelete reference
