I am a Shopify app developer.
I coded a Shopify app with usage based fee, however my clients are dangerously approaching the Capped Amount
Naturally I coded a button to allow my clients to change subscription plan to something with an increased capped amount.
But the problem is that during the testing phase, when I change the plan of a store, it looks like I lose all the money I have earned yet with this merchant. The Shopify balances goes to 0$ in the old subscription and the new subscription. I looked at the data that GraphQL get_subscription_info returns. Furthermore, in my Shopify partner dashboard, I see no trace that the money will be sent to me. It looks like the balance disappeared.
I tested with a Store on the basic Shopify plan, a test store and a development store.
Is this normal? Is someone aware of the problem. Do you have a recommended way to upgrade capped amount?
Solved! Go to the solution
Are you creating a new RecurringApplicationCharge with the button that lets the clients change their plan?
If so, its probably unwise.
I would rather suggest that you implement the PUT call for the recurring application charge, to update the capped amount. As always, the merchant needs to approve this change so make sure they are being directed to the update_capped_amount_url
Check out the REST references here:
This is definitely the solution for people using the REST APIs and I am sure this will be helpful for people seeing this post.
However, I am using the GraphQL APIs rather than the REST APIs. I am doing a new AppSubscriptionCreate (https://shopify.dev/docs/admin-api/graphql/reference/mutation/appsubscriptioncreate) with a new appUsagePricingDetails as plan.
Your answer brought me to search a way to mutate a subscription with the GraphQL APIs and I think that I found it: https://shopify.dev/docs/admin-api/graphql/reference/mutation/appsubscriptionlineitemupdate
I will try that.
Sorry, totally missed that you were using GraphQL.
Either way for REST or GraphQL creating a new recurring application charge is the wrong answer to update an existing capped usage charge value.
Looks like you’ve found the way to update the RAC with GraphQL. Great work!
This is an accepted solution.
Hey BStubbs no worries
I confirmed this morning that it is possible to mutate (increase) the capped amount of a subscription gracefully using "appSubscriptionLineItemUpdate" (https://shopify.dev/docs/admin-api/graphql/reference/mutation/appsubscriptionlineitemupdate) when using GraphQL APIs.
The balance is kept intact.