Skip to main content
Anchor to subscriptionContract

subscriptionContract

query

Retrieves a SubscriptionContract by ID.

The contract tracks the subscription's lifecycle through various statuses, and links to related billing attempts, generated Order objects, and the customer's CustomerPaymentMethod.

•ID!
required

The ID of the Subscription Contract to return.


Was this section helpful?

Anchor to SubscriptionContractSubscriptionContract
•SubscriptionContract

A subscription contract that defines recurring purchases for a customer. Each contract specifies what products to deliver, when to bill and ship them, and at what price.

The contract includes SubscriptionBillingPolicy and SubscriptionDeliveryPolicy that control the frequency of charges and fulfillments. SubscriptionLine items define the products, quantities, and pricing for each recurring Order. The contract tracks SubscriptionBillingAttempt records, payment status, and generated orders throughout its lifecycle. App instances manage contracts through various status transitions including active, paused, failed, cancelled, or expired states.

Learn more about building subscription contracts and updating subscription contracts.

Show fields
•App

The subscription app that the subscription contract is registered to.

Show fields
•URL

The URL of the subscription contract page on the subscription app.

•SubscriptionBillingAttemptConnection!
non-null

The list of billing attempts associated with the subscription contract.

Show fields

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•Boolean
Default:false

Reverse the order of the underlying list.


•SubscriptionBillingPolicy!
non-null

The billing policy associated with the subscription contract.

Show fields
•DateTime!
non-null

The date and time when the subscription contract was created.

•CurrencyCode!
non-null

The currency that's used for the subscription contract.

Show enum values
•[Attribute!]!
non-null

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

Show fields
•Customer

The customer to whom the subscription contract belongs.

Show fields
Anchor to customerPaymentMethodcustomerPaymentMethod
•CustomerPaymentMethod

The customer payment method that's used for the subscription contract.

Show fields

Arguments

•Boolean
Default:false

Whether to show the customer's revoked payment method.


•SubscriptionDeliveryMethod

The delivery method for each billing of the subscription contract.

Show union types
•SubscriptionDeliveryPolicy!
non-null

The delivery policy associated with the subscription contract.

Show fields
•MoneyV2!
non-null

The delivery price for each billing of the subscription contract.

Show fields
•SubscriptionManualDiscountConnection!
non-null

The list of subscription discounts associated with the subscription contract.

Show fields

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•Boolean
Default:false

Reverse the order of the underlying list.


•SubscriptionGroupedLineConnection

The list of subscription lines grouped by bundle parent, with bundle components nested under their parent line.

Show fields

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•Boolean
Default:false

Reverse the order of the underlying list.


•ID!
non-null

A globally-unique ID.

Anchor to lastBillingAttemptErrorTypelastBillingAttemptErrorType
•SubscriptionContractLastBillingErrorType

The last billing error type of the contract.

Show enum values
•SubscriptionContractLastPaymentStatus

The current status of the last payment.

Show enum values
Anchor to latestCommittedProjectedOrderTotalslatestCommittedProjectedOrderTotals
•SubscriptionContractCalculationProjectedOrderTotals

The projected order totals from the last successful commit of the subscription contract. Returns null when no projected order totals have been persisted for the contract, or the latest version was committed through a subscription draft.

Show fields
•SubscriptionLineConnection!
non-null

The list of subscription lines associated with the subscription contract.

Show fields

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•Boolean
Default:false

Reverse the order of the underlying list.


•Count

The number of lines associated with the subscription contract.

Show fields
•DateTime

The next billing date for the subscription contract. This field is managed by the apps. Alternatively you can utilize our Billing Cycles APIs, which provide auto-computed billing dates and additional functionalities.

•String

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

•OrderConnection!
non-null

A list of the subscription contract's orders.

Show fields

Arguments

•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•Boolean
Default:false

Reverse the order of the underlying list.


•Order

The order from which this contract originated.

Show fields
•UnsignedInt64!
non-null

The revision id of the contract.

•SubscriptionContractSubscriptionStatus!
non-null

The current status of the subscription contract.

Show enum values
•DateTime!
non-null

The date and time when the subscription contract was updated.

•Int!
non-nullDeprecated

Was this section helpful?