FabricFabricHarness
EcosystemChannels

Shopify

Process signed Shopify commerce webhooks with governed actions.

fh add channel shopify
import { createShopifyChannel } from '@fabric-harness/channels/shopify';

export default createShopifyChannel({
  clientSecret: process.env.SHOPIFY_CLIENT_SECRET!,
  agent: 'commerce',
});

Subscribe the app to POST /channels/shopify/webhook. The adapter verifies X-Shopify-Hmac-Sha256, uses X-Shopify-Webhook-Id for deduplication, records the delivered API version, propagates shop identity, and keys sessions by the GraphQL resource ID.

Use updateShopifyOrderNote(ref, { shop, accessToken, orderId, apiVersion }) for governed writes.

Refund, fulfillment, inventory, customer, and order writes require narrow scopes, idempotency, policy, and usually human approval.