Skip to main content
object

Requires read_own_subscription_contracts access scope.

The SubscriptionDraft object represents a draft version of a subscription contract before it's committed. It serves as a staging area for making changes to an existing subscription or creating a new one. The draft allows you to preview and modify various aspects of a subscription before applying the changes.

Use the SubscriptionDraft object to:

  • Add, remove, or modify subscription lines and their quantities
  • Manage discounts (add, remove, or update manual and code-based discounts)
  • Configure delivery options and shipping methods
  • Set up billing and delivery policies
  • Manage customer payment methods
  • Add custom attributes and notes to generated orders
  • Configure billing cycles and next billing dates
  • Preview the projected state of the subscription

Each SubscriptionDraft object maintains a projected state that shows how the subscription will look after the changes are committed. This allows you to preview the impact of your modifications before applying them. The draft can be associated with an existing subscription contract (for modifications) or used to create a new subscription.

The draft remains in a draft state until it's committed, at which point the changes are applied to the subscription contract and the draft is no longer accessible.

Learn more about how subscription contracts work and how to build, update, and combine subscription contracts.

•SubscriptionBillingCycle

The billing cycle that the subscription contract will be associated with.

•SubscriptionBillingPolicy!
non-null

The billing policy for the subscription contract.

Anchor to concatenatedBillingCyclesconcatenatedBillingCycles
•SubscriptionBillingCycleConnection!
non-null

The billing cycles of the contracts that will be concatenated to the subscription contract.

Arguments

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

•SubscriptionBillingCyclesSortKeys
Default:CYCLE_INDEX

Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.


•CurrencyCode!
non-null

The currency used for the subscription contract.

•[Attribute!]!
non-null

A list of the custom attributes to be added to the generated orders.

•Customer!
non-null

The customer to whom the subscription contract belongs.

Anchor to customerPaymentMethodcustomerPaymentMethod
•CustomerPaymentMethod

The customer payment method used for the subscription contract.

Arguments

•Boolean
Default:false

Whether to show the customer's revoked payment method.


•SubscriptionDeliveryMethod

The delivery method for each billing of the subscription contract.

•SubscriptionDeliveryOptionResult

The available delivery options for a given delivery address. Returns null for pending requests.

•SubscriptionDeliveryPolicy!
non-null

The delivery policy for the subscription contract.

•MoneyV2

The delivery price for each billing the subscription contract.

•SubscriptionDiscountConnection!
non-null

The list of subscription discounts which will be associated with the subscription contract.

Arguments

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.


•SubscriptionDiscountConnection!
non-null

The list of subscription discounts to be added to the subscription contract.

Arguments

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.


•SubscriptionDiscountConnection!
non-null

The list of subscription discounts to be removed from the subscription contract.

Arguments

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.


•SubscriptionDiscountConnection!
non-null

The list of subscription discounts to be updated on the subscription contract.

Arguments

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.


•ID!
non-null

A globally-unique ID.

•SubscriptionLineConnection!
non-null

The list of subscription lines which will be associated with the subscription contract.

Arguments

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.


•SubscriptionLineConnection!
non-null

The list of subscription lines to be added to the subscription contract.

Arguments

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.


•SubscriptionLineConnection!
non-null

The list of subscription lines to be removed from the subscription contract.

Arguments

•Int

The first n elements from the paginated list.

•String

The elements that come after the specified cursor.

•Int

The last n elements from the paginated list.

•String

The elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.


•DateTime

The next billing date for the subscription contract.

•String

The note field that will be applied to the generated orders.

•SubscriptionContract

The original subscription contract.

•SubscriptionContractSubscriptionStatus

The current status of the subscription contract.

•SubscriptionShippingOptionResult
Deprecated

Was this section helpful?

•query

Returns a Subscription Draft resource by ID.

Arguments

•ID!
required

The ID of the Subscription Draft to return.



Was this section helpful?

•mutation

Concatenates a contract to a Subscription Draft.

Arguments

•ID!
required

The gid of the Subscription Contract draft to update.

