Hi everyone, I’m looking for clarification on how the app_subscriptions/update webhook behaves in production. Specifically:
IDs & billing cycles
In a live environment, do the subscription ID and cycle remain the same across updates, or can either change?
Webhook payloads vs. test behavior
In production, should we expect the same sequence we see in tests (e.g., status of payload 1: CANCELLED and status of payload 2: ACTIVE)?
Will the payload include information about prorated or deferred charges?
Tracking cycles best practices
Is there a recommended way to track the current billing cycle via the Shopify API? Or is it better to maintain this state on our side (e.g., with a scheduled job/cron) and reconcile from webhook events?
If anyone else stumbles across this, I’ve managed to figure out a few things:
The billing cycle in live behavior stays the same. There are two examples of this in other posts here (link1, link2).
In the replacement behavior of the appSubscriptionCreate request,and in the docs, I still haven’t found clear information about how prorated or deferred charges are handled.
However, through the billing object, or with a simple GraphQL query, you can retrieve the relevant billing dates and keep them up to date yourself.
When using replacement behaviour, the subscription in the API will change at the time the merchant accepts the plan change since it’s not possible to have 2 subscriptions at the same time. The replacement is specifically for when the new billing is applied.
If it’s deferred to the next billing cycle, the merchant will pay the new charge at the start of the next billing cycle.
If the replacement is immediate, then the merchant will receive the standard proration or deferral behaviour.
Sorry for the misunderstanding, my wording wasn’t clear. What I meant to ask is: when a subscription change results in prorated or deferred charges, will the deferred/prorated amount be included in the app_subscription/update webhook, or do I need to calculate it myself?
I’m testing with Bogus and I’m not seeing any difference in the price even when I change the replacment behavior, so I’m unsure what to expect.