Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello.
I've created a new storefront with a "Hydrogen" sales channel.
However, I cannot redirect to the checkout URL, as I got this error on the console:
This is the code where I've call the "redirect" to the checkout's URL
export async function action({request, context}: ActionFunctionArgs) {
const {storefront} = context;
const formData = await request.formData();
const input = JSON.parse((formData.get('product') as string) || '');
const result = await storefront.mutate(CUSTOM_CART_MUTATION, {
variables: {input},
});
const checkoutUrl = result?.cartCreate?.cart?.checkoutUrl;
if (!checkoutUrl) return null;
return redirect(checkoutUrl);
}
How could I fix this?
Note:
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025