I found this by clicking my own Subscribe button, which is a thing I apparently only do when I am already suspicious.
The button was on the Starter plan card inside the app's embedded admin. It posted to a server action, the action called Shopify's GraphQL appSubscriptionCreate, and Shopify returned:
Cannot use the Billing API (to create charges) when on Shopify App Pricing.
Not a validation error. Not a permissions error. A statement about the app's configuration, delivered by the API that had been the correct way to charge for a Shopify app for years.
The app is a product-feed tool. Three plans: free, starter, pro. The free plan caps how many products it will scan. The paid plans raise the cap. There is nothing exotic about the model — which is exactly why the code was written the way it was: create a recurring application charge, redirect the merchant to the confirmation URL Shopify returns, and trust the webhook to tell you the subscription became active. That is the documented path, and it worked.
It stopped working because Shopify changed the default. New apps are placed on Shopify App Pricing — a model where Shopify hosts the plan-selection page and owns the subscription. And once an app is opted in, the Billing API refuses to create new recurring charges. Not "warns". Not "deprecates". Refuses, with the error above.
Nothing in my repository changed. Nothing in my deploy pipeline changed. The platform changed a default on an app that was already configured, and the code that had been correct became a 500 on the only screen that takes money.
Why it was invisible until the worst possible moment
Every test I had ran against a free plan. The free plan does not call the billing API at all, so the entire paid path was untested in production — not because I was lazy, but because testing it required a real subscription in a development store, and that felt like a thing to do "before launch". The failure had a deadline attached, and I found it before the deadline.
If I had found it a week later, the sequence would have been: a merchant decides to pay, clicks Subscribe, gets an error page, and leaves. No webhook fires, so no alert fires. My dashboard would show one fewer conversion than I expected, which is indistinguishable from nobody wanting the product.
That is the shape of this class of bug. It is not loud. It fails at the exact moment a stranger has decided to give you money, and then it deletes the evidence.
The migration, which is mostly a state-machine change
The old model: my code owns the subscription. I create the charge, I redirect to Shopify's confirmation, I receive APP_SUBSCRIPTIONS_UPDATE, I write the plan into my database.
The new model: Shopify owns the subscription. The merchant clicks a button that navigates to a Shopify-hosted pricing page. Shopify handles the approval, the trial, the card, the tax. When it is done, it sends the merchant back to my app with a query parameter naming the plan they chose. My job is to read that parameter and write it down.
Four files changed:
| File | Change |
|---|---|
app/services/plan-selection.server.ts (new) |
plan handle → tier mapping, hosted URL construction, reverse mapping from the returned handle |
app/routes/app.billing.tsx |
the entire server action deleted — no Billing API calls remain |
app/services/supabase.server.ts |
added setStorePlan()
|
app/routes/app._index.tsx |
read ?plan_handle= on load, persist it, apply the new quota immediately |
The part that would have been easy to miss is the last one. If you build the redirect to the hosted pricing page and forget to handle the return, the merchant pays, Shopify approves, and your app still believes they are on the free plan. The charge exists, the entitlement does not, and the merchant has no way to tell you except a support email. A 500 is a bug that announces itself. A missing plan_handle handler is a bug that quietly takes money and delivers the free tier.
So the round trip is now a single test: start on free with a scan cap of 10, select the starter plan, approve it, land back on /app?plan_handle=feedglance-starter, and assert the database says STARTER and the cap says 2,000.
What I gave up
Authoritative subscription state. The correct source of truth is the Partner API's activeSubscription — it knows the real billing period, whether the merchant cancelled, whether the subscription is frozen for non-payment. I did not wire it up. I store the plan handle that Shopify handed back, which covers the happy path and nothing else. If a merchant cancels from the Shopify admin instead of from my app, my database will keep saying they are on the starter plan until something else corrects it.
I took that trade deliberately, and the reasoning is uncomfortable to write down: building the Partner API integration required creating an API client in a dashboard I do not control, and I wanted the paid path working before the submission window closed. So the plan is now a value that Shopify sets once and I never re-verify. That is fine while there are zero paying merchants. It is not fine at the first cancellation, and I know exactly which bug I have scheduled for myself.
Control of the paywall. The pricing page is Shopify's now. I do not own the layout, the copy density, the ordering, or the analytics. I cannot A/B test a plan name. I cannot add a "most popular" badge. In exchange, I do not own the card form, the SCA flow, the tax calculation, or the refund path — which is a much better trade for a one-person product than it sounds, but it does mean the highest-intent screen in my funnel is a page I have never seen on mobile.
The self-built subscription record. The old action created the charge and stored its ID, so I had a local row per subscription with a Shopify-side identifier I could reconcile against. That row is gone. The new state is one column: a plan handle string. Fewer moving parts, much less to debug with, and no way to answer "which subscription is this charge from" without going to the Partner dashboard.
The one string I could not verify
The hosted pricing page URL contains the app handle:
https://admin.shopify.com/store/{shop}/charges/{handle}/pricing_plans
The docs say the handle comes from shopify.app.toml. My project does not define it there, so I defaulted it to the app name and deployed. Every other part of the flow I could test from a terminal. This one segment I could not: it either renders three plans or it 404s, and the only way to know is to open it in a real store while authenticated as a merchant.
So I asked the account owner to click one link and tell me whether three plan cards appeared. That is the honest version of shipping this change: four files of code I could verify, one URL segment I could only guess at, and a human in the loop for the difference. If the handle turns out to be wrong, the fix is an environment variable, not a rewrite — but I would rather write that down than pretend the deploy was fully verified.
The check I run now
grep -rn "appSubscriptionCreate\|appUsageRecordCreate" app/ || echo "clean"
Any hit means the code is written against a billing contract this app is no longer on. It takes a second, it would have caught this before a merchant did, and it belongs in CI rather than in my memory. The deeper version of the same check is a list of platform defaults that can change under a deployed app — billing model, distribution channel, API version — because those are the changes that no diff in my repository will ever show me.
Question
If your monetisation path depends on a platform-owned default that can flip without a deploy on your side, how do you find out before a customer does? I am asking because my answer right now is "click the button myself, occasionally", which is not a system — it is a habit that happens to have worked twice. What does the automated version of that habit look like for you?
Top comments (1)
The line that will stick with me is "nothing in my repository changed, nothing in my deploy pipeline changed — the platform changed a default." That is the scariest sentence in software: a bug you can neither reproduce from your git history nor prevent with a test suite, because the thing that broke was a configuration choice made somewhere else.
Two details show real craft here. First, the missing ?plan_handle= handler as "a bug that quietly takes money and delivers the free tier" — that's the exact failure where the system looks fine (payment succeeded!) while the customer gets nothing. Second, the honesty about the trade-offs: giving up authoritative subscription state and admitting you haven't built the Partner API activeSubscription check yet. Most people would have hand-waved that part.
To answer your question: the only reliable tripwire I've found for a platform default that can flip under you is a synthetic merchant journey — a scheduled check that actually walks the paid path on a dev store (click subscribe, confirm the hosted page loads, confirm the plan lands in the DB), not just a grep for the old API names. The grep tells you your code is clean; it can't tell you the platform moved.
One sharp question: that one string you couldn't verify — the pricing page handle defaulted to the app name — did the account owner confirm the three plan cards, and if the handle had been wrong, would the merchant have landed on an error page or silently on the wrong plans?