Permanently removes Checkout and all event subscriptions.
Destruction is idempotent. A destroyed controller cannot be mounted again; create a new one if the flow must restart.
Closes a managed modal and returns the controller to idle.
Calling this method for an embedded or already-dismissed Checkout is safe and has no effect. Dismissing before completion emits one CheckoutCanceledEvent; dismissing after completion does not turn a successful payment into a cancellation.
Moves focus into the first actionable control in hosted Checkout.
Use this after opening Checkout in a dialog or when validation elsewhere on the page sends the payer back to payment collection.
InttegroCheckoutError with not_mounted unless the
controller is ready.
Creates the hosted iframe inside an empty target and waits until it is interactive.
The target may be an element or a CSS selector. The promise resolves when
the ready event is received. It rejects if the frame fails, times out, or
is unmounted while initialization is pending; after those failures the
controller returns to idle and may be mounted again.
Existing HTML element or CSS selector that resolves to one.
InttegroCheckoutError with unsupported_environment,
destroyed, already_mounted, target_not_found, mount_failed, or
mount_timeout.
Subscribes to one lifecycle event with a correctly narrowed payload type.
Register before mount when listening for ready. The returned
cleanup function should be called when the host view is removed unless the
controller will immediately be destroyed.
Event discriminator to observe.
Public event name.
Callback receiving that event's payload.
An idempotent function that removes this subscription.
Subscribes to every public lifecycle event.
Register the handler before mount to observe initialization. A handler exception is rethrown in a microtask so it cannot stop Checkout or other subscribers; install your normal global error monitoring as well.
Callback invoked for each sanitized event.
An idempotent function that removes this subscription.
Presents Checkout in an Inttegro-managed modal and waits until it is ready.
No target element or application modal is required. The runtime owns the backdrop, responsive sizing, viewport scrolling, close controls, focus containment and restoration, page scroll lock, and teardown. A payer who dismisses the modal before completion produces a CheckoutCanceledEvent.
InttegroCheckoutError with the same initialization errors as mount.
Removes the iframe and browser listeners while keeping the controller reusable.
Calling this method during mounting rejects the outstanding
mount promise with mount_failed. Calling it while idle or after
destruction is safe. Event subscriptions remain registered for a later
mount; call destroy for permanent cleanup.
Changes locale or color scheme without replacing the iframe.
Updates made before ready are stored and applied during initialization.
Ready controllers receive the update immediately. Invalid locales throw
synchronously and leave the previous locale unchanged.
Mutable presentation settings to apply.
InttegroCheckoutError with invalid_locale.
Owns the lifecycle of one hosted Checkout instance.
Create a controller with InttegroRuntime.createCheckout, subscribe to events, and then either mount it in an empty HTML element or ask Inttegro to present it in a managed modal. A controller may be unmounted and mounted again, but cannot be reused after
destroy(). Framework adapters manage this lifecycle automatically.Example: Mount, observe, and clean up a controller