Anchor to concatenatedBillingCycleContractsconcatenatedBillingCycleContracts
•[SubscriptionBillingCycleInput!]!
required

An array of Subscription Contracts with their selected billing cycles to concatenate to the subscription draft.


•mutation

Edit the contents of a subscription contract for the specified billing cycle.

Arguments

•SubscriptionBillingCycleInput!
required

Input object for selecting and using billing cycles.


•mutation

Creates a subscription contract draft, which is an intention to create a new subscription. The draft lets you incrementally build and modify subscription details before committing them to create the actual SubscriptionContract.

The mutation requires Customer information, billing details, and contract configuration including the SubscriptionBillingPolicy and SubscriptionDeliveryPolicy. You can specify the CustomerPaymentMethod, the MailingAddress for shipping, and subscription intervals.

After you create the draft, you can either modify it with the subscriptionDraftUpdate mutation or finalize and create the active subscription contract with subscriptionDraftCommit.

Learn more about building subscription contracts.

Arguments

•SubscriptionContractCreateInput!
required

The properties of the new Subscription Contract.


•mutation

Creates a draft of an existing SubscriptionContract. The draft captures the current state of the contract and allows incremental modifications through draft mutations such as subscriptionDraftLineAdd, subscriptionDraftDiscountAdd, and subscriptionDraftUpdate.

Changes remain in draft state and don't affect the live contract until committed. After you've made all necessary changes to the draft, commit it using subscriptionDraftCommit to apply the updates to the original contract.

Learn more about updating subscription contracts.

Arguments

•ID!
required

The gid of the Subscription Contract to update.


•mutation

Adds a subscription discount to a subscription draft.

Arguments

•ID!
required

The ID of the Subscription Contract draft to add a subscription discount to.

•SubscriptionManualDiscountInput!
required

The properties of the new Subscription Discount.


•mutation

Applies a code discount on the subscription draft.

Arguments

•ID!
required

The gid of the subscription contract draft to apply a subscription code discount on.

•String!
required

Code discount redeem code.


•mutation

Removes a subscription discount from a subscription draft.

Arguments

•ID!
required

The gid of the subscription contract draft to remove a subscription discount from.

•ID!
required

The gid of the subscription draft discount to remove.


•mutation

Updates a subscription discount on a subscription draft.

Arguments

•ID!
required

The ID of the Subscription Contract draft to update a subscription discount on.

•ID!
required

The gid of the Subscription Discount to update.

•SubscriptionManualDiscountInput!
required

The properties to update on the Subscription Discount.


•mutation

Adds a subscription free shipping discount to a subscription draft.

Arguments

•ID!
required

The ID of the subscription contract draft to add a subscription free shipping discount to.

•SubscriptionFreeShippingDiscountInput!
required

The properties of the new subscription free shipping discount.


•mutation

Updates a subscription free shipping discount on a subscription draft.

Arguments

•ID!
required

The ID of the Subscription Contract draft to update a subscription discount on.

•ID!
required

The gid of the Subscription Discount to update.

•SubscriptionFreeShippingDiscountInput!
required

The properties to update on the Subscription Free Shipping Discount.


•mutation

Adds a subscription line to a subscription draft.

Arguments

•ID!
required

The gid of the Subscription Contract draft to add a subscription line to.

•SubscriptionLineInput!
required

The properties of the new Subscription Line.


•mutation

Removes a subscription line from a subscription draft.

Arguments

•ID!
required

The gid of the Subscription Contract draft to remove a subscription line from.

•ID!
required

The gid of the Subscription Line to remove.


•mutation

Updates a subscription line on a subscription draft.

Arguments

•ID!
required

The gid of the Subscription Contract draft to update a subscription line from.

•ID!
required

The gid of the Subscription Line to update.

•SubscriptionLineUpdateInput!
required

The properties of the new Subscription Line.


•mutation

Updates a Subscription Draft.

Arguments

•ID!
required

The gid of the Subscription Draft to update.

•SubscriptionDraftInput!
required

The properties of the new Subscription Contract.



Was this section helpful?

•interface

Was this section helpful?