Types > StorefrontSubscription
Storefront APITypesStorefrontSubscription
StorefrontSubscription

Description

Topic: Subscriptions

Fields

billing_address: SubscriptionParam!

Which billing address to use


billing_address_id: String!

Custom billing address identifier


created_at: String!

The date and time when the subscription was created

Example: "2014-09-04T12:23:34Z"

Timestamp (RFC 3339)


custom_billing_address: Address


custom_shipping_address: Address


customer: StorefrontCustomer

Customer this subscription belongs to

Expandable

Permission bit: "customers.read"


error: SubscriptionError!

Error state of the subscription

Example: ok


error_count: Int!

How many errors happened as a result of retry attempts

Example: 3


id: String!

Unique subscription identifier. See also: Unique Identifiers

Example: "ss_EQzGqWoY"


last_order: StorefrontOrder

Last order this subscription created

Expandable

Permission bit: "orders.read"


next_at: String!

When this subscription is due to update

Example: "2014-09-04T12:23:34Z"

Timestamp (RFC 3339)


next_offset: Int!

Seconds offset from "next_at" to accommodate for the business logic. Negative for pre-paid subscriptions, because scheduled fulfillment is created ahead of time. Positive for subscriptions in error state, this is a retry logic.

Example: 3600


origin_order: StorefrontOrder

Order this subscription originates from

Expandable

Permission bit: "orders.read"


payment_source: SubscriptionParam!

Which payment source to use


payment_source_id: String!

Custom shipping address identifier


quantity: Int!

The number of items customer subscribed to

Example: 0


shipping_address: SubscriptionParam!

Which shipping address to use


shipping_address_id: String!

Custom shipping address identifier


state: SubscriptionState!

State of the subscription


subscription_plan: SubscriptionPlan!

A subscription plan customer picked for this subscription


tick_count: Int!

How many successful ticks (billing and fulfillment events) happened for this subscription

Example: 5


variant: StorefrontProductVariant

Product variant the customer subscribed to

Expandable

Permission bit: "product_variants.read"


Used By

Mutations

storefrontSubscriptionsCancel, storefrontSubscriptionsEdit, storefrontSubscriptionsPause, storefrontSubscriptionsResume, storefrontSubscriptionsSkipNext

Queries

storefrontSubscriptions

Types

StorefrontOrderLineItem, StorefrontSubscriptionPage

Preview (typescript)

Loading module