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?
Solved! Go to the solution
This is an accepted solution.
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 called
partner_test in the "plan_name" field (or
Developer Preview in the "plan_display_name" field).