Best practices to charge apps

Best practices to charge apps

Shopify Partner
9 0 3

Hi there,


I already checked the documentation but I'm not sure about the best way to charge for public apps.

I have some questions regarding app charges:

  • When should the app post a charge to the shopify instance? From what I understood, in the examples they create the charge on the "afterAuth". However, I saw some apps presenting the billing options available.
  • Should we store on a database the charge applied to a user? I'm not sure how to deal with charging upgrades, may be storing them should help.
  • Are the tests charges deleted when a new one is created? I have 25 test charges
  • Should we check if the trial is over manually or Shopify does that?
  • When upgrading a charge, should we delete the previous one and create a new one?


Thank you.

Replies 3 (3)

Shopify Partner
9 0 3


Shopify Staff
297 31 90

Hey there,


When it comes to the Shopify Billing API, a lot of these decisions are really up to you as the partner, and we have seen various apps approach things differently based on their specific use case. I'll answer as generally as I can, but that doesn't mean there is a "right" way to implement your billing logic.


  1. If your app is a paid app, then creating the charge (if it's a Recurring Application Charge) immediately after the authorization flow is the most common approach. However, if you also have a free version, then you may not need to create the charge until they attempt to make use of a "premium" feature. This could also include you having a page dedicated to billing options as you mentioned, where all the various features are listed for each tier of your app (if this is something your app includes).
  2. It is up to you if you'd rather store billing information for active charges in your database server side, or if you'd rather make requests to the associated API endpoints to retrieve the information on the fly. When it comes to implementing logic to deal with upgrades/downgrades, both are possible, although storing the information would likely result in less overall API calls needing to be made. For example, if you have a pricing structure which depends on overall number of orders processed during the billing cycle, you would begin by creating a RecurringApplicationCharge for the cheapest tier, once they pass the order threshold into the next tier, you would create a new RecurringApplicationCharge with the updated price. In this example, you could choose to store simply the total number of orders that you've processed as well as the plan they are on, and only create the new RecurringApplicationCharge once the threshold has been passed.
  3. Which test charges are you referring to? Both RecurringApplicationCharge's and ApplicationCharge's have a test property, and test transactions act the same way as their non-test equivalent. Meaning you can only have one active "test" RecurringApplicationCharge on a shop per app, but you can have a countless number of "test" ApplicationCharge's. 
  4. Shopify will automatically begin the paid billing cycle for your app once the trial period is over. 
  5. Each shop can only have one active Recurring Application Charge per app. When you create and activate a new Recurring Application Charge, the existing recurring charge is canceled and replaced by the new charge.

Let me know if you have any follow ups, but everything you're looking to accomplish is definitely possible. The logic would just live within your application.

To learn more visit the Shopify Help Center or the Community Blog.

3 0 0

Could you clarify how shop owner will be billed for using any app if he changed several plans during the one day?

Plan A -> Plan B -> Plan C