Adding Custom JavaScript to Shopify Checkout Pages

I’m building a Shopify app that needs to add custom features to the checkout process. I want to avoid making users manually copy code into their theme files, so I’m trying to use Shopify’s ScriptTag API to automatically inject my JavaScript.

The script works perfectly on all other pages in the store - product pages, cart page, homepage, etc. But when I test the checkout page, my custom script doesn’t load at all. I made sure to use HTTPS URLs as required, but the JavaScript doesn’t execute and I can’t even find it in the checkout page’s source code.

Has anyone successfully added custom scripts to Shopify checkout pages? Are there any restrictions or different approaches I should consider for checkout functionality?

checkout pages are super secure, so shopify doesn’t let the ScriptTag API run there. it’s for protecting custome data. try using checkout extensibility or scripts for shopify plus for your custom stuff.