API Reference

Subscription entity

KeyTitleDescription
idintegerUnique identifier for the subscription.
shopifyIdintegerUnique identifier of the subscription in Shopify.
createdAtstring (ISO 8601 date-time)Timestamp of when the subscription was created.
statusstringRepresents the status of the subscription (e.g., "ACTIVE").
originOrderShopifyIdInteger | nullOriginal order ID from Shopify.
completedOrdersCountinteger | nullNumber of completed orders for this subscription.
currencyCodestringCurrency code in ISO 4217 format (e.g., "USD").
totalLineItemPriceintegerTotal price of the line item (in cents).
totalLineItemDiscountedPriceintegerTotal discounted price of the line item (in cents).
deliveryPriceintegerCost of delivery (in cents).
pausedAtnull | string (ISO 8601 date-time)Date and time when the subscription was paused, if applicable.
cancelledAtnull | string (ISO 8601 date-time)Date and time when the subscription was canceled, if applicable.
cancellationReasonnull | stringReason for cancellation, if provided.
cancellationCommentnull | stringAdditional comments related to the cancellation.
hasCustomPlanbooleanIndicates whether the subscription has a custom plan.

billingPolicy

KeyTypeDescription
billingPolicy.interval stringThe billing interval (e.g., "MONTH").
billingPolicy.intervalCount integerNumber of intervals between billing cycles.
billingPolicy.minCycles int | nullMinimum number of billing cycles.
billingPolicy.maxCycles int | nullMaximum number of billing cycles.
billingPolicy.anchors null | objectThe anchors object can take the following format:
For month type:
{"type": "MONTHDAY", "day": 2, "month": null}

For year type:
{"type": "YEARDAY", "day": 1, "month": 1}

For week type
{ "type": "WEEKDAY", "day": 1, "month": null}

deliveryPolicy

KeyTypeDescription
deliveryPolicy.intervalstringDelivery interval (e.g., "MONTH").
deliveryPolicy.intervalCountintegerNumber of intervals between deliveries.

discounts

KeyTypeDescription
discounts[].node.idstringID of the discount (e.g., "gid://shopify/SubscriptionManualDiscount/c9af6cab-0b73-4790-938b-e6405d67723b").
discounts[].node.typestringType of discount (e.g., "MANUAL").
discounts[].node.titlestringTitle of the discount (e.g., "Subscription discount").
discounts[].node.value.amount.amountstringDiscount amount (e.g., "10.0").
discounts[].node.value.amount.currencyCodestringCurrency code for the discount (e.g., "USD").
discounts[].node.value.appliesOnEachItembooleanIndicates if the discount applies to each item.
discounts[].node.targetTypestringTarget type for the discount (e.g., "LINE_ITEM").
discounts[].node.usageCountintegerNumber of times the discount has been used.
discounts[].node.entitledLines.allbooleanIndicates if the discount applies to all entitled lines.
discounts[].node.entitledLines.lines.nodesarrayArray of entitled lines (currently empty).
discounts[].node.rejectionReasonnull | stringReason for rejecting the discount, if applicable.
discounts[].node.recurringCycleLimitintegerLimit of recurring cycles for which the discount is applied.

additional Information

KeyTypeDescription
isPrepaidbooleanIndicates whether the subscription is prepaid.
nextOrderDatestring (ISO 8601 date-time)Date of the next order.
nextOrderDateEpochintegerEpoch timestamp of the next order.
discountsarrayList of discounts applied (see discounts section for details).
hasBundlebooleanIndicates if the subscription has a bundled item.
willAutoResumebooleanIndicates if the subscription will automatically resume.
notenull | stringAdditional notes related to the subscription.
customAttributesarrayCustom attributes related to the subscription (currently empty).

lineItems

KeyTypeDescription
lineItems[].idintegerUnique identifier for the line item.
lineItems[].shopifyIdstringUnique identifier for the line item in Shopify.
lineItems[].productShopifyIdintegerShopify product ID.
lineItems[].variantShopifyIdintegerShopify variant ID.
lineItems[].namestringName of the line item.
lineItems[].productTitlestringTitle of the product.
lineItems[].variantTitlestringTitle of the product variant.
lineItems[].variantImagestring | nullURL of the variant image.
lineItems[].quantityintegerQuantity of the product.
lineItems[].pricestringPrice of the item as a string (e.g., "100.00").
lineItems[].basePricestringBase price of the item as a string.
lineItems[].discountedPricestringDiscounted price of the item as a string.
lineItems[].discountAllocationsarrayDiscount allocations applied to the line item (currently empty).
lineItems[].pricingPolicy.basePrice.amountstringBase price amount for the line item (e.g., "100.0").
lineItems[].pricingPolicy.basePrice.currencyCodestringCurrency code for the base price (e.g., "USD").
lineItems[].pricingPolicy.cycleDiscounts[].afterCycleintegerThe number of cycles after which the discount applies.
lineItems[].pricingPolicy.cycleDiscounts[].computedPrice.amountstringComputed price after the discount (e.g., "100.0").
lineItems[].pricingPolicy.cycleDiscounts[].computedPrice.currencyCodestringCurrency code for computed price.
lineItems[].pricingPolicy.cycleDiscounts[].adjustmentTypestringType of price adjustment (e.g., "FIXED_AMOUNT").
lineItems[].pricingPolicy.cycleDiscounts[].adjustmentValue.amountstringAdjustment value amount (e.g., "0.0").
lineItems[].pricingPolicy.cycleDiscounts[].adjustmentValue.currencyCodestringCurrency code for adjustment value.
lineItems[].sellingPlanShopifyIdintegerShopify selling plan ID.
lineItems[].sellingPlanNamestringName of the selling plan.
lineItems[].skustringSKU of the product.
lineItems[].requiresShippingbooleanIndicates if the product requires shipping.
lineItems[].taxablebooleanIndicates if the product is taxable.
lineItems[].bundleTransactionIdint | nullBundle transaction ID.
lineItems[].bundleNameint | nullName of the bundle.
lineItems[].isOneTimeAddedbooleanIndicates if the item was added as a one-time purchase.
lineItems[].isOneTimeRemovedbooleanIndicates if the item was removed as a one-time purchase.
lineItems[].attributesarrayAdditional attributes related to the line item (currently empty).

shippingAddress

KeyTypeDescription
shippingAddress.firstNamestringCustomer's first name.
shippingAddress.lastNamestringCustomer's last name.
shippingAddress.companystring | nullCompany name, if provided.
shippingAddress.address1stringPrimary address line.
shippingAddress.address2string | nullSecondary address line, if applicable.
shippingAddress.citystringCity name.
shippingAddress.zipstringZIP or postal code.
shippingAddress.countryCodestringISO 3166 country code (e.g., "US").
shippingAddress.provinceCodestringProvince or state code (e.g., "ID").

shippingLines

KeyTypeDescription
shippingLines.codestring | nullShipping code.
shippingLines.titlestring | nullShipping title.

customer

KeyTypeDescription
customer.shopifyIdintegerShopify customer ID.
customer.firstNamestringCustomer's first name.
customer.lastNamestringCustomer's last name.
customer.emailstringCustomer's email address.
customer.phonestring | nullCustomer's phone number, if provided.

metaData

KeyTypeDescription
metaData.myshopifyDomainstringThe domain name of the Shopify store.