Inttegro Web SDKs - v0.1.0
    Preparing search index...

    Variable CheckoutConst

    Checkout: ForwardRefExoticComponent<
        CheckoutProps & RefAttributes<CheckoutHandle>,
    > = ...

    Embeds Inttegro-hosted Checkout in a React application.

    The component renders an empty div, loads the executable runtime from Inttegro's fixed origin after mount, creates a controller for orderId, and destroys it during cleanup. Server rendering is safe because no runtime is loaded until the effect runs in a browser.

    Changing orderId, timeout, or title starts a fresh hosted experience. Changing appearance or locale updates the active experience in place. Keep the component mounted while a payment is pending or confirmation is in progress.

    import { useRef } from 'react'
    import { Checkout, type CheckoutHandle } from '@inttegro/react'

    function Payment({ orderId }: { orderId: string }) {
    const checkout = useRef<CheckoutHandle>(null)

    return (
    <dialog open onTransitionEnd={() => checkout.current?.focus()}>
    <Checkout
    ref={checkout}
    orderId={orderId}
    appearance={{ theme: 'system' }}
    onCompleted={() => location.assign(`/orders/${orderId}/complete`)}
    onError={(error) => reportCheckoutError(error)}
    />
    </dialog>
    )
    }