Solved

Embedded app change pricing(change recurring plan)

Petro_P
Shopify Partner
21 4 3

Hi,
I created a few pricing models for my app. When the user installs the app I  create a recurring application charge with a default pricing plan. But what I don't understand is - if a user decides to change the plan from Basic to Advanced(or any other that I have), how to update this on the backend?
I mean do I need to set up some sort of webhook and listen to recurring pricing updates? I can't find that in the documentation.
So basic flow:
1. User installs the app
2. Created a basic plan for the user(free)

3. Then, the user decides to change the plan to Advanced
4. Shopify should notify me about this and I need to send a new recurring application change(and the user should accept it again)? or what? or update the pricing somehow?
Can someone point to me how it should be done?

Loyalty and Rewards + Referrals app- Skymars Loyalty
Accepted Solution (1)

Visely-Team
Shopify Partner
1843 210 488

This is an accepted solution.

You can listen on shop/update webhook - https://help.shopify.com/en/api/reference/events/webhook - and match the plan_name field. If the plan_name is different from plan_name the customer was on at the installation time you'll have to delete the current recurring charge and create a new one. You'll then need to direct the customer to the charge acceptance URL (you can do that when your app loads in the admin) or send the link directly to the customer for approval. 

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog

View solution in original post

Replies 2 (2)

Visely-Team
Shopify Partner
1843 210 488

This is an accepted solution.

You can listen on shop/update webhook - https://help.shopify.com/en/api/reference/events/webhook - and match the plan_name field. If the plan_name is different from plan_name the customer was on at the installation time you'll have to delete the current recurring charge and create a new one. You'll then need to direct the customer to the charge acceptance URL (you can do that when your app loads in the admin) or send the link directly to the customer for approval. 

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
Petro_P
Shopify Partner
21 4 3

Thank you.

Loyalty and Rewards + Referrals app- Skymars Loyalty