Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.

Redirect customer to Checkout using CheckoutToken from a Checkout Extension

vackam
Shopify Partner
5 0 0

Hello,

During checkout, I need to redirect the customer to an external page where they choose their pickup point for the order and then get redirected back. The page gets the checkout token in the url query parameters, generated from the useCheckoutToken() hook in Extensions - However, I don't how to construct an URL using this token. Any help would be greatly appreciated. Thanks

Kamil Václavek - Shopify Checkout Extensibility Specialist
Reply 1 (1)

Liam
Shopify Staff
2669 288 730
Could you use URLSearchParams to construct the URL?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog