Managing subscriptions

How recurring billing runs

What the hourly maintenance job does, and why creating each billing attempt is the app's job rather than Shopify's.

Shopify does not automatically charge app-managed subscriptions. Creating the billing attempt for each due cycle is the app's job, and it happens on a schedule with nothing for you to configure.

The schedule

A maintenance job runs hourly. On each pass, for every store with the app installed, it:

  1. Reconciles subscription contracts from Shopify, if that store is due a reconcile.
  2. Creates a billing attempt for every active subscription whose next billing date has passed. This is what fires the recurring order.
  3. Advances the retry ladder for any failed cycle that is due another attempt.
  4. Refreshes churn scores and the headline metrics on your dashboard.
  5. Rolls up the day's numbers for the trend charts.
  6. Sends the weekly summary email, if you have opted in and a week has passed.

Why it is built this way

The scheduler runs inside the app itself rather than as an external cron service, so there is no separate scheduled task to misconfigure or silently lose. It never overlaps itself, and one store's failure never stops the sweep for the others: an error is recorded against that store and the job moves on.

Charges use an offline connection, not a stored raw token. Recurring billing has to work when nobody is logged in. The app obtains an authenticated admin connection per store at the moment it needs one, which is what keeps billing working after Shopify rotates an app's offline token.

Related articles