---
title: SubscriptionContract - Customer API
description: A Subscription Contract.
api_version: unstable
api_name: customer
source_url:
  html: 'https://shopify.dev/docs/api/customer/unstable/objects/SubscriptionContract'
  md: >-
    https://shopify.dev/docs/api/customer/unstable/objects/SubscriptionContract.md
---

# Subscription​Contract

object

A Subscription Contract.

## Fields

* billing​Policy

  [Subscription​Billing​Policy!](https://shopify.dev/docs/api/customer/unstable/objects/SubscriptionBillingPolicy)

  non-null

  The billing policy associated with the subscription contract.

* created​At

  [Date​Time!](https://shopify.dev/docs/api/customer/unstable/scalars/DateTime)

  non-null

  The date and time when the subscription contract was created.

* currency​Code

  [Currency​Code!](https://shopify.dev/docs/api/customer/unstable/enums/CurrencyCode)

  non-null

  The currency used for the subscription contract.

* custom​Attributes

  [\[Attribute!\]!](https://shopify.dev/docs/api/customer/unstable/objects/Attribute)

  non-null

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

* delivery​Method

  [Subscription​Delivery​Method](https://shopify.dev/docs/api/customer/unstable/unions/SubscriptionDeliveryMethod)

  The delivery method for each billing of the subscription contract.

* delivery​Policy

  [Subscription​Delivery​Policy!](https://shopify.dev/docs/api/customer/unstable/objects/SubscriptionDeliveryPolicy)

  non-null

  The delivery policy associated with the subscription contract.

* delivery​Price

  [Money​V2!](https://shopify.dev/docs/api/customer/unstable/objects/MoneyV2)

  non-null

  The delivery price for each billing of the subscription contract.

* discounts

  [Subscription​Discount​Connection](https://shopify.dev/docs/api/customer/unstable/connections/SubscriptionDiscountConnection)

  The list of subscription discounts associated with the subscription contract.

  * first

    [Int](https://shopify.dev/docs/api/customer/unstable/scalars/Int)

    ### Arguments

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * after

    [String](https://shopify.dev/docs/api/customer/unstable/scalars/String)

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/customer/unstable/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/customer/unstable/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * reverse

    [Boolean](https://shopify.dev/docs/api/customer/unstable/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  ***

* id

  [ID!](https://shopify.dev/docs/api/customer/unstable/scalars/ID)

  non-null

  A globally-unique ID.

* last​Billing​Attempt​Error​Type

  [Subscription​Contract​Last​Billing​Error​Type](https://shopify.dev/docs/api/customer/unstable/enums/SubscriptionContractLastBillingErrorType)

  The last billing error type of the contract.

* last​Payment​Status

  [Subscription​Contract​Last​Payment​Status](https://shopify.dev/docs/api/customer/unstable/enums/SubscriptionContractLastPaymentStatus)

  The current status of the last payment.

* lines

  [Subscription​Line​Connection!](https://shopify.dev/docs/api/customer/unstable/connections/SubscriptionLineConnection)

  non-null

  A list of subscription lines associated with the subscription contract.

  * first

    [Int](https://shopify.dev/docs/api/customer/unstable/scalars/Int)

    ### Arguments

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * after

    [String](https://shopify.dev/docs/api/customer/unstable/scalars/String)

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/customer/unstable/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/customer/unstable/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * reverse

    [Boolean](https://shopify.dev/docs/api/customer/unstable/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  ***

* lines​Count

  [Count](https://shopify.dev/docs/api/customer/unstable/objects/Count)

  The number of lines associated with the subscription contract.

* next​Billing​Date

  [Date​Time](https://shopify.dev/docs/api/customer/unstable/scalars/DateTime)

  The next billing date for the subscription contract.

* note

  [String](https://shopify.dev/docs/api/customer/unstable/scalars/String)

  A note that will be applied to the generated orders.

* orders

  [Order​Connection!](https://shopify.dev/docs/api/customer/unstable/connections/OrderConnection)

  non-null

  A list of the subscription contract's orders.

  * first

    [Int](https://shopify.dev/docs/api/customer/unstable/scalars/Int)

    ### Arguments

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * after

    [String](https://shopify.dev/docs/api/customer/unstable/scalars/String)

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/customer/unstable/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/customer/unstable/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * reverse

    [Boolean](https://shopify.dev/docs/api/customer/unstable/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  ***

* origin​Order

  [Order](https://shopify.dev/docs/api/customer/unstable/objects/Order)

  The order from which the contract originated.

* revision​Id

  [Unsigned​Int64!](https://shopify.dev/docs/api/customer/unstable/scalars/UnsignedInt64)

  non-null

  The revision ID of the contract.

* status

  [Subscription​Contract​Subscription​Status!](https://shopify.dev/docs/api/customer/unstable/enums/SubscriptionContractSubscriptionStatus)

  non-null

  The current status of the subscription contract.

* upcoming​Billing​Cycles

  [Subscription​Billing​Cycle​Connection!](https://shopify.dev/docs/api/customer/unstable/connections/SubscriptionBillingCycleConnection)

  non-null

  The upcoming billing cycles on the subscription contract.

  * first

    [Int](https://shopify.dev/docs/api/customer/unstable/scalars/Int)

    ### Arguments

    The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * after

    [String](https://shopify.dev/docs/api/customer/unstable/scalars/String)

    The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * last

    [Int](https://shopify.dev/docs/api/customer/unstable/scalars/Int)

    The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).

  * before

    [String](https://shopify.dev/docs/api/customer/unstable/scalars/String)

    The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).

  * reverse

    [Boolean](https://shopify.dev/docs/api/customer/unstable/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  * sort​Key

    [Subscription​Billing​Cycles​Sort​Keys](https://shopify.dev/docs/api/customer/unstable/enums/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](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations).

  ***

* updated​At

  [Date​Time!](https://shopify.dev/docs/api/customer/unstable/scalars/DateTime)

  non-null

  The date and time when the subscription contract was updated.

***

## Map

### Fields and connections with this object

* [Customer.subscriptionContract](https://shopify.dev/docs/api/customer/unstable/objects/Customer#field-Customer.fields.subscriptionContract)
* [Customer.subscriptionContracts](https://shopify.dev/docs/api/customer/unstable/objects/Customer#field-Customer.fields.subscriptionContracts)
* [Order.subscriptionContracts](https://shopify.dev/docs/api/customer/unstable/objects/Order#field-Order.fields.subscriptionContracts)
* [SubscriptionContractConnection.nodes](https://shopify.dev/docs/api/customer/unstable/connections/SubscriptionContractConnection#returns-nodes)
* [SubscriptionContractEdge.node](https://shopify.dev/docs/api/customer/unstable/objects/SubscriptionContractEdge#field-SubscriptionContractEdge.fields.node)

***

## Mutations

* [subscription​Contract​Activate](https://shopify.dev/docs/api/customer/unstable/mutations/subscriptionContractActivate)

  mutation

  Activates a Subscription Contract. Contract status must be either active, paused, or failed.

  * subscription​Contract​Id

    [ID!](https://shopify.dev/docs/api/customer/unstable/scalars/ID)

    required

    ### Arguments

    The ID of the subscription contract to activate.

  ***

* [subscription​Contract​Cancel](https://shopify.dev/docs/api/customer/unstable/mutations/subscriptionContractCancel)

  mutation

  Cancels a Subscription Contract.

  * subscription​Contract​Id

    [ID!](https://shopify.dev/docs/api/customer/unstable/scalars/ID)

    required

    ### Arguments

    The ID of the Subscription Contract to cancel.

  ***

* [subscription​Contract​Pause](https://shopify.dev/docs/api/customer/unstable/mutations/subscriptionContractPause)

  mutation

  Pauses a Subscription Contract.

  * subscription​Contract​Id

    [ID!](https://shopify.dev/docs/api/customer/unstable/scalars/ID)

    required

    ### Arguments

    The ID of the subscription contract to pause.

  ***

* [subscription​Contract​Select​Delivery​Method](https://shopify.dev/docs/api/customer/unstable/mutations/subscriptionContractSelectDeliveryMethod)

  mutation

  Selects an option from a delivery options result and updates the delivery method on a Subscription Contract.

  * subscription​Contract​Id

    [ID!](https://shopify.dev/docs/api/customer/unstable/scalars/ID)

    required

    ### Arguments

    The ID of the subscription contract.

  * subscription​Delivery​Options​Result​Token

    [String!](https://shopify.dev/docs/api/customer/unstable/scalars/String)

    required

    The token associated with the successfully fetched delivery options result for the subscription contract.

  * delivery​Method​Input

    [Subscription​Delivery​Method​Input!](https://shopify.dev/docs/api/customer/unstable/input-objects/SubscriptionDeliveryMethodInput)

    required

    The delivery method selected for the subscription contract.

  ***

***

## SubscriptionContract Mutations

### Mutated by

* [subscription​Contract​Activate](https://shopify.dev/docs/api/customer/unstable/mutations/subscriptionContractActivate)
* [subscription​Contract​Cancel](https://shopify.dev/docs/api/customer/unstable/mutations/subscriptionContractCancel)
* [subscription​Contract​Pause](https://shopify.dev/docs/api/customer/unstable/mutations/subscriptionContractPause)
* [subscription​Contract​Select​Delivery​Method](https://shopify.dev/docs/api/customer/unstable/mutations/subscriptionContractSelectDeliveryMethod)

***

## Interfaces

* * [Node](https://shopify.dev/docs/api/customer/unstable/interfaces/Node)

    interface

  * [Subscription​Contract​Base](https://shopify.dev/docs/api/customer/unstable/interfaces/SubscriptionContractBase)

    interface

***

## SubscriptionContract Implements

### Implements

* [Node](https://shopify.dev/docs/api/customer/unstable/interfaces/Node)
* [Subscription​Contract​Base](https://shopify.dev/docs/api/customer/unstable/interfaces/SubscriptionContractBase)
