Skip to content

Capabilities and hooks

The full plugin permission list, hook reference, and failure semantics.

A plugin declares the capabilities it needs and the hooks it implements. The install consent grants every declared capability together.

Capabilities

Capability Grants
catalog:read Read products and catalog data through the host bridge.
catalog:write Modify catalog data.
cart:read Read the current cart.
cart:write Participate in cart line changes.
checkout:read Read checkout context.
checkout:validate Decide whether checkout may continue.
orders:read Read order data.
orders:write Participate in order creation.
customers:read Read customer data.
customers:pii Access customer personally identifiable information.
discounts:propose Propose cart/order discounts.
shipping:rates:propose Propose shipping rates.
payments:read Read payment state.
payments:charge Perform a payment charge.
inventory:read Read inventory.
inventory:write Modify inventory.
email:send Send email through the host.
network:request Call allow-listed hosts with ctx.http.fetch.
network:request:unrestricted Call hosts beyond the allow-list. Use sparingly.
storage Use the plugin key-value storage.
settings Read and write installation settings.
admin:ui Provide admin console pages, blocks, and order panels.
storefront:ui Provide storefront slots, blocks, forms, and iframes.
hooks.policy:register Register policy hooks.
webhooks:receive Receive inbound webhooks.
jobs:schedule Schedule background jobs.

Hooks

Hook Kind Budget Failure Required capability
product:beforeRender filter 20 ms open catalog:read
cart:beforeAddLine filter 20 ms open cart:write
cart:beforeUpdateLine filter 20 ms open cart:write
cart:calculate filter 50 ms closed discounts:propose
discount:validate policy 20 ms closed discounts:propose
shipping:rates provider 100 ms open shipping:rates:propose
checkout:validate policy 50 ms closed checkout:validate
checkout:beforeComplete policy 50 ms closed checkout:validate
order:beforeCreate filter 50 ms closed orders:write
order:created action — retry orders:read
order:paid action — retry orders:read
order:fulfilled action — retry orders:read
order:cancelled action — retry orders:read
refund:created action — retry payments:read
plugin:install lifecycle — closed —
plugin:activate lifecycle — closed —
plugin:deactivate lifecycle — closed —
plugin:uninstall lifecycle — closed —
plugin:upgrade lifecycle — closed —
storefront:slot ui — omit storefront:ui
storefront:action filter 50 ms closed storefront:ui
admin:interaction admin 500 ms open admin:ui
admin:order-panel ui — omit admin:ui

Failure semantics

Failure Meaning
open The host continues without the plugin’s result.
closed The request fails if the plugin fails or times out.
retry Async action delivery is retried through the outbox.
omit The UI block or slot is omitted.
  • Synchronous hooks fan out to at most three active plugins per hook.
  • Action hooks are delivered at least once; plugins must deduplicate by event_id.
  • The host validates plugin output before applying it: targets, currency, discountable lines, amount bounds, and all totals are recalculated.
  • Merchant rule discounts apply before plugin adjustments.

Hook results

  • Adjustments: line_discount, order_discount, or shipping_discount with { currency, minorUnits }.
  • Policy decisions: { allow: boolean, reason?: string }.
  • UI hooks: declarative blocks (see Admin UI and Storefront slots).
  • Failures: { ok: false, error: { code, message? } }.

Type to search…

↑↓ navigate↵ selectEsc close