Billing for your app with the REST Admin API
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 resourcesAnchor link to section titled "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 worksAnchor link to section titled "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_urlthat redirects the merchant to accept or decline the charge.
If the merchant accepts the charge, then they're redirected to the
return_urlspecified when issuing the charge. The charge immediately transitions from
active. After the charge is activated (the charge is in an
activestate), you get paid.
If the charge is declined, then Shopify redirects the merchant and provides a notification message that the app charge was declined.
ConsiderationsAnchor link to section titled "Considerations"
Shopify Partners are more likely to recommend apps they've used before. Consider offering free app testing on development stores to help increase your app sales.
Learn how to offer free testing for development stores.
In this sectionAnchor link to section titled "In this section"
Billing concepts — Learn about the different methods of billing to help you choose the one that's best for your app.
Determine your billing model — Determine which billing model is best for your app using the REST Admin API.
Implement your billing model — Learn how to implement the billing model for your app with the REST Admin API.
Free trials — Encourage merchants to try your app by offering a free trial with the REST Admin API.
Refund an app payment — Respond to refund requests from merchants who use your app using the REST Admin API.
Upgrades and downgrades — Learn how to upgrade and downgrade a merchant's app subscription using the REST Admin API.
Charging for your app with the REST Admin API: FAQ — Frequently asked questions about charging money for your app with the REST Admin API.