Subscription
A customer's subscription to a subscription plan. It generates subscription orders on the plan's schedule.
type Subscription {
availableSubscriptionPlans: [SubscriptionPlan!]!
backlogSize: SubscriptionBacklogSize!
billingBehaviour: SubscriptionBillingBehaviour!
cancelAt: Timestamp
cancelEvent: SubscriptionEvent
cancelledAt: ISO8601DateTime
channel: Channel!
createdAt: Timestamp!
currency: CurrencyCode!
customAttributes: [CustomAttribute!]!
customer: Customer!
deliveryBehaviour: SubscriptionDeliveryBehaviour!
deliveryMethod: SubscriptionDeliveryMethod
events(
after: String
before: String
first: Int
last: Int
): SubscriptionEventConnection!
exchangeRate: Float
externalId: String
healthBreakdown: [SubscriptionHealthCheck!]!
healthLastCheckedAt: Timestamp
healthStatus: SubscriptionHealthStatus!
id: GlobalID!
identifier: String!
inventoryBehaviour: SubscriptionInventoryBehaviour!
lastProcessedOrder(ignoreSkipped: Boolean = true): SubscriptionOrder
lines: [SubscriptionLine!]
modelId: String
multiCurrency: Boolean!
nextBillingAt: Timestamp
nextDeliveryAt: Timestamp
nextScheduledOrder(ignoreSkipped: Boolean = true): SubscriptionOrder
notes: String
order: Order
pauseEvent: SubscriptionEvent
paymentMethod: PaymentMethod
pendingCancellation: Boolean!
presentmentCurrency: CurrencyCode!
pricingBehaviour: SubscriptionPricingBehaviour!
processedSubscriptionOrdersCount: Count!
restoreEvent: SubscriptionEvent
resumeEvent: SubscriptionEvent
revertScheduledCancellationEvent: SubscriptionEvent
scheduleCancellationEvent: SubscriptionEvent
shopCurrency: CurrencyCode!
source: SubscriptionSource!
status: SubscriptionStatus!
subscriptionAnchor: SubscriptionAnchor!
subscriptionDiscounts: [SubscriptionDiscount!]!
subscriptionGroup: SubscriptionGroup!
subscriptionOrders(
after: String
before: String
first: Int
last: Int
): SubscriptionOrderConnection!
subscriptionPlan: SubscriptionPlan!
updatedAt: Timestamp!
}
Fields
Subscription.availableSubscriptionPlans ● [SubscriptionPlan!]! non-null object types
The subscription plans in the same plan group as the subscription's current plan. Deleted plans are left out.
Subscription.backlogSize ● SubscriptionBacklogSize! non-null object types
How far ahead the subscription's upcoming orders are generated, as a number of cycles or a length of time.
Subscription.billingBehaviour ● SubscriptionBillingBehaviour! non-null object types
When the subscription's orders are billed and processed, relative to their delivery date.
Subscription.cancelAt ● Timestamp scalar types
The date and time when the subscription is scheduled to be cancelled.
Subscription.cancelEvent ● SubscriptionEvent object types
The most recent event that cancelled the subscription.
Subscription.cancelledAt ● ISO8601DateTime scalar types
The date and time when the subscription was last cancelled.
Subscription.channel ● Channel! non-null object types
The channel the subscription belongs to.
Subscription.createdAt ● Timestamp! non-null scalar types
The date and time when the subscription was created.
Subscription.currency ● CurrencyCode! non-null enum types
The subscription's currency.
Subscription.customAttributes ● [CustomAttribute!]! non-null object types
The subscription's custom attributes.
Subscription.customer ● Customer! non-null object types
The customer the subscription belongs to.
Subscription.deliveryBehaviour ● SubscriptionDeliveryBehaviour! non-null object types
How delivery dates are set for the subscription's orders.
Subscription.deliveryMethod ● SubscriptionDeliveryMethod union types
How the subscription's orders are delivered. Null unless the delivery method is shipping.
Subscription.events ● SubscriptionEventConnection! non-null object types
The events recorded for the subscription, its orders and its discounts.
Subscription.events.after ● String scalar types
Returns the elements in the list that come after the specified cursor.
Subscription.events.before ● String scalar types
Returns the elements in the list that come before the specified cursor.
Subscription.events.first ● Int scalar types
Returns the first _n_ elements from the list.
Subscription.events.last ● Int scalar types
Returns the last _n_ elements from the list.
Subscription.exchangeRate ● Float scalar types
The exchange rate between the shop currency and the presentment currency.
Subscription.externalId ● String scalar types
The subscription's ID in the channel, such as a Shopify subscription contract ID.
Subscription.healthBreakdown ● [SubscriptionHealthCheck!]! non-null object types
The result of each health check from the latest diagnosis.
Subscription.healthLastCheckedAt ● Timestamp scalar types
The date and time when the subscription's health was last checked.
Subscription.healthStatus ● SubscriptionHealthStatus! non-null enum types
The subscription's overall health, based on its most serious health check result.
Subscription.id ● GlobalID! non-null scalar types
The subscription's ID.
Subscription.identifier ● String! non-null scalar types
The subscription's human-readable identifier, such as #1042.
Subscription.inventoryBehaviour ● SubscriptionInventoryBehaviour! non-null object types
How the subscription's orders affect inventory.
Subscription.lastProcessedOrder ● SubscriptionOrder object types
The subscription's most recently processed order. Null if only the initial order has been processed.
Subscription.lastProcessedOrder.ignoreSkipped ● Boolean scalar types
Whether to leave out skipped subscription orders.
Subscription.lines ● [SubscriptionLine!] list object types
The subscription's lines. Deleted lines are left out.
Subscription.modelId ● String scalar types
The subscription's ID without the global ID prefix.
Subscription.multiCurrency ● Boolean! non-null scalar types
Whether the subscription's presentment currency differs from the shop currency.
Subscription.nextBillingAt ● Timestamp scalar types
The date and time when the subscription's next order is billed. Skipped orders are ignored.
Subscription.nextDeliveryAt ● Timestamp scalar types
The expected delivery date and time of the subscription's next order. Skipped orders are ignored.
Subscription.nextScheduledOrder ● SubscriptionOrder object types
The subscription's next scheduled order.
Subscription.nextScheduledOrder.ignoreSkipped ● Boolean scalar types
Whether to leave out skipped subscription orders.
Subscription.notes ● String scalar types
Free-text notes about the subscription.
Subscription.order ● Order object types
The order the subscription was created from, if any.
Subscription.pauseEvent ● SubscriptionEvent object types
The most recent event that paused the subscription.
Subscription.paymentMethod ● PaymentMethod object types
The payment method that pays for the subscription's orders.
Subscription.pendingCancellation ● Boolean! non-null scalar types
Whether the subscription has a scheduled cancellation that hasn't happened yet.
Subscription.presentmentCurrency ● CurrencyCode! non-null enum types
The currency the customer pays in.
Subscription.pricingBehaviour ● SubscriptionPricingBehaviour! non-null object types
How prices are set for the subscription's orders.
Subscription.processedSubscriptionOrdersCount ● Count! non-null scalar types
The number of the subscription's orders that have been processed. Skipped orders and the initial order aren't counted.
Subscription.restoreEvent ● SubscriptionEvent object types
The most recent event that restored the subscription after it was cancelled.
Subscription.resumeEvent ● SubscriptionEvent object types
The most recent event that resumed the subscription after a pause.
Subscription.revertScheduledCancellationEvent ● SubscriptionEvent object types
The most recent event that removed the subscription's scheduled cancellation.
Subscription.scheduleCancellationEvent ● SubscriptionEvent object types
The most recent event that scheduled the subscription's cancellation.
Subscription.shopCurrency ● CurrencyCode! non-null enum types
The shop's currency.
Subscription.source ● SubscriptionSource! non-null object types
Where the subscription came from, such as a checkout order, the API or an import.
Subscription.status ● SubscriptionStatus! non-null enum types
The subscription's status.
Subscription.subscriptionAnchor ● SubscriptionAnchor! non-null object types
The anchor that sets the subscription's delivery dates.
Subscription.subscriptionDiscounts ● [SubscriptionDiscount!]! non-null object types
The discounts applied to the subscription. Pending discounts are left out.
Subscription.subscriptionGroup ● SubscriptionGroup! non-null object types
The group of subscriptions this subscription was created with, such as from the same checkout.
Subscription.subscriptionOrders ● SubscriptionOrderConnection! non-null object types
The subscription's orders, in cycle order.
Subscription.subscriptionOrders.after ● String scalar types
Returns the elements in the list that come after the specified cursor.
Subscription.subscriptionOrders.before ● String scalar types
Returns the elements in the list that come before the specified cursor.
Subscription.subscriptionOrders.first ● Int scalar types
Returns the first _n_ elements from the list.
Subscription.subscriptionOrders.last ● Int scalar types
Returns the last _n_ elements from the list.
Subscription.subscriptionPlan ● SubscriptionPlan! non-null object types
The subscription plan the subscription is on.
Subscription.updatedAt ● Timestamp! non-null scalar types
The date and time when the subscription was last updated.
Returned By
subscription query
Member Of
Order object ● SubscriptionCancelPayload object ● SubscriptionConnection object ● SubscriptionDiagnosePayload object ● SubscriptionDiscount object ● SubscriptionDiscountApplyPayload object ● SubscriptionDiscountValidatePayload object ● SubscriptionEdge object ● SubscriptionEvent object ● SubscriptionGroup object ● SubscriptionLine object ● SubscriptionLineAddPayload object ● SubscriptionLineRemovePayload object ● SubscriptionLineSetQuantityPayload object ● SubscriptionOrder object ● SubscriptionPausePayload object ● SubscriptionReschedulePayload object ● SubscriptionRestorePayload object ● SubscriptionResumePayload object ● SubscriptionRevertScheduledCancellationPayload object ● SubscriptionSetSchedulePayload object ● SubscriptionUpdatePayload object