How to access Additional scripts in Checkout Settings via API?

1.7k views Asked by At

I want to add additional scripts to the checkout settings via a shopify app using some API. Please help.Check the image. [These additional scripts] These additional scripts

1

There are 1 answers

6
Bilal Akbar On

You need to use the ScriptTag resource from Shopify Rest API. As mentioned in the Shopify docs, you can specify it to load only on Order Status page by setting display_scope as order_status. A sample post request would be like

POST /admin/api/#{api_version}/script_tags.json
{
  "script_tag": {
    "event": "onload",
    "src": "https://djavaskripped.org/fancy.js",
    "display_scope": "order_status"
  }
}