Billing API and correct flow

Highlighted
Shopify Partner
71 7 24

Hi folks,

 

My question is this:

 

What is the correct flow if you wish to let the merchant use the app on a free plan and then upgrade later?

 

- Merchant installs app. I mark him in the database as free tier.

- I give him a button on the web app to upgrade.

- Merchant later presses the button which calls the GraphQL mutation addSubscriptionCreate on the server.

- I get the confirmation redirect which goes back to the UI for the redirect (redirect on server would give CORS error).

 

Or:

 

- Merchant installs app and the addSubscriptionCreate is initiated to ask the merchant if he would like free/paid tier.

- I mark him in the database as the tier he subscribed to and store the charge_id.

- We continue as normal.

- I guess then the above scenario would apply for upgrading a tier.

 

So I'm wondering which of the above flows is generally correct (or are there other options) and then what is the best way to implement an upgrade plan flow.

 

GMKnight.

Store owner and app developer. Canada.
0 Likes