Shopify Flow Now Accepts Relative URLs in Trigger Lifecycle Callbacks

Shopify Flow’s Trigger Lifecycle Callback extensions can now use relative URLs, simplifying local testing and deployment. Learn what changed, who it impacts, and how to update your apps today.

Shopify Flow Now Accepts Relative URLs in Trigger Lifecycle Callbacks
8 sections

Shopify’s latest developer update removes a long‑standing friction point for Flow app creators. Trigger Lifecycle Callback extensions, which previously demanded absolute HTTPS URLs, now accept relative paths. This change streamlines local development, reduces configuration churn, and keeps your codebase cleaner—all without sacrificing security.

What’s New? Relative URLs for Flow Trigger Lifecycle Callbacks

Historically, Flow Trigger Lifecycle Callback extensions required an absolute HTTPS URL (e.g., https://myapp.com/api/flow/callback). That meant developers had to maintain a publicly reachable endpoint even while testing locally, or constantly update the URL whenever a tunneling service like ngrok changed. The new support for relative URLs lets you specify just the endpoint path (e.g., /api/flow/callback) and lets Shopify resolve it against the appropriate base URL in each environment.

Why This Matters for Developers

  • Faster iteration – spin up a local server, run a tunnel, and you’re ready to test without editing configuration files.* Fewer deployment errors – no need to remember to replace a hard‑coded URL when moving from staging to production.* Cleaner code – URLs live alongside other route definitions, making the app manifest easier to read.
  • How It Works: Absolute vs. Relative URLs

    When you run your app in development mode (e.g., using Shopify CLI run), Shopify resolves any relative URL against the temporary tunnel URL generated by the CLI. During a production deployment, the same relative path is resolved against the app’s application_url set in the Partner Dashboard. If you need a fixed endpoint that never changes—perhaps an external service—you can still supply an absolute HTTPS URL. Note that protocol‑relative URLs (//example.com/…) are not supported, and the app must have an HTTPS application_url configured before you can use relative paths.

    Implementation Guide

  • Open your app’s shopify.app.toml (or the JSON manifest if you use the new schema).
  • Locate the trigger_lifecycle_callback section. Replace the absolute URL with just the path you want Flow to hit.
  • {

    "name": "order_fulfilled_callback",

    "trigger": "orders/fulfilled",

    "callback_url": "/api/flow/order_fulfilled"

    }

  • Ensure your development tunnel is active (Shopify CLI automatically starts one with shopify app serve or shopify tunnel start).
  • Deploy the updated manifest. In production, Shopify will prepend the URL you set under Application URL (e.g., https://myapp.myshopify.com) to the relative path, resulting in https://myapp.myshopify.com/api/flow/order_fulfilled.
  • Testing Locally with Tunnels

    Run shopify app serve or shopify tunnel start to spin up a secure HTTPS tunnel (ngrok, Cloudflare, etc.). Your app’s application_url is temporarily set to the tunnel address, so the relative callback resolves correctly. Trigger a Flow event in your test store, and you’ll see the request hit your local endpoint without any URL rewrites.

    Deployment Considerations

  • Verify that the app’s application_url in the Partner Dashboard is a valid HTTPS URL before releasing. If it’s missing or uses HTTP, Shopify will reject the relative path during deployment.* Keep an eye on environments that use multiple domains (e.g., a storefront domain vs. a custom app domain). Relative paths always resolve to the application_url, so they won’t automatically follow a different domain.* If you mix absolute and relative URLs in the same manifest, be consistent—don’t rely on Shopify to guess which base to use.
  • Best Practices

  • Use relative URLs for any endpoint that lives inside the same app codebase. Reserve absolute URLs for external services or webhook proxies.- Keep the path versioned (e.g., /api/v1/flow/callback) to avoid breaking existing flows when you iterate on the API.- Document the expected request shape in your README so other developers on the team know what Flow will send.- Add automated tests that mock Flow’s POST payload against your local tunnel to catch regressions early.
  • Conclusion & Next Steps

    The addition of relative URL support for Flow Trigger Lifecycle Callback extensions is a small but powerful win for Shopify developers. It eliminates the “hard‑coded URL” pain point, speeds up local testing, and makes your deployment pipeline smoother. Update your manifest today, spin up a tunnel, and experience the new workflow firsthand. Need help migrating your existing callbacks? Reach out in the Shopify Community forums or drop a comment below—we’re happy to troubleshoot together.

    Tags
    Sources

    Related Articles

    Unlock Seamless Discount Workflows with Shopify’s New App Intent Support

    Unlock Seamless Discount Workflows with Shopify’s New App Intent Support

    Shopify now lets discount apps built with Functions register app intents, enabling custom create and edit flows directly from the admin UI. Learn what changed, who’s affected, and how to implement the new intents today.

    September 30, 20264 min
    Filter Catalog Search Results by Media Type: Unlock Video and 3D Models

    Filter Catalog Search Results by Media Type: Unlock Video and 3D Models

    Shopify's Catalog API now returns video and 3D model media and lets you filter search results by media type. Learn what changed, who’s impacted, and how to add the new filter to your apps.

    September 30, 20263 min
    Shop Moves to shop.com – What Merchants and Developers Need to Know

    Shop Moves to shop.com – What Merchants and Developers Need to Know

    Shop’s web experience shifts from shop.app to shop.com. Learn what changes, who’s impacted, and the simple steps to keep your links and SEO intact.

    September 29, 20264 min
    Resilient Token Exchanges: Recover Offline Token Migrations Without Merchant Interaction

    Resilient Token Exchanges: Recover Offline Token Migrations Without Merchant Interaction

    Shopify now lets apps retry token migrations for up to seven days, returning the same access‑ and refresh‑token pair even without a user session. Learn who needs to act, what changed, and how to implement the new flow.

    September 29, 20263 min