About billing for your app
The app billing API resources are specific to and mandatory for all listed and unlisted apps that are distributed through the Shopify App Store, unless Shopify has notified you otherwise. Contact us if you have questions or concerns.
Use the GraphQL Admin API and Partner API's billing resources to process charges using Shopify’s merchant invoicing system. You can view data on app charges using the Partner Dashboard and the GraphQL Admin API.
Why use Shopify's app billing resources
Anchor link to section titled "Why use Shopify's app billing resources"Shopify's app billing resources provide the following benefits:
Simplified payment process: Charges are directly added to the merchant's Shopify invoice.
Increased conversion rates: Apps that use the billing API resources experience higher rates of customers transitioning from free to paid versions, because charges originate directly from Shopify.
Revenue sharing: You automatically receive a share of the revenue that Shopify collects.
Chargeback handling: Shopify handles all chargeback-related processes.
Flexible pricing models: You can choose your pricing model and set your own prices. Shopify collects funds and ensures timely payments.
Billing process
Anchor link to section titled "Billing process"The following diagram describes the app billing process and the roles taken by merchants, your app, and Shopify.
- A merchant starts an action that includes a charge, such as an app installation, a service plan upgrade, or an individual purchase.
- Your app creates a charge for the merchant, using either the
appPurchaseOneTimeCreate
or theappSubscriptionCreate
mutation. - Shopify verifies the charge and returns a
confirmationUrl
, which is a page that Shopify hosts for the merchant to approve charges. - The app should redirect the merchant to the
confirmationUrl
, where the merchant either approves or declines the charge. - If the merchant accepts the charge, then they're redirected to a
returnUrl
that your app specified when it issued the charge. If the charge is declined, then Shopify redirects the merchant to the Shopify admin, and provides a notification message about the app charge being declined.
App actions to set up purchases
Anchor link to section titled "App actions to set up purchases"The app billing process requires your app to perform actions that set up purchases.
Configure a pricing model
Anchor link to section titled "Configure a pricing model"A pricing model is how you monetize your app. Each pricing model configuration must contain an amount
, a currencyCode
, and an interval
. You can also set the parameters that are allowed by the GraphQL Admin API's appSubscriptionCreate
and appPurchaseOneTimeCreate
mutations that are used for the charges.
Remix apps can set up plans by passing in the billing
configuration when shopifyApp
is called.
Learn more about pricing models.
Gate requests
Anchor link to section titled "Gate requests"Gating requests require merchants to pay for the app before they can access specific routes. To gate requests, you can verify whether there's an active payment and require one if there isn't. The following is an example for the process:
Indicate which plans enable access to a specific route.
Pass a check to determine if there's a purchase for any of the plans.
Require a purchase if one isn't detected.
Remix apps can use the admin.billing.require
function. The function verifies that there's an active payment and requires one if there isn't. You can send multiple plans to require
. It passes if there's a purchase for any of the plans and returns information on the active purchase.
Request payment
Anchor link to section titled "Request payment"If your billing check doesn't find a purchase, then you can decide where to take the merchant. The following are examples:
Request payment right away for one of the purchase configurations.
Redirect the merchant to a page where they can select a plan.
- In the plan selection page, you'll need to authenticate with the GraphQL Admin API for access. Remix apps can call
authenticate.admin
.
- In the plan selection page, you'll need to authenticate with the GraphQL Admin API for access. Remix apps can call
Pricing models
Anchor link to section titled "Pricing models"The pricing model determines the charges that are collected for your app.
You can use Shopify's app billing API resources to implement one or more of the following models:
Type | Description | Use cases | Learn how |
---|---|---|---|
Subscription fee | Charge either an annual or 30-day recurring fee to use the app, charge a capped fee based on usage, or employ both. |
Charge a capped fee for dropshipping. Charge merchants a fee every 30 days and a fee per SMS message sent on their behalf. |
|
One-time purchase | Charge once for the app, or charge once to enable limited use. |
Charge merchants a flat fee for translating their storefront. Enable merchants to purchase credits to use in your app. |
One-time charges and multiple one-time charges |
Pricing adjustments
Anchor link to section titled "Pricing adjustments"A pricing adjustment modifies an app's subscription fee or price. App billing API resources support the following price adjustments:
Type | Description | Eligibility |
---|---|---|
App credits | Grant a sum that merchants can put towards future purchases, subscriptions, or usage charges. | Merchants who have the app installed |
Subscription discounts | Offer a percentage or fixed-price discount on an app subscription for a set number of billing cycles. | New subscribers Merchants with existing subscriptions |
Free trials | Delay the start of an app's billing cycle by a number of days. This enables merchants to experiment with apps before they commit to paying. Available only to merchants that agree to a new subscription. Can't be added to existing subscriptions. |
New subscriptions only Can't be added to existing subscriptions |
Refunds | Issue a full or partial refunds for a specific app charge. | All users |
Supported currencies
Anchor link to section titled "Supported currencies"You can match your app charges to a merchant's local billing currency if they use one of the supported currencies.
Retrieve the merchant's local billing currency with the GraphQL Admin API's shopBillingPreferences
query, passing the currency value as input.
Webhook topics
Anchor link to section titled "Webhook topics"In addition to the mandatory webhook topics, Shopify provides the following webhook topics for billing:
APP_PURCHASES_ONE_TIME_UPDATE
: Triggered when the status of anAppPurchaseOneTime
object is changed.APP_SUBSCRIPTIONS_UPDATE
: Triggered when the status, or capped amount, of anAppSubscription
object is changed, and when a subscription's status changes.APP_SUBSCRIPTIONS_APPROACHING_CAPPED_AMOUNT
: Triggered when the balance used on an app subscription crosses 90% of the capped amount.
Developer tools and resources
Anchor link to section titled "Developer tools and resources"Explore the developer tools and resources available for app billing:
Best practices
Anchor link to section titled "Best practices"Consider the following best practices when developing your app's pricing model:
Practice | Benefit | Example |
---|---|---|
Provide simple and intuitive pricing | Makes it easier for merchants to understand the pricing model and encourages adoption | If your app provides a single set of features for all merchants, then consider setting up time-based subscriptions at 30 or 365-day intervals. |
Limit the number of plans | Makes it easier for merchants to compare plans and identify which plan works best for them. | If your app provides tiered features, then consider setting up a basic plan and a pro plan .Set one plan that includes ads and a second plan that's add-free. |
Offer free trials | Encourages merchants and Partners that develop stores for merchants to try your app before they pay for it. This helps users learn your app's value and recommend the app to others. | A 30-day period where the app is used free of charge, which transitions to an annual paid plan after that. |
Create charges in the merchant's local billing currency | Enables merchants to better budget their app spend, which prevents confusion and provides a better app experience. | If a merchant is in India, then bill them in Indian Rupees (INR). If they're in Canada, then bill them in Canadian Dollars (CAD). Refer to supported currencies. |