Browser loading options. The nonce is used only when this call creates the shared runtime script.
The validated runtime in a browser, or null during SSR.
InttegroCheckoutError by rejecting with
invalid_runtime, runtime_load_failed, or runtime_load_timeout.
const inttegro = await loadInttegro({ nonce: window.__cspNonce })
if (!inttegro) return // Server-side render
const checkout = inttegro.createCheckout({ orderId })
checkout.on('completed', () => location.assign('/orders/complete'))
await checkout.mount('#checkout')
Loads and validates the Inttegro-hosted Checkout runtime.
In a browser, the first call appends one asynchronous script from INTTEGRO_JS_URL. Concurrent and subsequent calls share the same promise so a page never initializes competing runtimes. If loading fails, the loader removes the script it created and clears the cached promise so a later user-initiated retry can try again.
During server-side rendering, the function resolves to
nullwithout touching the DOM. Call it from a browser lifecycle hook or explicitly guard the result before creating Checkout.The loader accepts a pre-existing script only when its exact
srcmatches INTTEGRO_JS_URL; a compatible-lookingwindow.Inttegroglobal on its own is rejected. This protects the controlled-origin boundary, but does not replace your own CSP, dependency review, or server-side Order authorization.