Charging for your app with the REST Admin API: Introduction
The REST Admin API provides an integrated billing solution that allows app charges to be handled by Shopify's merchant invoicing system.
This guide provides an introduction to the REST Admin API resources related to billing and illustrates the workflow for creating and issuing charges.
API resources
The following REST Admin API resources are available to help you meet the needs of your specific billing model:
- ApplicationCharge: Used to bill merchants one time only (for example, when their free trial expires). This type of charge is recommended for apps that aren’t billed on a recurring basis.
- RecurringApplicationCharge: Used to bill merchants on a recurring 30-day billing cycle.
- UsageCharge: Used to charge merchants when fees are recurring, but vary from month to month.
You can select the API resources for your billing model and include the amount to charge. Shopify handles charging the merchant and making sure you get paid.
How it works
The following diagram illustrates the workflow for creating and issuing charges:

A merchant triggers a charge with an event that you've identified, such as app installation, service plan upgrade, or individual purchase.
The app creates a charge for the merchant, which might be a recurring or one-time charge.
Shopify verifies the charge and returns a
confirmation_url
that redirects the merchant to accept or decline the charge.If the merchant accepts the charge, then they're redirected to the
return_url
specified when issuing the charge. The charge immediately transitions frompending
toactive
. After the charge is activated (the charge is in anactive
state), you get paid.If the charge is declined, then Shopify redirects the merchant and provides a notification message that the app charge was declined.
Considerations
Shopify Partners are more likely to recommend apps that they’ve used before. Consider allowing free app testing in Shopify Partner development stores to help increase your app sales.
Development stores can be identified and granted free testing access through the Shop resource. They show up as an affiliate
when you look up the plan name ({ "plan_name" : "affiliate" }
).
If your apps qualifies, then contact us to get your app listed on our Partner-friendly app list.
Guides
The following guides are available to help you get the most from your experience developing on the REST Admin API:
Concepts: Get introduced to the core concepts of billing.
Determine your billing model: Familiarize yourself with the REST Admin API endpoints related to billing and understand how the API resources can best suit your billing model.
Implement your billing model: Implement your billing model using the ApplicationCharge, RecurringApplicationCharge, and UsageCharge resources.
Upgrades and downgrades: Learn how to upgrade or downgrade a merchant's plan.
Offering free trials: Learn about the best way to manage free trials for your app.
Refund an app payment: Learn how to respond to refund requests from merchants who use your app.
FAQ: Learn how to gracefully handle billing for uninstalled and reinstalled apps and get answers to other frequently asked questions.