Get start and end date of current billing cycle

Topic summary

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.

Summarized with AI on January 18. AI used: gpt-5.

Hi,

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.

Is there some way to do this?

Would really appreciate your help.

Kind regards,

Noah

1 Like

Hello @noah_haub !

Yes, you can use the subscription billing cycle query. You can add any of the SubscriptionBillingCycle attributes for the response(cycleStartAt and cycleEndAt).

Hope that helps!

1 Like

Ah perfect thank you very much man! I didn’t see that because I mostly use the REST API.

So thank you!

@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?

I have sort of found a workaround.

What I am doing to get the start and end date of the current billing cycle is this:

  • Get the currently active subscription (field needed: billing_on)

  • I use the billing_on date as the end date of the current billing cycle

  • I use the billing_on - 30 days as the start date of the current billing cycle (Because my billing interval is “EVERY-30-DAYS”)

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?