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 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:

  1. A merchant triggers a charge with an event that you've identified, such as app installation, service plan upgrade, or individual purchase.

  2. The app creates a charge for the merchant, which might be a recurring or one-time charge.

  3. Shopify verifies the charge and returns a confirmation_url that redirects the merchant to accept or decline the charge.

  4. If the merchant accepts the charge, then they're redirected to the return_url specified when issuing the charge. The charge immediately transitions from pending to active. After the charge is activated (the charge is in an active state), you get paid.

  5. 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.

In this section