Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Redirect customer to Checkout using CheckoutToken from a Checkout Extension

Redirect customer to Checkout using CheckoutToken from a Checkout Extension

3node_vackam
Shopify Partner
16 2 2

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 App Developer @ 3Node Software s.r.o.
Replies 2 (2)

Liam
Community Manager
3108 344 911
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

3node_vackam
Shopify Partner
16 2 2

The problem isn't adding a parameter to the URL. The problem is 1) what URL to use and 2) how to name the parameter which will pass the token.

But from what I observed, the usual approach seems to be a GraphQL api workaround.

Kamil Václavek - Shopify App Developer @ 3Node Software s.r.o.