@the-meridian/sdk is the package you install inside your own Shopify app. It is the runtime half of Meridian: you design plans, features and automations in the dashboard, and the SDK applies them in your app’s code.
react and react-dom (>= 18) are peer dependencies, and the package needs Node 18 or newer. It ships ESM and CJS with types.
What it gives you
You never implement Shopify’s recurring-charge or usage-charge APIs yourself. Meridian holds the billing handshake, and the SDK is the thin layer your app calls.
Two entry points
@the-meridian/sdk
The React surface, for the browser: the provider, the
useMeridian hook, and the two page components.@the-meridian/sdk/server
The server surface, for Node: the app factory, the server and admin clients, webhook verification, and the referral helpers. No React.
The shape of an integration
- Your server holds
MERIDIAN_APP_IDandMERIDIAN_API_KEY. - In your Shopify
afterAuthhook, one call registers webhooks, fires your install automations, reports the shop’s subscriptions (trials included) and attributes any affiliate referral. - In the loader for your app shell, you exchange the shop for a short-lived shop token.
- In the browser, you mount the provider with that token. Everything below it can gate features, read usage, and drive billing.
The SDK is not the only way in: the Meridian MCP server exposes your Meridian workspace to an AI agent, and the CLI handles local development and managed developer databases.