2021-04 release notes

Release date Date version is no longer supported
April 1, 2021 April 1, 2022

The 2021-04 release contains support for building custom price cards for individual product variants, managing gift cards, and creating discount codes in bulk using the GraphQL Admin API.

This release also includes support for duties in the Storefront API and the ability to retrieve information about discounts applied to a checkout using the REST Admin API.

What’s new in 2021-04

The following features were added in version 2021-04 of Shopify's APIs:

  • Using the Price List API, you can now change the prices of products based on specific context rules about the customer's location. If a price list exists for the product and geography the customer is ordering from, then the storefront will charge a different price based on those rules.
  • Using the GiftCard API, you can now create, retrieve, update, and disable gift cards for a store. To learn more about managing gift cards, refer to Manage gift cards with the GraphQL Admin API.
  • When managing discounts, it's now possible to add redeemable discount codes in bulk rather than make individual queries to update discount codes associated with a given price rule.
  • Shopify now returns information about duties through the Storefront API. You can query the total duties applied to line items in the checkout and the total current and original duties applied to an order.
  • Using the Checkout resource, you can now retrieve information about how a discount was applied to a checkout.

Breaking changes

These changes require special attention. If your app uses these API resources and you don’t upgrade to a more recent API version, then your app will break.

Next action for payment apps

As of API version 2021-04, payment apps that use the redirectUrl field on PaymentSession must update their apps to use the nextAction field.

Previously, payment apps that were processing a payment needed to use the redirectUrl field to redirect the customer after they completed their payment offsite. This redirectUrl field was specific to offsite payments only.

To support payment methods other than offsite, and other actions that might need to occur depending on the type of payment, we've added the following fields on PaymentSessionNextAction:

  • action: The action that the payment app must perform. REDIRECT indicates the need to redirect the customer after they've completed their payment and nil specifies that no next action is required to complete the payment process.
  • context: Any data required to perform the action. Currently, context can only be PaymentSessionActionsRedirect.

GraphQL Admin API changes

Below are all the changes currently introduced in the 2021-04 version of the GraphQL Admin API.

As of API version 2021-04, payment apps that use the redirectUrl field on