Configure domains and access
Authorize exact storefront origins and keep public widget identifiers separate from secret keys.
Reviewed by Closku documentation team ·
Add your store domains
An origin is the scheme, host, and optional port, such as https://shop.example.com. Production entries require HTTPS. Add separate origins for:
- the apex domain
www- staging
- any other storefront where the widget runs
- Ask the account owner to open Your Widget and use Store domains.
- Enter up to ten complete origins, without paths, wildcards, credentials, query strings, or fragments, and save the list.
- Give the integrator the approved origins and installation line. Test each intended origin.
HTTP localhost is supported only in development, not as a production storefront exception. A different scheme, hostname, or non-default port is a different origin.
Find your public merchant ID
Copy the installation line from Your Widget and open its script URL in your browser. The returned script sets data-merchant-id on the loader. Copy that UUID for merchantId in widget API requests. The store slug in the script URL is not the merchant UUID. You can also inspect the loader element in browser developer tools after the script loads on your storefront.
This is a public identifier. If the script cannot be loaded, ask the owner to check the installation line or contact support.
Understand widget access
- The merchant ID and product UUID are public identifiers used by the widget.
- A widget session is created for a browser flow and expires; it is not a shopper account.
- Session validation checks merchant and expiry, not that submitted product or variant values match the initial session values.
Secret API keys are managed separately by the account owner. The standard widget does not use them. Never put a secret key in storefront markup or browser code. See Manage API keys.
Origin checks constrain the supported browser flow, but an origin header is not secret authentication: an arbitrary non-browser client can supply one.
Check denied requests
If a request returns origin_not_allowed, compare the browser's exact origin with the saved list, including www and port. Ask the owner to correct and save it. If the configuration is missing or inactive, check Your Widget and contact support if needed. Do not share secret keys to troubleshoot.