Shopify Partner Setup (FlowPOS Ecommerce)
Setup checklist for engineering teams configuring Shopify credentials for the FlowPOS ecommerce module.
Codepaths covered:
apps/backend/src/ecommerce/interfaces/ecommerce.controller.tsapps/backend/src/ecommerce/application/ecommerce.service.tsapps/backend/src/ecommerce/infrastructure/shopify/shopify.adapter.tsapps/backend/src/ecommerce/infrastructure/shopify/shopify-webhook.controller.ts
What you need
- Shopify Partner account
- Shopify app credentials (client ID + client secret)
- one or more dev/test stores
- public HTTPS backend URL for OAuth callback and webhook delivery
Required app configuration
1) OAuth callback URL
FlowPOS callback endpoint:
GET /ecommerce/oauth/callback
Set allowed redirect URL(s) to your backend base URL + path, for example:
https://api-staging.flowpos.app/ecommerce/oauth/callback- local/dev tunnel equivalent when testing locally
EcommerceController.oauthCallback then redirects to PWA_BASE_URL/settings/ecommerce.
2) API scopes
ShopifyAdapter defaults to:
read_productswrite_productsread_inventorywrite_inventoryread_orderswrite_orders
These are configurable via SHOPIFY_APP_SCOPES.
3) Webhook endpoint
FlowPOS webhook endpoint:
POST /ecommerce/webhooks/shopify
Topics currently registered by adapter:
orders/createinventory_levels/update
registerWebhooks is called after OAuth exchange in handleOAuthCallback.
Validation checklist after setup
- call
GET /ecommerce/oauth/urlwithprovider=shopify,shopDomain,businessId - complete Shopify consent flow
- verify callback redirects with
?connected=true - confirm
GET /ecommerce/connectionreturns active connection - verify webhooks exist in Shopify and point to FlowPOS endpoint
- trigger a test sync (
POST /ecommerce/sync/products)
Common pitfalls
- callback URL mismatch between app config and
APP_BASE_URL - missing scopes causing product/order operations to fail
- non-HTTPS callback/webhook URL in environments where Shopify requires HTTPS
- assuming webhook registration alone is enough without polling fallback
EcommerceService always keeps polling support as a fallback path.