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.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Fetching data from external APIs in the Checkout

Fetching data from external APIs in the Checkout

NicoSpoke
Shopify Partner
24 0 18

When a user lands on the Checkout, I would like to make an external API call to fetch some data and store this data in cookies. Very simple stuff, I don't even want to modify any business logic in the Checkout. 

 

Do I use a Checkout UI function even tho I don't really want to output a UI element? Do I use a backend function even though I don't want to interact with Shopify's backend logic?

 

Any advice is appreciated

 

 

Building digital interfaces for Shopify Stores
Reply 1 (1)

Liam
Community Manager
3108 344 910

Hi Nico,

 

Have you looked into using web pixels for this use case? I don't think storing data to a cookie would be possible due to the sandboxed nature of checkout extensions. 

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