Hello Shopify Dev Team,
I am reporting an issue regarding the appSubscriptionCreate GraphQL mutation, specifically when using the parameter replacementBehavior: APPLY_ON_NEXT_BILLING_CYCLE.
Problem Description
During the subscription upgrade/downgrade flow:
-
When creating a new app subscription with
replacementBehaviorset toAPPLY_ON_NEXT_BILLING_CYCLE, the billing page correctly displays a message to the merchant indicating that the change will take effect at the end of the current billing cycle. -
However, immediately after the merchant approves the change, our application receives two webhook payloads from the
app_subscriptions/updateendpoint:-
One payload indicates the cancellation of the current active subscription.
-
Another payload indicates the activation of the new subscription.
-
This observed behavior—where the old subscription is canceled and a new one is activated immediately—contradicts the expectation set by the APPLY_ON_NEXT_BILLING_CYCLE option, which should delay the application of the new plan until the next billing cycle.
Expected Behavior
When replacementBehavior: APPLY_ON_NEXT_BILLING_CYCLE is used, the existing subscription should remain active until the end of its current billing period. The new subscription plan should only become active at the start of the next billing cycle. The immediate cancellation of the old subscription and activation of the new one is unexpected.
Steps to Reproduce
-
Have an active recurring application charge for a shop.
-
Call the
appSubscriptionCreatemutation with a new plan andreplacementBehavior: APPLY_ON_NEXT_BILLING_CYCLE. -
Direct the merchant to the generated
confirmationUrl. -
As the merchant, approve the change on the billing page (which correctly states the change will apply later).
-
Observe the webhooks sent to the
app_subscriptions/updateendpoint, which show immediate cancellation of the old subscription and activation of the new one.
Additional Context
This behavior causes confusion in application logic that relies on the webhook data to track a shop’s active subscription status. The immediate activation also seems inconsistent with the prorated billing model typically associated with plan changes applied in the next cycle .
Could you please clarify if this is the intended behavior or confirm if it is a bug? If it is a bug, we request a fix to align the system’s action with the parameter’s description.
Thank you for your time and assistance.