Multiple websites with storefront API

We run a shopify shop on our main domain

We have collections that are dedicated to certain customers. We want to create a custom store on our customers websites e.g. shop.customer.com that display the collection and allow their customers to purchase direct from that store, but allowing us to continue to service the product.

We may have multiple customer stores for example shop.customer2.com etc.

I was going to use the storefront API, hydrogen and / or oxygen to achieve this.

From what I can see, you can have multiple “domains” using hydrogen using countries and regions.

Environments and deployments look like a potential too. Each customer subdomain would be branded slightly differently which could be a separate branch in git but it just seems a little messy.

Has anyone set up anything like this before?

Thanks in advance.

Yes, this is totally supported. We have internal implementations that do this. A few thoughts:

  1. Make sure you get the API token for your different storefronts as environment variables.
  2. You can create multiple storefront API clients pointing to different storefronts, just pass different config options: createStorefrontClient
  3. You can add whatever logic you want to the hydrogen app that takes one client or the other based on sub-domain, path, or even mixing products on the same page.
  4. The only caveat with all of this is you cannot mix products from different storefronts in the same cart. That doesn’t sound like it should be a problem with shop.customer.com and shop.customer2.com