2021-01 release notes
Release date | Date version is no longer supported |
---|---|
January 1, 2021 | January 1, 2022 |
The 2021-01 release contains native support for subscriptions through our new Subscription APIs.
This release also includes support for scheduled fulfillments to facilitate prepaid subscriptions, automatic activation of app charges, and more granular financial information on orders and transactions, such as fees and tip totals.
What’s new in 2021-01
The following features were added in version 2021-01 of Shopify's APIs:
- We've included several new endpoints and resources to help you manage subscriptions on behalf of merchants. You can use selling plans to set delivery, billing, and pricing policies for groups of products. When a customer places an order that includes a product with a selling plan, you can manage subscription contracts to support recurring payments on the customer payment methods that are available.
- We've released a product subscription app extension that allows you to manage subscriptions directly inside the Shopify admin.
- Fulfillment orders now support the
SCHEDULED
status, which displays for any orders that include a prepaid subscription. To learn more about how fulfillments and subscriptions work together, refer to the Create and manage fulfillments for prepaid subscriptions. - Accepted application charges now automatically transition into an
active
state. To learn more about creating and issuing charges, refer to Charging for your app with the REST Admin API. - The new
TransactionFee
object includes more detailed information about fees collected as a part of Shopify Payments payouts, including the flat rate charges, percentage charges, and a breakdown of the tax charged on these fees. - The GraphQL Admin API now includes tips received as a part of an order in both shop and presentment currencies using the
totalTipReceivedSet
field on theOrder
object. This increased granularity helps accounting apps report accurately on fees and tips for order transactions.
Breaking changes
Anchor link to section titled "Breaking changes"These changes require special attention. If your app uses these API resources, and you don’t adjust your usage of the resources according to the following instructions, then your app might break when you update to this API version.
Status field in REST FulfillmentOrder resource
Anchor link to section titled "Status field in REST FulfillmentOrder resource"As of the 2021-01 API version, we've added a new scheduled value to the status
field in the FulfillmentOrder
resource.
For more information, refer to Managing prepaid subscription orders.
Auto-activate billing charges using the REST Admin API
Anchor link to section titled "Auto-activate billing charges using the REST Admin API"We've removed the accepted
value for the status
field and the activate
endpoint on the ApplicationCharge and RecurringApplicationCharge resources.
As of the 2021-01 API version, when a merchant accepts a charge, the charge immediately transitions from pending
to active
. This means that you no longer need to activate the charge to finalize it.
Cursor-based pagination
Anchor link to section titled "Cursor-based pagination"The /admin/api/{version}/users.json
endpoint now supports cursor-based pagination.
GraphQL Admin API changes
Anchor link to section titled "GraphQL Admin API changes"Below are all the changes currently introduced in the 2021-01 version of the GraphQL Admin API.
Subscription APIs
We've added the new subscription APIs to enable you to build support for subscriptions into the cart and product pages on the storefront.
You can use subscription APIs to sell goods and services in multiple ways. For example, you can sell a product as a one-time purchase or as a recurring subscription.
Subscription APIs
Selling plan APIs: An alternative way to sell a product or variant, other than "buy now".
Subscription contract APIs: The subscription agreements between a customer and merchant.
Customer payment method APIs: Stored payment methods that can be used to pay for future orders without requiring the customer to manually go through checkout.
For more information about subscription APIs, refer to Shopify subscriptions overview.
New mutations
CustomerPaymentMethodCreditCardCreate
was addedCustomerPaymentMethodSendUpdateEmail
was addedCustomerPaymentMethodCreditCardUpdate
was addedCustomerPaymentMethodRemoteCreditCardCreate
was addedCustomerPaymentMethodRevoke
was addedProductJoinSellingPlanGroups
was addedProductLeaveSellingPlanGroups
was addedProductVariantJoinSellingPlanGroups
was addedProductVariantLeaveSellingPlanGroups
was addedSellingPlanGroupAddProductVariants
was addedSellingPlanGroupAddProducts
was addedSellingPlanGroupCreate
was addedSellingPlanGroupDelete
was addedSellingPlanGroupRemoveProductVariants
was addedSellingPlanGroupRemoveProducts
was addedSellingPlanGroupUpdate
was addedSubscriptionBillingAttemptCreate
was addedSubscriptionContractCreate
was addedSubscriptionContractSetNextBillingDate
was addedSubscriptionContractUpdate
was addedSubscriptionDraftCommit
was addedSubscriptionDraftDiscountAdd
was addedSubscriptionDraftDiscountCodeApply
was addedSubscriptionDraftDiscountRemove
was addedSubscriptionDraftDiscountUpdate
was addedSubscriptionDraftFreeShippingDiscountAdd
was addedSubscriptionDraftFreeShippingDiscountUpdate
was addedSubscriptionDraftLineAdd
was addedSubscriptionDraftLineRemove
was addedSubscriptionDraftLineUpdate
was addedSubscriptionDraftUpdate
was added
New types
CustomerCreditCard
object was addedCustomerPaymentMethod
object was addedCustomerPaymentInstrument
union type was addedDiscountTargetType
enum was addedDiscountType
enum was addedFailure
object was addedLastPaymentStatus
enum was addedLineItemSellingPlan
object was addedSellingPlan
object was addedSellingPlanAnchorInput
input object was addedSellingPlanAnchor
object was addedSellingPlanBillingPolicyInput
input object was addedSellingPlanBillingPolicy
object was addedSellingPlanDeliveryPolicyInput
input object was addedSellingPlanDeliveryPolicy
object was addedSellingPlanFixedPricingPolicyInput
input object was addedSellingPlanFixedPricingPolicy
object was addedSellingPlanGroupInput
input object was addedSellingPlanGroupResourceInput
input object was addedSellingPlanGroup
object was addedSellingPlanInput
input object was addedSellingPlanOption
object was addedSellingPlanPricingPolicyAdjustmentType
enum was addedSellingPlanPricingPolicyAdjustmentValue
union type was addedSellingPlanPricingPolicyBase
interface type was addedSellingPlanPricingPolicyInput
input object was addedSellingPlanPricingPolicyPercentageValue
object was addedSellingPlanPricingPolicyValueInput
input object was addedSellingPlanPricingPolicy
union type was addedSellingPlanRecurringBillingPolicyInput
input object was addedSellingPlanRecurringBillingPolicy
object was addedSellingPlanRecurringDeliveryPolicyInput
input object was addedSellingPlanRecurringDeliveryPolicy
object was addedSellingPlanRecurringPricingPolicyInput
input object was addedSellingPlanRecurringPricingPolicy
object was addedSubscriptionAppliedCodeDiscount
object was addedSubscriptionBillingAttemptInput
input object was addedSubscriptionBillingAttempt
object was addedSubscriptionBillingPolicyInput
input object was addedSubscriptionBillingPolicy
object was addedSubscriptionContractCreateInput
input object was addedSubscriptionContract
object was addedSubscriptionStatus
enum was addedSubscriptionCyclePriceAdjustment
object was addedSubscriptionDeliveryMethodInput
input object was addedSubscriptionDeliveryMethodShippingInput
input object was addedSubscriptionDeliveryMethodShippingOptionInput
input object was addedSubscriptionDeliveryMethodShippingOption
object was addedSubscriptionDeliveryMethodShipping
object was addedSubscriptionDeliveryPolicyInput
input object was addedSubscriptionDeliveryPolicy
object was addedSubscriptionDiscountAllocation
object was addedSubscriptionDiscountEntitledLines
object was addedSubscriptionDiscountFixedAmountValue
object was addedSubscriptionDiscountPercentageValue
object was addedSubscriptionDiscountRejectionReason
enum was addedSubscriptionDiscountValue
union type was addedSubscriptionDiscount
union type was addedSubscriptionDraftInput
input object was addedSubscriptionDraft
object was addedSubscriptionFreeShippingDiscountInput
input object was addedSubscriptionLineInput
input object was addedSubscriptionLineUpdateInput
input object was addedSubscriptionLine
object was addedSubscriptionMailingAddress
object was addedSubscriptionManualDiscountEntitledLinesInput
input object was addedSubscriptionManualDiscountFixedAmountInput
input object was addedSubscriptionManualDiscountInput
input object was addedSubscriptionManualDiscountLinesInput
input object was addedSubscriptionManualDiscountValueInput
input object was addedSubscriptionManualDiscount
object was addedSubscriptionPricingPolicy
object was addedSubscriptionShippingOption
object was addedSubscriptionShippingOptionResult
union type was added
New fields
appliesOnOneTimePurchase
was added to objectDiscountCodeFreeShipping
appliesOnOneTimePurchase
was added to input objectDiscountCodeFreeShippingInput
appliesOnOneTimePurchase
was added to input objectDiscountCustomerGetsInput
appliesOnOneTimePurchase
was added to objectDiscountCustomerGets
appliesOnSubscription
was added to input objectDiscountCodeFreeShippingInput
appliesOnSubscription
was added to objectDiscountCodeFreeShipping
appliesOnSubscription
was added to input objectDiscountCustomerGetsInput
appliesOnSubscription
was added to objectDiscountCustomerGets
contract
was added to objectLineItem
customerPaymentMethod
was added to objectQueryRoot
customerPaymentMethod
was added to objectOrderPaymentCollectionDetails
eligibleForSubscriptionMigration
was added to objectShopFeatures
eligibleForSubscriptions
was added to objectShopFeatures
legacySubscriptionGatewayEnabled
was added to objectShopFeatures
message
was added to union typeSubscriptionShippingOptionResult
paymentMethods
was added to objectCustomer
productSubscriberStatus
was added to objectCustomer
recurringCycleLimit
was added to input objectDiscountCodeBasicInput
recurringCycleLimit
was added to objectDiscountCodeBasic
recurringCycleLimit
was added to input objectDiscountCodeFreeShippingInput
recurringCycleLimit
was added to objectDiscountCodeFreeShipping
requiresSellingPlan
was added to input objectProductInput
requiresSellingPlan
was added to objectProduct
sellingPlan
was added to objectLineItem
sellingPlanGroupsToAssociate
was added to input objectProfileInput
sellingPlanGroupsToDissociate
was added to input objectProfileInput
sellingPlanGroupCount
was added to objectProductVariant
sellingPlanGroup
was added to objectQueryRoot
shippingOptions
was added to objectSubscriptionDraft
subscriptionContract
was added to objectQueryRoot
subscriptionDraft
was added to objectQueryRoot
New connection
sellingPlanGroups
was added to objectProfile
sellingPlanGroups
was added to objectQueryRoot
subscriptionContracts
was added to objectCustomerPaymentMethod
subscriptionContracts
was added to objectCustomer
subscriptionContracts
was added to objectQueryRoot
New error codes
BillingAttemptUserError
was addedCustomerPaymentMethodUserError
was addedAPPLIES_ON_NOTHING
was added toPriceRuleErrorCode
MULTIPLE_RECURRING_CYCLE_LIMIT_FOR_NON_SUBSCRIPTION_ITEMS
was added toPriceRuleErrorCode
SellingPlanGroupUserError
was addedSellingPlanUserError
was addedSubscriptionContractUserError
was addedSubscriptionDraftUserError
was added
Managing prepaid subscription orders
As of API version 2021-01, we've added support for managing prepaid subscription orders. You can now create an order with multiple billing or payment schedules along with multiple fulfillment orders.
- To learn how to manage orders for prepaid subscriptions, refer to Manage orders for prepaid subscriptions.
- For information on managing fulfillments for prepaid subscriptions, refer to Create and manage fulfillments for prepaid subscriptions.
- If you need to manage advanced fulfillment scenarios for subscriptions, then refer to Handling advanced scenarios for subscription-based fulfillment orders.
New mutations
FulfillmentOrderOpen
was addedFulfillmentOrderReschedule
was added
New and updated types
mark_as_open
value was added to enumFulfillmentOrderAction
scheduled
value was added to enumFulfillmentStatus
scheduled
value was added to enumFulfillmentOrderStatus
scheduled
value was added to enumOrderDisplayFulfillmentStatus
New field
fulfillAt
was added to objectFulfillmentOrder
Subscription-related webhooks
You can now subscribe to subscription contracts, billing attempts, and customer payment methods event webhooks.
For detailed information about required scopes and payloads, refer to Subscription-related webhooks.
New topics
SUBSCRIPTION_CONTRACTS/CREATE
value was added to enumWebhookSubscriptionTopic
SUBSCRIPTION_CONTRACTS/UPDATE
value was added to enumWebhookSubscriptionTopic
SUBSCRIPTION_BILLING_ATTEMPTS/SUCCESS
value was added to enumWebhookSubscriptionTopic
SUBSCRIPTION_BILLING_ATTEMPTS/FAILURE
value was added to enumWebhookSubscriptionTopic
CUSTOMER_PAYMENT_METHODS/CREATE
value was added to enumWebhookSubscriptionTopic
CUSTOMER_PAYMENT_METHODS/UPDATE
value was added to enumWebhookSubscriptionTopic
CUSTOMER_PAYMENT_METHODS/REVOKE
value was added to enumWebhookSubscriptionTopic
Extended authorizations
As of API version 2021-01, you can query the GraphQL Admin API to access information about extended authorization periods.
New types
ShopifyPaymentsExtendedAuthorization
object was addedShopifyPaymentsTransactionSet
object was added
New fields
authorizationExpiresAt
field was added to objectOrderTransaction
shopifyPaymentsSet
field was added to objectOrderTransaction
standardAuthorizationExpiresAt
field was added to objectShopifyPaymentsExtendedAuthorization
extendedAuthorizationExpiresAt
field was added to objectShopifyPaymentsExtendedAuthorization
extendedAuthorizationSet
field was added to objectShopifyPaymentsTransactionSet
New value
EXPIRED
value was added to enumOrderDisplayFinancialStatus
Transaction fees
As of API version 2021-01, you can query the GraphQL Admin API to access the details of transaction fees charged on Shopify Payments transactions.
For example, you can now reconcile transaction fee amounts with external accounting systems. You can also better understand the following:
- How fees are calculated and subtracted from payouts
- How a particular transaction fee rate is used
- How transaction fees were charged in a historical context
New type
TransactionFee
object was added
New fields
fees
field was added to objectOrderTransaction
settlementCurrency
field was added to objectOrderTransaction
settlementCurrencyRate
field was added to objectOrderTransaction
APIs for payments provider apps
As of the 2021-01 API version, you can query the GraphQL Admin API for details about a payment processing session and the configuration of a payments provider app.
New types
PaymentSession
object was addedPaymentsAppConfiguration
object was added
New mutations
paymentSessionReject
was addedpaymentSessionResolve
was addedpaymentsAppConfigure
was added
Fulfillments picked up by customers
As of API version 2021-01, you can query the GraphQL Admin API to determine which fulfillments have been picked up by customers.
New types
PICKED_UP
value was added to enumFulfillmentDisplayStatus
Tips on orders
As of API version 2021-01, you can query the GraphQL Admin API to determine the total tip received for an order in shop and presentment currencies.
New field
totalTipReceivedSet
field was added to objectOrder
Image dimensions
As of API version 2021-01, you can query the GraphQL Admin API to determine the width and height (in pixels) of images hosted by Shopify.
New fields
width
field was added to objectImage
height
field was added to objectImage
Localization extensions
As of API version 2021-01, you can add localization extensions when you create a new order.
New fields
localizationExtensions
field was added to objectDraftOrderInput
localizationExtensions
field was added to objectOrderInput
key
field was added to objectLocalizationExtension
New connection
localizationExtensions
connection was added to objectDraftOrder
New types
HasLocalizationExtensionsForDraftOrders
was addedLocalizationExtensionInput
input object was addedLocalizationExtensionKey
enum was added
Translated Country and Province names
As of API version 2021-01, you can query the translated names of DeliveryCountry and DeliveryProvince. The translated name is based on the user locale.
New fields
translatedName
field was added to objectDeliveryCountry
translatedName
field was added to objectDeliveryProvince
GraphQL Storefront API changes
Anchor link to section titled "GraphQL Storefront API changes"Below are all the changes currently introduced in the 2021-01 version of the GraphQL Storefront API.
Managing prepaid subscription orders
As of API version 2021-01, we've added support for managing prepaid subscription orders. You can now create an order with multiple billing or payment schedules along with multiple fulfillment orders.
Updated type
scheduled
value was added to enumOrderFulfillmentStatus
Image dimensions
As of API version 2021-01, you can query the Storefront API to determine the width and height (in pixels) of images hosted by Shopify.
New fields
width
field was added to objectImage
height
field was added to objectImage
Sort order for product media
As of API version 2021-01, you can sort product media by a given key. The default sort order is by POSITION
. In previous API versions, product media was sorted by the CREATED_AT
value by default.
New argument
sortKey
was added to connectionmedia
in objectProduct
REST Admin API changes
Anchor link to section titled "REST Admin API changes"Below are all the changes currently introduced in the 2021-01 version of the REST Admin API.
Cursor-based pagination
As of API version 2021-01, the /admin/api/{version}/users.json
endpoint supports cursor-based pagination.
Use the /admin/api/{version}/users.json
endpoint to request paginated user data from the REST Admin API and access each page of results.
Updated endpoint
admin/api/{version}/users.json
was updated to support cursor-based pagination
Managing prepaid subscription orders
As of API version 2021-01, we've added support for managing prepaid subscription orders. You can now create an order with multiple billing or payment schedules along with multiple fulfillment orders.
New endpoints
/admin/api/2021-01/fulfillment_orders/{fulfillment_order_id}/open.json
: Marks a fulfillment order as open./admin/api/2021-01/fulfillment_orders/{fulfillment_order_id}/reschedule.json
: Reschedules the fulfill_at time of a scheduled fulfillment order.
New and updated fields
fulfill_at
field was added to resourceFulfillmentOrder
- scheduled value was added to
status
field in resourceFulfillmentOrder
- Valid values for
status
: open, in_progress, scheduled, cancelled, incomplete, closed
- Valid values for
Auto-activate billing charges
To simplify and streamline billing for your apps, we've removed the accepted
value for the status
field and the activate
endpoint on the ApplicationCharge and RecurringApplicationCharge resources.
As of API version 2021-01, when a merchant accepts a charge, the charge immediately transitions from pending
to active
. This means that you no longer need to activate the charge to finalize it.
To learn more about creating and issuing charges, refer to Charging for your app with the REST Admin API.
Removed values
accepted
value was removed fromstatus
field in resourceApplicationCharge
accepted
value was removed fromstatus
field in resourceRecurringApplicationCharge
Removed endpoints
POST /admin/api/2021-01/application_charges/{application_charge_id}/activate.json
endpoint was removed from resourceApplicationCharge
POST /admin/api/2021-01/recurring_application_charges/{recurring_application_charge_id}/activate.json
endpoint was removed from resourceRecurringApplicationCharge
Extended authorization
As of API version 2021-01, you can query the Transaction resource to access information about extended authorization periods.
New fields
authorization_expires_at
field was added to resourceTransaction
extended_authorization_attributes
field was added to resourceTransaction
Script tag caching
As of API version 2021-01, you can query the ScriptTag resource to determine whether the Shopify CDN (content delivery network) can cache and serve a script tag.
New field
cache
field was added to resourceScriptTag
New endpoint for tracking deprecated API calls
As of API version 2021-01, you can use the Deprecated API calls endpoint to get a list of all the deprecated calls your private apps have made in the past 30 days, information on migration steps, and the deadline to update these calls in your apps.
New endpoint
/admin/api/2021-01/deprecated_api_calls.json
: Retrieves a list of deprecated API calls.
Subscription-related webhooks
You can now subscribe to subscription contracts, billing attempts, and customer payment methods event webhooks.
For detailed information about required scopes and payloads, refer to Subscription-related webhooks.
New topics
subscription_contracts/create
topic was added to webhook resourcesubscription_contracts/update
topic was added to webhook resourcesubscription_billing_attempts/failure
topic was added to webhook resourcesubscription_billing_attempts/success
topic was added to webhook resourcecustomer_payment_methods/create
topic was added to webhook resourcecustomer_payment_methods/revoke
topic was added to webhook resourcecustomer_payment_methods/update
topic was added to webhook resource