App billing models supported through the Billing API
Shopify’s GraphQL Admin API provides a set of resources that let you create a range of different app-billing models.
One-time app purchases
A one-time purchase creates a single charge, and needs to be approved by the merchant. There are two use cases for one-time purchases:
- Pay one time: Create a single charge. After purchase, the product is always available to the merchant. For example, you could sell an email template, or a one-time service that is paid for only once (no recurring charges).
- Pay as you go: Create multiple charges. You track the usage of your app and prompt the merchant with a new
AppPurchaseOneTimewhen usage has been exceeded. For example, you could sell credits for a certain number of emails and prompt the merchant for re-purchase after the emails are used. Shopify does not handle inventory in this scenario.
Learn more about one-time purchases
Recurring app subscriptions
A subscription purchase creates a recurring charge. There are two use cases for subscription billing:
Recurring charges: Create a fixed-value, 30 day or annual recurring charge. This type of charge is best suited to apps that provide continuing service to merchants.
Usage charges: Create app usage records to bill for variable usage. The total value of all usage records cannot exceed the capped amount.
Learn more about subscription charges
The AppCredit resource creates purchase adjustments for merchants who have the app installed. App credits are awarded immediately and are applied towards the merchant's future app purchases, subscriptions, or usage records. A corresponding deduction based on your revenue share is withdrawn from your Partner account. The total amount of all application credits awarded by an app cannot exceed the total amount the shop owner was charged in the last 30 days, or the total amount of pending payouts in your Partner account. The maximum amount of an app credit is $300.
You can implement your billing model using the AppPurchaseOneTime, AppSubscription, and AppCredit resources. To use any of these resources, you'll also need to implement a merchant trigger for the charge, such as app installation, service plan upgrade, or individual purchase.
Implement the AppCredit resource
To create an app credit, you can use the
If the credit exceeds the shop credit issue limit or pending receivable credit issue limit, then the appropriate error message is returned.