Hi — I’m building a public Shopify app (MezzexCarrierService) that lets merchants connect their stores so my system can fetch orders and create shipping labels automatically.
Proposed flow:
-
Merchant enters their store domain (
{shop}.myshopify.com) in my app dashboard. -
App redirects merchant to the Shopify OAuth URL:
https://{shop}.myshopify.com/admin/oauth/authorize
?client_id={MY_API_KEY}
&scope=read_orders,write_orders,read_fulfillments,write_fulfillments,read_customers,read_inventory
&redirect_uri=https://myapp.example.com/api/shopify/auth/callback
&state={nonce}
-
Merchant approves permissions. Shopify redirects to my callback with
code,hmac,shop,state. -
Backend verifies HMAC, exchanges
codefor anaccess_tokenviaPOST https://{shop}/admin/oauth/access_token. -
I persist the token (secure DB), then call Admin API to fetch orders and create shipping labels via our carrier integration.
-
After label creation, app updates fulfilment and tracking via the Admin API and uses webhooks to handle uninstalls/orders/fulfilment updates.
Questions / concerns:
-
Is this the correct and standard approach for letting merchants “paste their store URL” and connect via OAuth? Or should I ask them to install via a generated install link instead?
-
Which scopes are essential for a shipping/fulfilment app? I plan to request
read_orders,write_orders,read_fulfillments,write_fulfillments,read_customers,read_inventory. Should I also requestread_all_ordersor isread_ordersenough for typical fulfilment workflows? -
Any compliance/security checks I’m missing (HMAC verification, storing tokens, encryption at rest, webhooks for uninstall, Protected customer data form)?
-
I saw the “turn your app into a sales channel” option — I don’t want that. Is there any reason a fulfilment app would need that toggled?
-
Best practices for storing the access token and mapping it to the shop? (I plan encrypted DB fields + key rotation.)
TL;DR: Merchant pastes store URL → OAuth install → token → Admin API to read orders and create labels. Is this the right approach and what pitfalls should I watch for?
Thanks in advance for any pointers.