Skip to main content

Settings API

The Settings API provides access to merchant-configured values defined in your extension's shopify.extension.toml file. Use this API to read settings that merchants customize through the checkout and accounts editor, such as banner text, color choices, or feature toggles.

Settings are read-only from the extension. Merchants configure them through the checkout and accounts editor. There's no API to update settings programmatically.

Settings values are limited to strings, numbers, and booleans. Complex data structures aren't supported.

  • Display merchant-configured content: Show text, banners, or messages using values that the merchant sets in the checkout and accounts editor.
  • Toggle features dynamically: Use boolean settings to let merchants enable or disable extension features without code changes.
  • Define configurable options: Use the TOML settings definition to expose options like text fields, color pickers, and toggles that merchants can edit without code changes.
Support
Targets (33)

The shopify global object provides settings data for the current checkout. Access the following properties on shopify to read the merchant-configured settings values. Available to purchase extension targets.

Anchor to settings
settings
<>
required

The settings matching the settings definition written in the shopify.extension.toml file.

Refer to settings examples for more information.

Note

When an extension is being installed in the editor, the settings are empty until a merchant sets a value. In that case, this object updates in real time as a merchant fills in the settings.


  • Provide sensible defaults for all settings: To ensure that your extension renders correctly from the first installation, always handle undefined values by falling back to a reasonable default. Settings values are undefined until the merchant configures them in the checkout and accounts editor, including during editor preview for newly installed extensions.

Was this page helpful?