You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cloudflare Worker providing Shopify e-commerce integration for Echo Prime Technologies. Handles product catalog, cart/checkout via Shopify Storefront API, order management via Admin API, and webhook processing.
Full product catalog (Shopify or EPT-API fallback)
GET
/api/catalog/:handle
Single product by handle with checkout URL
GET
/stats
Order, webhook, and revenue statistics
Authenticated (X-Echo-API-Key)
Method
Path
Description
GET
/api/admin/config
Configuration status and setup steps
GET
/api/admin/orders
List orders with filters
GET
/api/admin/orders/:id
Single order details
POST
/api/admin/register-webhooks
Register 5 Shopify webhook topics
POST
/api/admin/fulfill/:orderId
Auto-fulfill digital product orders
POST
/api/admin/sync-products
Sync Shopify products to D1 + KV cache
Cart (requires Shopify Storefront token)
Method
Path
Description
POST
/api/cart/create
Create new cart
POST
/api/cart/:cartId/add
Add line items to cart
GET
/api/cart/:cartId
Get cart contents
POST
/api/checkout
Create checkout URL from cart
Webhooks
Method
Path
Description
POST
/webhook/shopify
Shopify webhook receiver (HMAC-SHA256 verified)
Setup
Prerequisites
Cloudflare account with Workers enabled
Node.js 18+
wrangler CLI authenticated
Install & Deploy
cd WORKERS/echo-shopify
npm install
npx wrangler deploy
Configure Shopify (when ready)
Create a Shopify store at shopify.com (free dev store or trial)
Go to Settings → Apps → Develop Apps → Create App
Name: Echo Prime Storefront
Configure Admin API scopes: read_orders, write_orders, read_products, write_products, read_fulfillments, write_fulfillments
Configure Storefront API scopes: all product, cart, and checkout scopes
Install the app, reveal tokens
Set secrets:
echo"your-store.myshopify.com"| npx wrangler secret put SHOPIFY_STORE_DOMAIN
echo"shpat_xxxx"| npx wrangler secret put SHOPIFY_ADMIN_TOKEN
echo"xxxx"| npx wrangler secret put SHOPIFY_STOREFRONT_TOKEN
echo"whsec_xxxx"| npx wrangler secret put SHOPIFY_WEBHOOK_SECRET
Register webhooks:
curl -X POST https://echo-shopify.bmcii1976.workers.dev/api/admin/register-webhooks \
-H "X-Echo-API-Key: YOUR_KEY"
Without Shopify
The worker operates in fallback mode without Shopify credentials — serving the full 17-product EPT catalog via the ept-api service binding. Cart and checkout features require Shopify.