How to Use Usage-Based Billing with Billing API

Hi,

We are using Shopify app billing using the Monthly Recurring Charges API.

We have received the new Shopify updates regarding Managed App Pricing and Shopify App Pricing, and Shopify now supports usage charges with Shopify App Pricing.

Now, billing APIs are live in our app, and we want to add usage-based charges in the app, so what exactly do we need to do now?

Can usage-based billing work with our same old billing APIs? Is there any migration required before we add usage-based billing?

Could anyone please explain to me how to move forward in this scenario?

Thank you.

Hi @Ajay_Rabari! Usage charges have been part of the Billing API for a while, so they aren’t something new you have to unlock. What changed in May is that there are now two separate ways to do usage billing, and you get to pick one.

If you want to keep your current setup, you can stay on the Billing API (now called manual pricing) and add usage charges to your existing recurring plan. You create the subscription with both a recurring line item and a usage line item (with terms and a cappedAmount) via appSubscriptionCreate, then report usage with appUsageRecordCreate. The combine time and usage guide walks through the exact mutations.

The other option is the newer Shopify App Pricing model, where you define usage meters in the Partner Dashboard and send usage events through the App Events API instead of creating usage records yourself. One thing to know is that the two are mutually exclusive. Once you opt an app into Shopify App Pricing, you can no longer create new charges through the Billing API for it (charges created before you opt in keep processing). Migration tooling for apps already billing usage through the Billing API isn’t available yet, so if you’re live on Billing API usage today, your billing keeps running as-is and there’s no action you need to take right now.

So short version, you can add usage charges to your existing Billing API plan today without migrating.

Thank you so much for your response @Donal-Shopify , One thing I would like to clarify: since there are now two approaches and I plan to continue using the Billing API with usage charges (as it is already implemented in my app), are there any specific features, benefits, or future compatibility advantages that I would miss by not migrating to Shopify App Pricing with usage-based billing?

Or is usage-based billing functionally the same in both approaches, with the main difference being how the usage charges are created and managed?

Good question! There are a few things you’d be giving up by staying on the Billing API for usage. With Shopify App Pricing you define usage meters in the Partner Dashboard with fixed, graduated, or volume pricing and Shopify handles the aggregation, calculation, and invoicing for you, so there’s much less billing code to maintain. You also get the merchant-facing billing card in the admin (current plan, usage charges, upcoming changes), Shopify-managed chargebacks, and the newer Active Subscription and Historical Events APIs for subscription data that persists past uninstall, which is more accurate than what the Admin API gives you today. We also suggest App Pricing as generally helping free-to-paid conversion since the charge comes straight from Shopify.

There are tradeoffs the other way too, though. On the Billing API you can set a usage cap per billing interval (cappedAmount), and App Pricing usage doesn’t support caps yet. App Pricing usage is also monthly only, where the Billing API supports combined recurring plus usage on a 30-day cycle. So if usage caps or that billing structure matter to your model, the Billing API still does something App Pricing currently doesn’t.

For future compatibility, the direction is clearly toward App Pricing. The docs describe it as the recommended approach and mark the Billing API as legacy, so new billing capabilities are likely to land there first. That said, no deprecation date has been announced and your existing setup keeps working, so there’s no urgency to move. Since the migration tooling for Billing-API usage apps isn’t out yet anyway, adding usage through the Billing API now and exploring App Pricing again once that tooling ships would be a good idea!

Thank you @Donal-Shopify