Programming
We provide developers and engineers the guides and tutorials they...
Search
We provide developers and engineers the guides and tutorials they...
Content is king. It's not just about how you're going to write, b...
Looking for an engaging connection with thousands of other people...
App Store apps must bill through Shopify. In May 2026 Managed Pricing became Shopify App Pricing and the Billing API became legacy. Here's which to use, how to set it up, and the code for each.
Our badge app works across the admin, product pages and the storefront (part 5). Now let's charge for it.
Also Read: 5 Vital Marketing Marketing Strategy Strategies for SaaS Companies
Billing changed a lot in 2026. In May 2026, "Managed Pricing" was renamed Shopify App Pricing and became the default for new public apps. The GraphQL Billing API still works, but Shopify now calls it legacy ("Manual Pricing"). Most tutorials online still teach the old way.
Series: Shopify App Development 2026, part 6 of 8
If your app is on the Shopify App Store, you must charge merchants through Shopify. Stripe checkouts, PayPal links and "email us for an invoice" all break App Store requirement 1.2.1, and Shopify will reject the app (billing overview). Two related requirements:
In return, charges appear on the merchant's normal Shopify invoice. That means less friction for them and no card handling for you.
Also Read: Programming Guide
(Custom apps can't use Shopify billing at all. You invoice those clients directly.)

| Shopify App Pricing (recommended) | Manual Pricing (legacy Billing API) | |
|---|---|---|
| Recurring plans (monthly or annual) | ✅ | ✅ |
| Usage-based charges | ✅ via the App Events API | ✅ via appUsageRecordCreate |
| One-time charges | ❌ | ✅ appPurchaseOneTimeCreate |
| Hosted pricing page | ✅ Shopify builds and hosts it | ❌ you build it |
| Trials, proration, upgrades and downgrades | ✅ handled for you | You handle them |
| Code needed | A redirect, plus a subscription check | Mutations, return URLs, approval handling |
The short answer: use Shopify App Pricing unless you need one-time charges. There's no deprecation date for the Billing API, so existing apps don't have to migrate (Shopify App Pricing docs).
Also Read: Web Development: How to Publish
With App Pricing you define plans in a dashboard and Shopify hosts everything else: the plan selection page, trials, proration, upgrades, downgrades and cancellations.
In the Partner Dashboard, go to App distribution → Manage listing → Pricing content → Settings, then set Pricing method to Shopify App Pricing. Add your plans there.
For TWT Product Badges we'll use:
Also Read: Web Development: Shopify GraphQL Admin
| Plan | Price | Includes |
|---|---|---|
| Free | $0 | Badges on up to 10 products |
| Pro | $4.99/month, 7-day trial | Unlimited badges, custom colours |
Once you opt into Shopify App Pricing, you can't create new recurring charges with the Billing API for that app. Choose deliberately.
Shopify hosts the plan selection page at a predictable URL:
https://admin.shopify.com/store/{store_handle}/charges/{app_handle}/pricing_plans
app_handle is the handle in your shopify.app.toml. Here's a route that sends the merchant there. It type-checks against @shopify/shopify-app-react-router 3.0:
// app/routes/app.plans.tsx
import type { LoaderFunctionArgs } from "react-router";
import { authenticate } from "../shopify.server";
// Sends the merchant to Shopify's hosted plan selection page
// (Shopify App Pricing). `handle` is the handle in shopify.app.toml.
const APP_HANDLE = "twt-product-badges";
export const loader = async ({ request }: LoaderFunctionArgs) => {
const { session, redirect } = await authenticate.admin(request);
const storeHandle = session.shop.replace(".myshopify.com", "");
return redirect(
`https://admin.shopify.com/store/${storeHandle}/charges/${APP_HANDLE}/pricing_plans`,
{ target: "_top" },
);
};
target: "_top" matters. The admin page has to navigate the whole browser window, not just your app's iframe. Add an "Upgrade" link to /app/plans in your nav or on a gated feature. After the merchant picks a plan, Shopify redirects back to your app with plan_handle and shop query parameters.
For Shopify App Pricing, Shopify's docs say to check subscriptions with the Partner API, not the Admin API (activeSubscription):
query ActiveSubscription($appId: ID!, $shopId: ID!) {
activeSubscription(appId: $appId, shopId: $shopId) {
billingPeriod
cancelAtEndOfCycle
trialEndsAt
items {
handle
price {
__typename
... on FlatRatePrice { amount }
}
}
}
}
https://partners.shopify.com/{organization_id}/api/2026-07/graphql.jsonX-Shopify-Access-Token with a Partner API client token that has the Manage apps permissiongid://shopify/App/1234 and gid://shopify/Shop/5678A simple approach is to store the plan when Shopify redirects back with plan_handle, then re-check with the Partner API on a schedule or before sensitive actions.
To charge per use (per SMS, per AI generation, per order synced), define a meter with an event handle on your plan, then report usage to the App Events API:
curl -X POST "https://api.shopify.com/app/unstable/events" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {access_token}" \
-d '{
"shop_id": "gid://shopify/Shop/12345678",
"event_handle": "sms_sent",
"timestamp": "2026-01-27T14:30:00Z",
"idempotency_key": "sms_12345_1706365800",
"attributes": { "value": 1 }
}'
event_handle must match a meter you configured.idempotency_key is enforced permanently, so retrying is safe and won't double-bill.unstable version path. Check the setup guide for a stable version before you go live.On dev stores in the same Partner organisation as your app, you can pick any plan at no charge, and $0 test subscriptions are created. App Store reviewers can also pick plans for free. Don't use the Billing API test flag with App Pricing.
Also Read: Build Your First Shopify App with Shopify CLI (2026) - Web Development
Use this if you need one-time purchases (credit packs, setup fees, lifetime deals) or you're maintaining an existing app. The flow:
confirmationUrl.returnUrl.mutation AppSubscriptionCreate(
$name: String!
$lineItems: [AppSubscriptionLineItemInput!]!
$returnUrl: URL!
$trialDays: Int
) {
appSubscriptionCreate(
name: $name
returnUrl: $returnUrl
lineItems: $lineItems
trialDays: $trialDays
) {
userErrors { field message }
appSubscription { id }
confirmationUrl
}
}
{
"name": "Pro",
"returnUrl": "https://your-app.example.com/app",
"trialDays": 7,
"lineItems": [
{
"plan": {
"appRecurringPricingDetails": {
"price": { "amount": 4.99, "currencyCode": "USD" }
}
}
}
]
}
A usage line item uses appUsagePricingDetails with terms and a cappedAmount. You then report usage with appUsageRecordCreate (appSubscriptionCreate docs).
The template's library has billing helpers that wrap the Billing API (they don't apply to App Pricing). Define plans in shopify.server.ts:
import { shopifyApp, BillingInterval } from "@shopify/shopify-app-react-router/server";
export const PRO_PLAN = "Pro";
const shopify = shopifyApp({
// ...existing config
billing: {
[PRO_PLAN]: {
lineItems: [
{ amount: 4.99, currencyCode: "USD", interval: BillingInterval.Every30Days },
],
},
},
});
Then require the plan in any loader:
export const loader = async ({ request }: LoaderFunctionArgs) => {
const { billing } = await authenticate.admin(request);
await billing.require({
plans: [PRO_PLAN],
isTest: process.env.NODE_ENV !== "production",
onFailure: async () => billing.request({ plan: PRO_PLAN }),
});
// Merchant has an active Pro subscription
return null;
};
Use billing.check() when you only want to know the plan without redirecting (for example, to show an upgrade banner). Full reference: React Router billing API.
The classic rejection: submitting your app with
test: trueorisTest: truestill hard-coded. Merchants then use the app without being charged, and Shopify lists this as a common rejection reason. Tie it to the environment as shown above.
Say 500 merchants pay $4.99/month:
Details are in the revenue share docs. Payouts arrive twice a month through Hyperwallet (part 2).
Yes. Managed Pricing was renamed Shopify App Pricing on May 12, 2026, and gained usage-based and hybrid pricing through the App Events API.
Also Read: Shopify App Development in 2026: The Complete Roadmap
It's labelled legacy but still fully works, and there's no announced shutdown date. It's the only option for one-time charges. Shopify provides a migration guide for moving existing plans to App Pricing.
Not for App Store apps. Off-platform billing is banned for public apps. Custom apps (for a single client) can't use Shopify billing, so you invoice those clients directly.
You set the trial length per plan. With App Pricing, Shopify tracks trial usage over 180 days, so reinstalling doesn't restart the trial. With the Billing API, you pass trialDays when you create the subscription.
The app can now make money. Next it needs a real home. In Part 7: How to Deploy a Shopify App to Production we'll choose a host, move from SQLite to Postgres, set environment variables, and ship with shopify app deploy and CI/CD.