Main goal: Determine the start and end dates of the current billing cycle to count orders for app-based billing.
Suggested approach: Use Shopify Admin GraphQL subscriptionBillingCycle query to fetch cycleStartAt and cycleEndAt.
Clarification needed: The OP is charging app users, not store customers. They note the GraphQL query requires a subscription contract (with delivery details) and sits under Orders, suggesting it may target storefront customer subscriptions rather than app billing. No confirmation provided.
Current workaround:
Retrieve the currently active subscription and read billing_on.
Treat billing_on as the cycle end date.
Compute the start date as billing_on minus 30 days (interval: EVERY-30-DAYS).
Open question: Another participant asks whether billing_on automatically updates to the next date after each successful recurring charge (e.g., 2023-09-05 → 2023-10-05). Unanswered.
Status: No definitive API method confirmed for app billing cycles; discussion remains open with an outstanding question about billing_on update behavior.
Im currently building an App that charges the user based on how many orders they get in one billing cycle.
To do that I need to know how many orders they received during the current billing cycle.
My thinking is this: Get the start and end date of the current billing cycle → Get the orders during these dates.
But I do not know how to get the start and end date of the current billing cycle.
@ChaseKaneki is the subscription billing cycle used for customers of stores or for customers of apps?
Because to use the subscription billing cycle query, I need a subscription contract.
And to create a subscription contract, I need to include things like delivery address etc.
Also this query is under the “orders” tab.
What I need is the start and end cycle of the users of my app, not the customers of a store.
Did I understand the subscription billing cycle query wrong?
Hi @noah_haub , I have a question whether the billing_on field will be updated if shopify successfully pays the old invoice in recurring plan?
Example my current billing_on is 2023-09-05, and 30 days pass and they are charged again, now billing_on will update to 2023-10-05?