Skip to content

Billing and usage cycles

SaveLayer enforces per-shop request limits that reset on a monthly billing cycle boundary.

How plan state is resolved

SaveLayer uses Shopify's managed app pricing. The merchant's active subscription, as reported by the Shopify Partner API, is the single source of truth for the shop's plan. SaveLayer mirrors that state into the shop's gate on app load, after a checkout return, and on a periodic background reconcile — there is no billing webhook to configure.

Usage resets at the start of each new monthly billing period, aligned to the subscription's billing anchor date.

For example: if a merchant's subscription was created on the 14th, their usage resets on the 14th of each month.

How it works:

  1. SaveLayer reads the subscription's billing anchor date from the Partner API and stores the anchor day (1–31) with the shop's plan state.
  2. On each request, SaveLayer lazily checks whether the anchor day has passed since the last reset. If it has, usage is reset immediately before the request is counted.
  3. The previous cycle's usage is archived to billing history.

Edge cases:

  • If the anchor day exceeds the number of days in a given month (e.g., anchor is the 31st and the current month has 30 days), the reset uses the last day of that month.

Free plan

Free plan usage resets on the first day of each calendar month (UTC).

Checking current usage

Current usage and cycle information is available via the getUsageState RPC or the usageState field in any gate response.

json
{
  "planKey": "starter",
  "requestsUsed": 842,
  "requestLimit": 5000,
  "cycleKey": "2026-04-14",
  "billingInterval": "EVERY_30_DAYS",
  "billingOn": "2026-04-14T00:00:00Z"
}

The cycleKey field identifies the current monthly billing sub-cycle. Paid plans use a full YYYY-MM-DD date anchored on the billing period (so each rolling 30-day cycle is uniquely identified); the Free plan uses a YYYY-MM calendar-month key.