Skip to main content

Guide

How to Test the Shopify Admin API Locally

Stop sharing dev stores. Run a local stateful Shopify Admin API sandbox with all 1,473 endpoints and no rate limits.

Apr 10, 2026FetchSandbox Engineering

Testing Shopify integrations is a lot of friction for what should be a straightforward problem. You need a development store. You need to install your app on it. You need to manage OAuth tokens. You need to remember which webhooks are subscribed. You need to clean up between tests because the dev store is shared with everyone else on your team.

For end-to-end testing of the install flow and the storefront, you need that real dev store. For everything else — building integrations, testing webhook handlers, running CI — there is a much faster path.

What goes wrong with dev-store testing

  • Rate limits. Shopify enforces real rate limits even on dev stores. Parallel test runs hit 429s.
  • Shared state. Your test creates an order, your colleague's test deletes it.
  • OAuth refresh. Tokens expire. Your CI fails on a Tuesday morning for no reason.
  • Webhook delivery. Shopify cannot deliver webhooks to localhost. You need ngrok or a similar tunnel.
  • API version drift. Your dev store gets upgraded. Your tests now reference fields that no longer exist.

The local sandbox alternative

FetchSandbox runs a fully local stateful sandbox of the entire Shopify Admin API — all 1,473 endpoints. Products, orders, customers, fulfillments, inventory, metafields, webhooks. You spin one up in 2 seconds, point your Shopify client at it, and run your tests against it.

# 1. Spin up a Shopify sandbox
curl -X POST https://fetchsandbox.com/api/sandboxes \
  -H "Content-Type: application/json" \
  -d '{"spec_id":"shopify"}'

# Returns: { id, base_url, credentials: [{ api_key }] }

Then in your test setup:

// Replace shopify.com with the sandbox URL
const SHOPIFY_BASE = sandbox.base_url
const SHOPIFY_TOKEN = sandbox.credentials[0].api_key

// Run your existing test code unchanged

What to test against the local sandbox

  • Product CRUD with metafields and variants
  • Order creation and fulfillment lifecycle
  • Inventory adjustments across locations
  • Webhook handler tests with real orders/create, orders/paid, app/uninstalled events
  • Customer creation and email update flows
  • Discount and price rule application

What to keep on a real dev store

  • OAuth install flow and token exchange
  • App Bridge UI testing in the Shopify admin
  • Storefront API tests with real theme rendering
  • Final pre-launch smoke tests

Where to go from here