Hello Shopify Developers!
Welcome to the Hydrogen and Storefront API board!
Board Overview
This board covers the following topics:
- Hydrogen : Hydrogen is Shopify’s opinionated stack for headless commerce, built on Remix. It provides a set of tools, utilities, and best-in-class examples for building dynamic and performant commerce applications.
- Storefront API : The GraphQL Storefront API offers a full range of commerce options to make unique experiences on any platform including web, apps and games. it possible for customers to view products and collections, add products to a cart, and check out.
- Oxygen Hosting : Oxygen is Shopify’s global deployment platform that’s built for hosting Hydrogen storefronts at the edge. It provides multiple deployment environments, so you can preview every change before shipping it to production.
Tags
To keep our discussions organized, we use the following tags on this board:
- oxygen-hosting : Use this tag for questions related to using oxygen
- hydrogen : Use this tag for questions related to custom storefronts built on hydrogen
- Storefront-api: Use this tag for questions related to identifying storefront API endpoints, troubleshooting
Helpful Resources
You can find more resources to help you learn about Hydrogen, Oxygen and Storefront API below :
Frequently Asked Questions
What is a custom storefront?
- Think mobile apps for your business, a custom front end for your website, adding commerce into a video game, offline commerce such as a smart mirror - and more.
- If you have questions about customizing your theme please post in the Online Store and Theme Development board.
Setup Tips:
- The main API to utilize when building a custom storefront is the Storefront API.
- Shopify provides a number of software development kits and libraries to help you build with the Storefront API such as the JS Buy SDK, Android Buy SDK, IOS Buy SDK, and Unity SDK.
Rate Limiting:
- The Storefront API is rated limited by the buyer IP and can not be utilized server-side or with a proxy for this reason.
- The Storefront API utilizes a time-based leaky bucket algorithm and every request to the Storefront API costs at least 0.5 seconds to run.
Authentication:
- The Storefront API is an unauthenticated API and access is managed by scopes
- For a private app, you will utilize the storefront access token from the Admin. This is different from the API Key and Password used for the Admin API.
- For a custom app or public Sales Channel, make sure the app is first installed, then request a Storefront API access token from the Admin API using either the StorefrontAccessToken REST resource orstorefrontAccessTokenCreate via GraphQL mutation.
Checkout + Performance:
- The Storefront API returns a Web URL field that your customer will complete the checkout process on.
- Sales Channels can request payment processing permissions to complete checkouts with mutations.
- It is best practice to only initialize a checkout when necessary.
Custom Domain:
- If you are having issues with your .myshopify.com URL being surfaced at checkout, please check that you are initializing the client and API with the custom domain such as https://backyardbotanicgoods.com/api/2020-04/graphql vs. coolstore.myshopify.com/api/2020-04/graphql
Flash Sales:
The Storefront API is not designed to be used for flash sales for two main reasons:
- Bot protection is unavailable.
- The Storefront API has a limit on the amount of checkouts that can be created per minute. If an API client exceeds this throttle, then a 200 Throttled error response is returned. Shopify recommends designing your app to be resilient to this scenario. For example, you could implement a request queue with an exponential backoff algorithm.
Community Guidelines
To maintain a helpful and respectful community, please follow the Shopify Developer Forums Code of Conduct.
When posting, please ensure:
- Correct Category and Tags: Open posts in the appropriate category and apply the most accurate tags related to your question.
- Include Relevant Code: Share code snippets relevant to your question, removing any personal or sensitive information.
- Detailed Issue Description: Provide detailed steps to reproduce any issues, including the date and time when the issue appeared.
- Screenshots or Videos: Include visuals to illustrate the problem, if applicable.
- API Version and Error Messages: Include the API version and any error messages you’re encountering. This detailed approach helps peers and internal staff provide effective solutions quickly.strong text