Losing Usage fee balance when increasing capped amount. HELP!

Solved
Highlighted
Tourist
9 3 2

Hi,

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?

Thank you

0 Likes
Highlighted
Shopify Partner
67 6 14

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:

https://shopify.dev/docs/admin-api/rest/reference/billing/recurringapplicationcharge#customize-2020-...

 

Was this helpful? Press like!
Did it fix the problem? Mark it as the solution for others!
Buy me a beer? Well, sure!
1 Like
Highlighted
Tourist
9 3 2

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. 

Thank you

Phil

0 Likes
Shopify Partner
67 6 14

Hi Phil,

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!

Was this helpful? Press like!
Did it fix the problem? Mark it as the solution for others!
Buy me a beer? Well, sure!
1 Like
Highlighted
Tourist
9 3 2

This is an accepted solution.

Hey 

The balance is kept intact. 

Cheers

0 Likes