Where would I change test flag to null for allowing appSubscriptionCreate mutation to charge store
Received the shopify welcome email for my recently launched app.
In it it has this line "If you intend to charge merchants using your public app, make sure the test flag is set to null. This allows the appSubscriptionCreate mutation to charge the credit card on file."
I did not ever set this to test since when use a dev store the charges were waived since it was recognized as a dev store.
Is there a particular place in the codebase or a setting in the Production codebase of the app where I need to update this so that the app knows to charge the merchant's card on file? Could someone point me in the right direction.
5 Replies
I asked gadget ai, is this correct?:
Since your app is:
✅ In production mode on Gadget
✅ Approved and live on the Shopify App Store
✅ Available for live merchants to install directly
Then yes, the billing will work correctly for real charges because:
Shopify manages the test/live determination - not your app code
When a live merchant (not a development store) installs your app and subscribes, Shopify automatically processes it as a live transaction
The test fields in your Shopify models (shopifyAppSubscription, shopifyAppPurchaseOneTime, etc.) will be set to false for live merchants
Shopify will charge their actual payment method on file
You don't need to change any flags in your Gadget app code. The test/live mode is entirely determined by:
Whether the installing store is a development store (test) vs. a live merchant store (live)
Your app's approval status in the Partner Dashboard (which you've confirmed is live)
So live merchants installing from the App Store will be charged real money through Shopify's billing system, and the test boolean fields will automatically reflect false for these transactions.
Hi David, there shouldent be anything needed on the Gadget side unless youre setting up custom subscription plans
Thanks
Ill mark this thread as closed now, if you have any further questions feel free to re-open with a reply
Do you like this answer?