Re: Setting-up billing for Partner Friendly apps

Solved
Shopify Partner
8 1 0

Here's more details. This is how we think the API should be used:

 

First get the plan_name:

GET /admin/api/2019-07/shop.json?fields=plan_name

 

The response contains the plan_name property:

{
  "plan_name": "affiliate",
}

Usually we would create the charge with something like:

POST /admin/api/#{api_version}/recurring_application_charges.json
{
  "recurring_application_charge": {
    "name": "Super Duper Plan",
    "price": 10.0,
    "return_url": "http://super-duper.shopifyapps.com",
    "trial_days": 5
  }
}

 

That is not correct for plan_name: affiliate. What is the correct code?

 

0 Likes

Success.

Community Manager
Community Manager
619 46 79

Hi @ARF,

 

Since your post is specific to implementation of partner friendly billing, I've moved your post to our API board.

 

The best solution, in my opinion, is to fetch the shop's plan upon installation as well as subscribing to shop/update webhooks. This will allow you to stay in the loop on plan changes in the future.

 

If an install is on the affiliate plan, do not create a charge within Shopify. Then, if you receive a shop/update notification indicating the plan has changed, create the charge for whatever plan is chosen by the merchant. Of course, you will need to gate access to your app accordingly at that point.

 

Cheers,

0 Likes
Shopify Partner
8 1 0

Thanks @Busfox. I was under the impression that when a partner signs up for the app he agrees to incur charges when the app goes live. However, it seems that the partner will have to also agree to the charge after going live.

Which is true? If the former, please explain the details.

 

Thanks much.

0 Likes
Highlighted
Community Manager
Community Manager
619 46 79

Hey @ARF,

 

The merchant always needs to approve a new charge, regardless of when it's created. This would happen when your app redirects them to the page to accept the charge. You have control over when you do this, if at all. To give the app for free you would create no charge, and thus need no acceptance from the merchant around billing. We give a high level view of the steps when it comes to billing here.

0 Likes