Solved

How to let other development stores (e.g., agency) install my app when using the Billing API?

policenauts1
Trailblazer
174 13 39

I swear I've seen this somewhere in the documentation before, but I can't seem to find it - I sometimes get installs on my app that appear to be agencies testing out the app using a development store, and as such I know they can't create a valid charge id and hence my app won't work properly for them. Is there some kind of flag to detect when it's a development store coming through to my app? 

Accepted Solution (1)

_JB
Shopify Staff
836 100 222

This is an accepted solution.

Hey @policenauts1,

When creating the charge, you can use the shop endpoint to check which plan the shop is using, and set "test": true when creating the charge (doc link here). This way you can keep your billing flow intact; the user will still need to accept the charge but they'll see a banner indicating it's a test and their card won't be charged. The plan for shops on a developer preview is calledpartner_test in the "plan_name" field (or Developer Preview in the "plan_display_name" field).

JB | Solutions Engineer @ Shopify 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Reply 1 (1)

_JB
Shopify Staff
836 100 222

This is an accepted solution.

Hey @policenauts1,

When creating the charge, you can use the shop endpoint to check which plan the shop is using, and set "test": true when creating the charge (doc link here). This way you can keep your billing flow intact; the user will still need to accept the charge but they'll see a banner indicating it's a test and their card won't be charged. The plan for shops on a developer preview is calledpartner_test in the "plan_name" field (or Developer Preview in the "plan_display_name" field).

JB | Solutions Engineer @ Shopify 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog