Skip to content
Tutorials Center
My learning

Topics

Lesson 54 of 55 ยท Practice and Review

Shopify App Developer Interview Questions

Prepare for a Shopify app developer interview: architecture, auth, API limits, webhooks, extensions, functions, billing and security, with concise answers and demos.

A Shopify app interview rarely asks you to recite an API. It asks whether you understand who owns what: Shopify owns the merchant, the data and the checkout; your app owns a small piece of logic that Shopify calls, or that calls Shopify. Strong candidates explain how a request is authenticated, what happens when the network fails, and what they would do to avoid being rate limited or rejected in review.

This lesson collects common questions by topic, with answers you can say aloud in about a minute. Two answers include a small runnable demo. The platform itself cannot run on this site, so the demos are plain JavaScript stand-ins for the rule being discussed, and the real Shopify code mentioned in answers is read-only. Details change between API versions (this page assumes 2026-07), so say "check the current docs" when you are unsure; interviewers prefer that to a confident wrong number.

For any question, use four beats: the invariant (what must never happen), the failure (how it happens), the mechanism (what prevents it) and the trade-off (what it costs). The trade-off is what separates a good answer from a memorised one.

flowchart LR
    M["Merchant in admin"] --> E["Embedded app (iframe)"]
    E -->|"session token"| B["Your backend"]
    B -->|"access token"| A["Admin GraphQL API"]
    S["Shopify"] -->|"signed webhooks"| B
    S -->|"runs"| F["Functions and extensions"]

The map behind most interview questions: tokens flow in, webhooks flow out, and extensions run on Shopify.

Architecture

What are the parts of a typical Shopify app? An embedded admin app (a web app shown in an iframe in the admin), a backend that authenticates requests and calls the API, optional extensions (theme, checkout, admin, POS) that run on Shopify's side, optional Shopify Functions (WebAssembly modules) and webhook subscriptions. Shopify remains the source of truth for products, orders and customers; your database holds app-specific data keyed by shop. See App Architecture at a Glance.

What is the difference between a public, custom and merchant-owned app? A public app is listed or distributed to many shops and goes through review for the App Store. A custom app is built for one merchant (or a few). A merchant-owned app in the store's own admin is the simplest case, with credentials the merchant controls. The choice decides distribution, review and billing. See What Is a Shopify App?.

Why is app configuration kept in shopify.app.toml? Config as code: scopes, URLs and webhook subscriptions are versioned in the repository and released with shopify app deploy, so a change is reviewable and reproducible. The trade-off is that a bad config deploy affects every installed shop, so you test it on a development store first. See App Configuration with shopify.app.toml.

Authentication and sessions

Why do embedded apps use session tokens instead of cookies? The app runs in an iframe, and browsers block or partition third-party cookies, so cookie sessions are unreliable. App Bridge gives the page a short-lived JWT, signed with the app's secret, and the page sends it in the Authorization header on every request. The backend verifies the signature and claims. See Session Tokens for Embedded Apps.

What would you check in a session token? The signature (HS256 with the app's client secret), the expiry (exp) and not-before (nbf), the audience (aud is your app's client ID), and that iss and dest refer to the same shop. Then derive the shop from the token, never from a query parameter the client controls. The demo below does exactly this.

What is token exchange? Your backend swaps the session token for an access token for that shop, online (bound to the user, expires) or offline (bound to the shop, for background work). It replaces the older redirect-heavy OAuth flow for embedded apps. See Token Exchange and Access Tokens and Online vs Offline Tokens.

When do you use an offline token? Whenever no user is present: webhook handlers, scheduled jobs and bulk operations. Use an online token when the action should respect that staff member's permissions. Offline tokens were historically long-lived, and newer expiring offline tokens exist, so store the expiry and refresh data your library gives you rather than assuming a token lives forever.

Node.js Verify a session token the way a backend does

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with node:readline or process.stdin), it gets the next line from this box.

The Admin API and rate limits

Why GraphQL, and what is a global ID? GraphQL lets you ask for exactly the fields you need in one request, and the Admin API is built around it. IDs look like gid://shopify/Product/123: a type and a number inside a URI, so an ID is unambiguous across resource types. See GraphQL for Shopify Developers.

How do rate limits work? The GraphQL Admin API charges each request a calculated query cost against a leaky bucket: the bucket has a capacity, drains as you spend, and refills at a restore rate per second. The response reports the cost and what is left. Throttled requests are rejected, so the client reads the cost data and slows down. Exact numbers depend on the shop's plan, so read them from the response rather than hard-coding them. See Rate Limits and Query Cost.

How do you reduce query cost? Request fewer nodes per connection, fewer nested connections, and only the fields you use. For large jobs, switch to a bulk operation, which runs on Shopify's side and returns a JSONL file. See Bulk Operations.

What is wrong with offset pagination, and what do you use? Offsets shift if records are added or removed while you page, so you skip or repeat items. Shopify uses cursors: first, after and pageInfo { hasNextPage endCursor }. See Pagination with Cursors.

A mutation returns HTTP 200 but nothing changed. Why? GraphQL reports validation problems in userErrors inside the mutation payload, separately from top-level errors. A careful client checks both. See Mutations and userErrors.

Node.js Retry with exponential backoff and jitter

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with node:readline or process.stdin), it gets the next line from this box.

The interview point: jitter spreads retries from many workers so they do not all return at the same instant.

Webhooks

How do you verify a webhook? Compute the base64 HMAC-SHA256 of the raw request body with the app's secret and compare it to the X-Shopify-Hmac-Sha256 header in constant time. Never parse and re-serialise first. See Verifying Webhook Signatures.

Why must webhook handlers be idempotent? Delivery is at least once: retries after a timeout or error mean you can receive the same event twice, and events can arrive out of order. Record the webhook or event ID, make updates safe to repeat, and reconcile by re-reading the resource when order matters. See Reliable Webhook Handlers and Idempotency.

What should a handler do first? Verify, store or enqueue the payload and return a 2xx quickly. Do the slow work in a background worker. A handler that does heavy work inline risks timeouts, which cause retries, which cause duplicates.

Which webhooks are mandatory? The privacy ones: customer data request, customer redaction and shop redaction. Public apps must handle them, and they are checked in review. Uninstall cleanup (app/uninstalled) is a separate, strongly recommended handler. See Privacy, GDPR and Mandatory Webhooks.

Extensions and functions

When would you choose a theme app extension over editing the theme? When your app puts UI on the storefront. App blocks and app embeds are added by the merchant in the theme editor and survive theme changes, while code injected into theme files breaks on updates and fails review. See Theme App Extensions.

What is a Shopify Function, and why WebAssembly? A Function is your code that Shopify runs inside its own pipeline (discounts, delivery and payment customization, validation). It receives input defined by a GraphQL query and returns operations. It compiles to WebAssembly so it runs fast and sandboxed, with strict limits on size and execution. It cannot make network calls, so everything it needs must be in its input or configuration. See Shopify Functions Overview.

How do you test a Function? Keep the decision logic a pure function, unit test it with plain inputs, and use the CLI's run and replay tooling for end-to-end checks. See Testing and Debugging Functions.

Checkout UI extension or Function: which for an upsell and which for a discount? The upsell is interface, so a checkout UI extension. The price change is a calculation that must be trusted, so a discount Function. They often work together.

Billing

How can a public app charge merchants? Either with managed pricing (plans configured in the Partner Dashboard, and Shopify handles the approval page) or with the Billing API: create a subscription, send the merchant to the confirmation URL, then check the active subscription. Usage-based charges are recorded against a capped amount. See App Pricing Models and Billing Options and Implementing Billing with the Billing API.

Why check billing on every load rather than caching the plan? Merchants can cancel, fail payment or be frozen outside your app. Shopify is the source of truth; a local value is only a cache. Gate on the server, and fail closed to the free plan for unknown states.

Security and review

Name five things a reviewer or attacker will check. Webhook and session verification, least-privilege scopes, secrets kept out of the repository, a Content Security Policy that restricts framing (frame-ancestors), and no access to one shop's data using another shop's identity. Multi-tenant queries must always include the shop. See App Security Checklist and App Store Requirements and Review.

How do you keep one shop's data away from another's? Every table has a shop key, every query filters by the shop derived from the verified token, and tests prove that a request for shop A cannot read shop B. Never trust a shop parameter from the client.

Practice prompts

Answer these aloud with the four beats. How would you build a bulk price-change tool that survives rate limits? How would you add a loyalty-points widget to checkout? What would break if your webhook endpoint went down for six hours, and how would you recover? For hands-on drills, return to Practice Exercises with Solutions.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A session token has aud set to a different client ID than your app's. What should the backend do?

    The audience says which app the token is for. A valid signature on a token meant for another app is still not acceptable.
  2. 2. Why does a webhook handler return 2xx quickly and do the work in a queue?

    Fast acknowledgement avoids timeouts and retry storms. Idempotency still protects you from the duplicates that do happen.
  3. 3. Why can a Shopify Function not call your server during a discount calculation?

    A sandboxed, time-limited module keeps checkout fast and safe. Put what the function needs in its input query or metafield configuration.
  4. 4. What is the main benefit of jitter in a retry schedule?

    Without jitter, clients that failed together retry together and overload the service again.

Summary

  • Explain architecture by ownership: Shopify holds the data and runs extensions and functions; your backend authenticates, stores app data per shop and reacts to webhooks.
  • Verify session tokens (signature, expiry, audience, shop) and webhooks (HMAC over the raw body) before trusting anything.
  • Treat rate limits as a budget, page with cursors, check userErrors, and use bulk operations for large jobs.
  • Make webhook handlers fast and idempotent, check billing live, and isolate every shop's data.
  • When unsure of a detail, say what you would verify in the current documentation.

Next, keep the essentials in one place with the Shopify App Development Cheat Sheet.