SubscriptionContract object

Represents a Subscription Contract.

Required access

Requires either all_subscription_contracts or own_subscription_contracts scope.

On this page

Connections

  • billingAttempts ([SubscriptionBillingAttemptConnection!](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptionbillingattempt))
    The list of billing attempts associated with the subscription contract.
Argument Description
after
(
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)

)
Returns the elements that come after the specified cursor.
before
(
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)

)
Returns the elements that come before the specified cursor.
first
(
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)

)
Returns up to the first n elements from the list.
last
(
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)

)
Returns up to the last n elements from the list.
reverse
(
[Boolean](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01)

)
Reverse the order of the underlying list.
Default value: false
  • discounts ([SubscriptionManualDiscountConnection!](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptionmanualdiscount))
    The list of subscription discounts associated with the subscription contract.
Argument Description
after
(
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)

)
Returns the elements that come after the specified cursor.
before
(
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)

)
Returns the elements that come before the specified cursor.
first
(
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)

)
Returns up to the first n elements from the list.
last
(
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)

)
Returns up to the last n elements from the list.
reverse
(
[Boolean](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01)

)
Reverse the order of the underlying list.
Default value: false
  • lines ([SubscriptionLineConnection!](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptionline))
    The list of subscription lines associated with the subscription contract.
Argument Description
after
(
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)

)
Returns the elements that come after the specified cursor.
before
(
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)

)
Returns the elements that come before the specified cursor.
first
(
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)

)
Returns up to the first n elements from the list.
last
(
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)

)
Returns up to the last n elements from the list.
reverse
(
[Boolean](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01)

)
Reverse the order of the underlying list.
Default value: false
  • orders ([OrderConnection!](https://shopify.dev/docs/admin-api/graphql/reference/orders/order))
    The list of orders associated with the subscription contract.
Argument Description
after
(
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)

)
Returns the elements that come after the specified cursor.
before
(
[String](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)

)
Returns the elements that come before the specified cursor.
first
(
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)

)
Returns up to the first n elements from the list.
last
(
[Int](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01)

)
Returns up to the last n elements from the list.
reverse
(
[Boolean](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01)

)
Reverse the order of the underlying list.
Default value: false
  • Fields

  • app ([App](https://shopify.dev/docs/admin-api/graphql/reference/apps/app))
    The subscription app that this subscription contract is registered to.
  • appAdminUrl ([URL](https://shopify.dev/docs/admin-api/graphql/reference/scalar#url-2021-01))
    URL of the subscription contract page on the subscription app.
  • billingPolicy ([SubscriptionBillingPolicy!](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptionbillingpolicy))
    The billing policy associated with the subscription contract.
  • createdAt ([DateTime!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#datetime-2021-01))
    The date and time when the subscription contract was created.
  • currencyCode ([CurrencyCode!](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/currencycode))
    The currency used for the subscription contract.
  • customer ([Customer](https://shopify.dev/docs/admin-api/graphql/reference/customers/customer))
    The customer to whom the subscription contract belongs.
  • customerPaymentMethod ([CustomerPaymentMethod](https://shopify.dev/docs/admin-api/graphql/reference/customers/customerpaymentmethod))
    The customer payment method used for the subscription contract.
Argument Description
showRevoked
(
[Boolean](https://shopify.dev/docs/admin-api/graphql/reference/scalar#boolean-2021-01)

)
Whether to show the customer’s revoked payment method.
Default value: false
  • deliveryMethod ([SubscriptionDeliveryMethod](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptiondeliverymethod))
    The delivery method for each billing of the subscription contract.
  • deliveryPolicy ([SubscriptionDeliveryPolicy!](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptiondeliverypolicy))
    The delivery policy associated with the subscription contract.
  • deliveryPrice ([MoneyV2!](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/moneyv2))
    The delivery price for each billing of the subscription contract.
  • id ([ID!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#id-2021-01))
    Globally unique identifier.
  • lastPaymentStatus ([SubscriptionContractLastPaymentStatus](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptioncontractlastpaymentstatus))
    The current status of the last payment.
  • lineCount ([Int!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#int-2021-01))
    The number of lines associated with the subscription contract.
  • nextBillingDate ([DateTime](https://shopify.dev/docs/admin-api/graphql/reference/scalar#datetime-2021-01))
    The next billing date for the subscription contract.
  • originOrder ([Order](https://shopify.dev/docs/admin-api/graphql/reference/orders/order))
    The order from which this contract originated.
  • status ([SubscriptionContractSubscriptionStatus!](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptioncontractsubscriptionstatus))
    The current status of the subscription contract.
  • updatedAt ([DateTime!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#datetime-2021-01))
    The date and time when the subscription contract was updated.

Types that return SubscriptionContract

  • [Customer.subscriptionContracts](https://shopify.dev/docs/admin-api/graphql/reference/customers/customer#subscriptioncontracts-2021-01)
  • [CustomerPaymentMethod.subscriptionContracts](https://shopify.dev/docs/admin-api/graphql/reference/customers/customerpaymentmethod#subscriptioncontracts-2021-01)
  • [LineItem.contract](https://shopify.dev/docs/admin-api/graphql/reference/orders/lineitem#contract-2021-01)
  • [QueryRoot.subscriptionContract](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/queryroot#subscriptioncontract-2021-01)
  • [QueryRoot.subscriptionContracts](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/queryroot#subscriptioncontracts-2021-01)
  • [SubscriptionBillingAttempt.subscriptionContract](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptionbillingattempt#subscriptioncontract-2021-01)
  • [SubscriptionDraft.originalContract](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptiondraft#originalcontract-2021-01)

Mutations for SubscriptionContract

Implements

  • [Node](https://shopify.dev/docs/admin-api/graphql/reference/common-objects/node)

An auto-generated type for paginating through multiple SubscriptionContracts.

On this page

Fields

  • edges ([[SubscriptionContractEdge!]!](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptioncontract))
    A list of edges.
  • pageInfo ([PageInfo!](https://shopify.dev/docs/admin-api/graphql/reference/pageinfo))
    Information to aid in pagination.

An auto-generated type which holds one SubscriptionContract and a cursor during pagination.

On this page

Fields

  • cursor ([String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01))
    A cursor for use in pagination.
  • node ([SubscriptionContract!](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptioncontract))
    The item at the end of SubscriptionContractEdge.

Types that return SubscriptionContractEdge

  • [SubscriptionContractConnection.edges](https://shopify.dev/docs/admin-api/graphql/reference/orders/subscriptioncontract#edges-2021-01)