Shopify App Development

Shopify App Development Tutorials

Usage Billing Tutorial Shopify

Before you begin

In this workshop we will be adding a usage based billing workflow to the app template generated by the Shopify CLI. This workshop will use the app template using Node.js for the backend and React for the frontend. Usage based billing will allow you to charge merchants based off of how much they use your app, or use certain features within your app.

After completing this workshop you will have experience with:

  • Using the Shopify API library to prompt users to accept a Usage Based subscription on install
  • Create Usage Records to increase the amount a merchants will be charged
  • Prompt a merchant to increase their plan if they reach their usage limit
  • Subscribe to webhooks to be notified about changes to a merchant's subscription

Billing API Overview

The Shopify Billing API allows you to create and manage app subscriptions for merchants. The merchants will be charged through Shopify's invoicing system.

The Billing API has the benefits of:

  • Charges appear directly on the merchant's Shopify invoice, so merchants don't have to enter their credit card information to pay for apps.
  • Apps that use Shopify's Billing API have higher free-to-paid conversion rates because charges originate directly from Shopify.
  • You automatically receive a revenue share from Shopify. Your share of the revenue is defined in the Shopify Partner revenue share agreement.
  • Shopify handles all chargebacks.

The Billing API is mandatory for all apps that are distributed through the Shopify App Store that want to charge merchants, unless you have been notified by Shopify.

Billing Flow Diagram

Usage Based Billing

Usage based billing allows you to charge merchants based off of how much they use your app, or certain features within your app. Usage based billing is only available to be charged on a 30 day basis.

When accepting the subscription the merchant will be shown the maximum amount they will be charged per 30 days. The merchant will also be shown the usage terms, which is a description of what the merchant will be charged for. The merchant will be able to accept or decline the subscription.