Adding RecurringApplicationCharge to my App

__will
Tourist
4 0 0

I have an app in development that enables users of a website to add a snippet to their theme and import products to their account on our site.  Note, this isnt an embedded App.  It just queries the Admin API.

Shoppify stipulate that if the Merchant uses a Shopify App then the subscription for our service needs to be taken using their Billing API

What is best practice for doing this?  I'd like to offer two plans, $20 & $40. 

I have added them to my draft listing.

Now on my website, when the user clicks and is sent to shopify to instal the app, do I then redirect to a page on my site to select the plan and then make a post to  make then RecurringApplicationCharge:

ShopifyAPI::RecurringApplicationCharge.create({:name => "Basic Plan", :price => 15.0, :trial_days => 7

And then store and ID or whatever comes back in our db. Then, whenever we want to check the subscription is active, we should querry for the charge and check its active

charge = ShopifyAPI::RecurringApplicationCharge.find(654381177)

So what I'm asking isn't about the specific code, the docs are sufficient I think.  Also not asking "should I or can i bill with shopify api" - they insist and i can.

I'm asking do i do this whenever in my UX flow I want to, within my own page, with my own site look and feel  / css? Or is there a mandated Shopify way?

 

 

 

 

 

0 Likes