Build on Novinzo plugins, themes and integrations for the commerce platform.
src/index.js
export default { async fetch(request, env) { const path = new URL(request.url).pathname; if (path === "/webhooks/variant-purchased") { const { storeId, orderId, variantId, quantity } = await request.json(); await env.DB.prepare( "INSERT INTO purchases … ON CONFLICT DO NOTHING", ).bind(storeId, orderId, variantId, quantity).run(); // acknowledge only after the durable write completes return new Response(null, { status: 204 }); } }, };
Webhook delivered
variant-purchased204
{
"storeId": "7c1e…a90b",
"orderId": "f3d2…1c44",
"variantId": "0b9a…e27f",
"quantity": 2
}Start where you are a guide when you are learning the platform, a reference when you know what you need.
Guides
- Getting startedhow the platform is put together and where third-party code plugs in.
- Plugin developmenta Worker of your own with webhooks, functions and storefront routes.
- Admin screenspages that render inside the merchant's dashboard.
- Storefrontthe JSON API and the Liquid themes every shop is built from.
- Store webhookssigned events and product deliveries sent to a seller's own server.
- Security checklistwhat a plugin has to verify before it ships.
- Money and custodywhere a payment lands, and why Novinzo cannot move it.
A plugin is a Worker serving the routes its features need. Novinzo dispatches to it once a store installs it.
Webhooks
Hear about paid orders, finished checkouts and removed variants as they happen.
POST /webhooks/variant-purchasedPOST /webhooks/variant-deleted← 204 No Content
Storefront routes
Answer shoppers from the store's own domain, with the store already resolved.
GET /plugins/acme/storefront-public/info→ /storefront-public/infox-novinzo-store-id: 7c1e…a90b
Calling the platform
Read products, sign discounts and manage stock over a service binding, within the permissions a seller granted.
env.CORE_FOR_PLUGINS.fetch(…)POST /api/storefront/products/by-id← [{ id, name }]
