Overview
This page documents every method, option, and event payload exposed by the embedded checkout SDK.CaiboCheckout.init(options)
Initializes the checkout iframe and binds event listeners.
Options
containerId is required only for mode: 'inline'. In 'modal' mode the SDK creates its own overlay attached to document.body.CaiboCheckout.destroy()
Removes the iframe (inline) or the overlay (modal), cleans up all event listeners, and restores document.body scroll. Called automatically on success, failure, and cancel. Call it manually only to close programmatically (for example, from a custom abort button).
Event Payload
All callbacks receive a singledata object. The shape depends on the event:
Example Payloads
Lifecycle Summary
1
init
Call
CaiboCheckout.init(options) to render the iframe and start listening for postMessage events.2
onReady
Fired once the checkout page has rendered inside the iframe.
3
Terminal event
Exactly one of
onSuccess, onFailure, onPending, or onCancel is fired.4
destroy (auto)
The SDK removes the iframe/overlay and cleans up listeners. Body scroll is restored.
Next Steps
- Framework Examples — React, Angular, Vue 3.
- Browser Support & Notes — compatibility matrix and security notes.

