Core concepts
Stores, plugin surfaces, invocation tokens, permissions, credentials, and JSON values.
Stores and tenancy
Tenancy separates each store from other stores. Each store has a UUID, and store-owned records carry that identifier.
The platform resolves the store from a trusted source:
| Caller | Store identity |
|---|---|
| Seller in the dashboard | The seller session and x-store-id, subject to seller access. |
| Storefront request | The store domain in Host. |
| Platform calling a plugin function or proxied route | The x-novinzo-store-id header. |
| Platform delivering a webhook | The x-novinzo-store-id header. |
| Plugin calling the platform | The forwarded invocation token. |
Scope every plugin read and write to the current store. Never use a template argument or an external caller field as the tenant identity.
Checkout outcome webhook payloads can omit storeId, so take the store from the header. Follow the webhook guide before you perform a store-scoped operation for those events.
Plugin codes
A plugin code is its short registered name. Codes such as licenses, coupons, and categories match ^[\w-]+$.
Codes appear in three public interfaces:
- Storefront routes use
/plugins/<code>/storefront-public/<path>. - Asset routes use
/plugins/<code>/assets/<path>. - Liquid tags use
{% plugin "<code>.<path>" as result %}and{% plugin_block "<code>/<block>@<version>" %}.
Novinzo registers the code and connects the Worker. The registration guide lists the information that you must provide. A store-private plugin gets its code, such as p-3bcd5278f994, when its store's owner creates it in the dashboard.
Plugin surfaces
A surface is a group of routes for one caller. The platform proxies only the prefix that each caller can access.
| Surface | Caller | Purpose |
|---|---|---|
/admin/* | Seller dashboard through its plugin proxy | Embedded admin screens and their API. |
/storefront/* | Storefront during Liquid rendering | JSON for theme templates. |
/storefront-public/* | Browsers and integrations through the store domain | Public requests, with optional plugin authentication. |
/webhooks/* | Platform | Event notifications. |
/functions/* | Platform | Checkout checks and order data. |
/assets/* | Storefront asset proxy | Scripts, styles, and other static files. |
/theme/blocks/* | Storefront Liquid renderer | Versioned Liquid snippets. |
Two feature surfaces have their own guides: /partner/* for partner screens and /payment-webhooks/* for payment provider notifications.
Implement GET /health without a call back to the platform. See Deployment for the readiness requirements.
Trusted headers
Production plugin Workers have no public URL. The private platform connection is the reason that a plugin can trust platform headers.
| Header | Meaning |
|---|---|
x-novinzo-store-id | Store identity on webhooks, functions, admin requests, and storefront data or public requests. |
x-novinzo-plugin-invocation | The platform token that the plugin forwards when it calls the platform. |
Static assets do not provide a store-scoped invocation.
Partner-screen requests carry x-novinzo-partner-store-id instead of x-novinzo-store-id. It names an installed store but does not vouch that the caller belongs to it; see Partner screens.
A plugin function uses the store header, even when its payload also contains storeId. Reject a payload that names a different store.
Binding props and x-novinzo-plugin-name do not authenticate platform calls. Never expose a plugin handler publicly with these headers as its only protection.
Invocation tokens
An invocation token is a signed statement of plugin and store identity. Novinzo creates one when it invokes a plugin.
The token expires after 15 minutes. Plugins do not receive the signing secret and cannot create platform tokens.
Forward the token unchanged in x-novinzo-plugin-invocation when you call core for plugins or the backend. Never save it for background work.
The platform makes sure that the token is valid and that the plugin remains installed. Permission-protected calls also require the current store grant.
An order-viewer token also identifies the order that a shopper can view. Only that token authorizes the Viewed order API.
Installs and permissions
An install connects a plugin to one store. An uninstalled or unavailable plugin appears as unknown to storefront and admin callers.
The plugin catalog lists its requested permissions. The seller chooses the grants during installation and can change them later.
| Permission | Access |
|---|---|
orders:read | Complete order details through OrderDetails, plus completed-order summaries through CompletedByVisitorIds and one order by id through Orders.OrderById. |
orders:list | Page through every order of the store, with its buyer's email, lines and total, through Orders.List. |
orders:annotate | Add a note to one of the store's orders through Orders.AddNote, which the seller reads in the order's timeline. It reads nothing of the order and the buyer never sees the note. |
checkout:write | Prepare unpaid checkouts through PreparedCheckoutCreate and publish authorized events through WebhookEventPublish. |
customers:email | Reveal the buyer email through ViewedOrder for the current order viewer. |
customers:read | Read one of the store's customers by id or by email through CustomerById and CustomerByEmail, or the one a storefront visitor is signed in as through SignedInCustomer, with their email and whether it is verified. |
customers:list | Page through every customer of the store, with their email and how many orders they paid for, through Customers.List. |
emails:send | Send plain transactional emails in the store's name through SendEmail and SendEmailToSellers. |
products:read | List the store's live product variants with their product name and price through ListVariants. |
products:write | Add a product with its variants through CreateProduct and publish it once through PublishProduct. It cannot change any other product. |
payments:provide | Offer a plugin-run payment method through PluginPaymentMethodActivate and PluginPaymentMethodDeactivate, and report its payments through PluginPaymentReport. |
sales:write | Add sales made outside the checkout to the store's revenue through RecordSales, count the orders it takes among the store's orders through RecordOrders, and leave order lines it delivered as credit for them out of it through RecordPrepaidCreditLines. It cannot change what an order costs or contains. |
analytics:read | Read the store's revenue, order counts, products sold and conversion over time through GetAnalytics, as aggregates only, and a product's sales by variant through GetVariantInsights. |
emails:customize | Set up the store's own sending domain through the SendingDomain* RPCs, and once it is verified, write the order confirmation email sent from it through RenderOrderEmail. |
storefront:inject | Add HTML to the store's storefront pages, except checkout, order and renewal pay pages, through SetInjections and ClearInjections, with those pages admitting scripts, connections, stylesheets, fonts, images and frames from the origins it names. |
deliveries:write | Report the parts it sent of the order lines it delivers and ships, with the label and link the buyer reads, through OrderLineDeliveryReport. It cannot report a line another delivery sends, or more units than a line has. |
replacements:write | Hold, confirm, release and report sent the units a delivered line it ships is owed in place of some it sent, through the OrderLineReplacement* RPCs. A line's replacements never exceed the units reported delivered on it, and none charges the buyer. |
returns:write | Put units of a line it delivers and ships back in stock once they come back, through OrderLineRestock, never more than were reported delivered. |
refunds:write | Refund units of the order lines it delivers through the provider that took the payment, through OrderLineRefund. Core sets the amount: the line's price for those units and their share of what the order added. |
prices:adjust | Sign discounts and charges onto a buyer's cart through UpdatePlan. |
products:deliver | Record that the plugin delivers a variant, and set its stock, through DeliverVariant, StopDeliveringVariant and SetVariantStock. |
payments:read | List the payment methods the store has connected and enabled, without their credentials, through PaymentConnections.List. |
keys:issue | Issue license keys of any variant of the store that an app delivers keys for, through VariantKeysIssue, for a sale the plugin makes outside the store's checkout. |
push:send | Tell the store's team about one of its paid orders on the phones they turned notifications on, through SellerOrderPushSend, at most once per order. Novinzo writes the notification and picks the phones. |
orders:read, orders:list, customers:read and customers:list also permit buyer email access because their responses already reveal that address. checkout:write does not take a payment.
products:read and products:write cover the catalog endpoints. payments:provide lets a plugin run one of the store's payment methods; see Payments. sales:write covers the sales endpoints. storefront:inject covers the storefront injection endpoints.
Event publication also requires ownership of the event type. A permission grant alone does not authorize every event.
Handle PermissionDenied without performing the restricted operation. See Backend RPC for plugin calls and errors.
Store owners manage installs and grants through the dashboard. Uninstallation removes the plugin from the store's API access credentials and retires its payment methods.
API access credentials
An API access credential is a bearer token that belongs to one store and opens the plugins of that store it is granted. Its token begins with novinzo_api_.
The store's owner issues it, and grants it only installed plugins that support credentials. The dashboard shows the token once and stores its SHA-256 hash.
A credential expires after 7, 30, 60, 90 or 180 days, or one year. The store's owner, or a store API key with full access, can revoke it before expiration.
Send the credential to the plugin public route on the store domain. The plugin calls VerifyApiAccessCredential during that request.
Verification requires the platform invocation token. The credential must match the plugin and store that the invocation names.
API access credentials do not authenticate /rpc. See API keys for bearer authentication at plugin routes.
Money
Money contains integer minor units and an ISO currency code. The JSON representation uses a decimal string for the amount:
{ "amountMinorUnits": "1999", "currency": "USD" }This example represents USD 19.99. Use an integer or bigint for arithmetic, not a floating-point number.
In Liquid, use money or money_with_currency to format an amount.
Ids
Entity identifiers usually use UUID strings. Plugin codes use the short-name format described above.
The HTTP references define the exact representation of each field:
- Dates use ISO 8601 strings.
- Big integers use decimal strings.
- Nullable values use a value or
null. - Optional keys can be omitted when the schema permits omission.
