Issue: A Shopify post-purchase extension successfully adds a subscription product to the order but fails to create the subscription contract, returning “subscription_contract_creation_error” for selling_plan_id 848658599.
Key details:
Post-purchase extension: offers a subscription after checkout; expected to create a subscription contract (the ongoing billing agreement) tied to a selling plan (defines subscription terms).
Changeset provided by the merchant shows sellingPlanId 848691367, not 848658599 noted in logs, indicating a possible ID mismatch.
Example order context includes a one-time product (“Batman”) and a subscription product (“Supplement”).
Support investigation:
Shopify support requested and reviewed the changeset payload.
They observed some subscription contracts were recently created, but the merchant clarified those were from the product page flow, not the post-purchase extension.
Current status:
The post-purchase flow consistently fails (not intermittent) for the provided changeset.
Cause remains unclear; investigation is ongoing.
Open items:
Confirm the correct sellingPlanId being sent by the post-purchase extension.
Determine why contract creation fails specifically in the post-purchase flow.
Summarized with AI on February 25.
AI used: gpt-5.
I’ve a shopify post-purchase extension that offer clients a subscription, but when the custumer accepts the agreement term in the extension and finalize it, the extension insert the subscription product in the order but have an error creating contract:
subscription_contract_creation_error
A subscription contract could not be created for the add_subscription change with selling_plan_id 848658599
Thanks for providing the error message and selling plan ID, that made it easier for me to find your HTTP requests in our logs. I’ll give you an update as soon as I make sense of what’s happening.
In order to progress with the investigation, I would need to know the changeset payload that you’re applying for the order above (Batman as the one-time product, and Supplement as the subscription). Could you share this information with me please?
Thank you ThiagoMine. The only surprising thing in this changeset is the selling plan ID. I was expecting 848658599 rather than 848691367 from what I saw in our logs.
I see some subscription contracts created recently. Does the post-purchase extension create the contracts successfully now? If not, is the problem intermittent or always happening for a given changeset?