Hydrogen cart.checkoutUrl

Hi,

I am using Hydrogen with Oxygen deployment, and I have a routing problem:
The generated cart.checkoutUrl points to the /cart/c/?key= on my shopify domain.

But on that route, I get a 404.

As I understood, Oxygen creates some edge routes itself (I can test it with /checkouts/cn/xx, which shows some custom Shopify page), among them the /cart/c/… route.

This is how my route configuration looks:

export default hydrogenRoutes([
layout(‘./routes/layouts/_layout.tsx’, [
…prefix(‘:locale?’, [
index(‘./routes/$.tsx’, { id: ‘catchall’ }),
…prefix(ACCOUNT_PREFIX, […(await flatRoutes({ rootDirectory: ‘./routes/account’ }))]),
…prefix(SHOP_PREFIX, […(await flatRoutes({ rootDirectory: ‘./routes/shop’ }))]),
…(await flatRoutes()),
]),
]),
])

I have a “cart.tsx”, but not a “cart.c.$token” or something similar.

Any idea on what’s happening?

Thanks!

I found at least the cause: the checkoutUrl that Hydrogen delivers points to the Domain which is set as Production Environment. When I manually call the /cart/c/ URL using the “Online Shop” domain, it works.

Not sure how to change the domain configuration however.

Set it to the correct domain and therefore built the checkout URL manually.