Welcome to the January 2021 edition of our API features roundup, designed to help you understand how you can adopt all the latest changes to improve the quality of your apps and streamline your development experience.
In this version, we released one of our most requested features ever: native support for subscriptions through our new Subscription APIs. Here’s a sample of what’s also included in this version: scheduled fulfillments to facilitate prepaid subscriptions, automatic activation of app charges, and more granular financial information on orders and transactions like fees and tip totals.
The 2021-01 launch also coincides with the removal of version 2020-01, so remember to check your API health report to make sure you're compatible and review the changes coming.
In this article, we look at the features included in the 2021-01 release.
Table of contents
1. Subscription APIs
This version includes new APIs built to power subscriptions on Shopify. These additions allow partners and developers to build apps that integrate natively with checkout, dramatically improving the customer experience on shops that offer subscriptions. The Subscription APIs fully integrate with Shopify across the whole lifecycle of the order, so it's easy to provide accurate shipping rates, allow for the application of discounts, and then manage and fulfill the order from the Shopify Admin.
We've included several new endpoints and resources to help you manage subscriptions on behalf of merchants. Selling plans are a flexible resource to set delivery policies and billing policies like “subscribe and save” for groups of products. When a customer places an order that includes a product with a selling plan, developers can manage subscription contracts to facilitate easy recurring payments on whatever customer payment methods are available.
Subscription contracts, subscription billing attempts, and customer payment methods have all received their own webhook topics, so you’ll always be able to stay up to date with common subscription events.
Visit our blog post: Introducing Shopify Subscription APIs: Build Apps That Integrate with Shopify Checkout to learn more about our new Subscription APIs.
2. Product Subscription App Extension
To power the native tools at the heart of the new subscription experience, we've released a new kind of app extension that allows app developers to facilitate subscription management directly inside the Shopify Admin. You can create this new kind of app extension using a single command from the Shopify App CLI, and it includes scaffolding for everything you need to start building an excellent merchant experience.
The Shopify App CLI also comes fully equipped with a simulator for your Product Subscription App Extension, allowing you to preview changes to your scaffolded app extension code in real-time.
When you're ready to deploy your app extension, you can push it up to your Partner Dashboard, where you have full control over the version history, and publish your app extension to every shop that has your app installed with the click of a button.
Shops with subscription apps installed render a subscription card on the product page in the Shopify Admin, which passes data to the modal powered by your published app extension code. This entire exchange happens between code hosted on Shopify, so Product Subscription App Extensions are incredibly fast.
For more information on building Product Subscription App Extensions, visit our tutorial.
3. Scheduled fulfillments
The last subscription-based change to this version is scheduled fulfillments. Fulfillment orders now support the SCHEDULED
status, which will show up for any orders that include a prepaid subscription. These fulfillment orders include a fulfillAt
date, which will transition the SCHEDULED
fulfillment order into an OPEN
state when it expires.
As of 2021-01, API clients can also reschedule fulfillment orders to a later date by using the new fulfillmentOrderReschedule
mutation, and specifying a fulfillAt
date in the future. Rescheduling a fulfillment order is especially helpful for prepaid subscriptions, when a customer may want to skip a shipment of consumable items like coffee or granola if they haven't run out. This functionality is not yet available through the Shopify Admin UI, and is powered exclusively through the GraphQL API.
Below is an example request to reschedule a fulfillment order:
For detailed information on how subscriptions and fulfillments work together, visit our tutorial on creating and managing fulfillments for prepaid subscriptions.
4. Automatic activation of app charges
In prior versions, billing for an app using the REST API was a three-step process:
- Step one: Create an application charge
- Step two: The merchant accepts or declines the charge
-
Step three: If the charge is accepted, make an API call to activate the pending
accepted
charge
As of 2021-01, apps no longer need to perform that third step. Accepted application charges will automatically be transitioned into an “active” state, eliminating the possibility of charges that have been created by the app, accepted by the merchant, but then never activated and paid out to the partner.
5. Financial reporting improvements
The 2021-01 version includes two changes to improve the accuracy of accounting apps.
First, TransactionFee
is a new object available as a part of the Admin GraphQL API. This new object includes much 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.
Second, 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 the order object. This increased granularity will help accounting apps report even more accurately on fees and tips on any given order transaction.
Stay on top of changes
For all Shopify platform changes, make sure to subscribe to the Developer Changelog, the primary source of information for all new product launches. Stay up to date using the changelog, and stay ahead of the curve by adopting new features as soon as they’re shipped into the upcoming 2021-01 release candidate.
You can also subscribe to our monthly What’s New for Partners and Developers at Shopify newsletter, which will help keep you on top of all platform updates:
Read more
- How to Level Up Your App with Theme App Extensions
- 6 Phases of the App Development Process: From Idea to Post-Launch
- How to Optimize API Rate Limits
- Expert Advice for Branding Your Shopify App
- How to Upload Files with the Shopify GraphQL API and React
- How to Work with Shopify’s query Argument in GraphQL
- Persistence Matters: 6 Lessons From My First 6 Months on the Shopify App Store