Plugins can add content to the storefront through fixed slots. The host renders validated blocks as text and form controls; plugins do not inject scripts into the storefront.
Slots
Declare blocks per slot in the manifest:
{
"capabilities": ["storefront:ui"],
"hooks": ["storefront:slot", "storefront:action"],
"storefront": {
"slots": {
"product.detail.below": [
{
"type": "callout",
"tone": "info",
"title": "Loyalty members",
"text": "Earn points on this order."
}
]
}
}
}Available slots:
product.detail.belowproduct.detail.sidebarcart.footercart.emptycheckout.beforeSubmitstorefront.footerstorefront.chat
The storefront fetches slot blocks from GET /api/store/plugins/ui?slot=….
Responses are private so a shared cache cannot mix stores.
Blocks
Use the same declarative block shapes as the admin UI, with storefront-safe types such as text, callout, image, button, link, table, form, and iframe.
- Blocks are bounded data; the host validates types, sizes, and URLs.
- Iframes use a sandbox without
allow-same-origin. - Absolute HTTPS iframe URLs must be in
allowedHosts, or the plugin must holdnetwork:request:unrestricted. - Static plugin assets are served by the assets Worker from a separate origin.
Forms
A storefront form posts to:
POST /api/store/plugins/forms/:installId/:formIdThe host validates the submitted values against the manifest’s form schema,
then invokes the plugin’s storefront:action hook in the sandbox. Raw plugin
errors are not echoed to the shopper.
Limits
- Request bodies are capped while streaming.
- UI responses are
private. - Only active, approved, non-yanked installations render.
- Blocks that fail validation are omitted rather than rendered partially.