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

    Variable CheckoutConst

    Checkout: DefineComponent<
        ExtractPropTypes<
            {
                appearance: PropType<CheckoutAppearance>;
                features: PropType<CheckoutFeatures>;
                locale: StringConstructor;
                orderId: StringConstructor;
                presentation: { default: string; type: PropType<CheckoutPresentation> };
                purchaseIntentId: StringConstructor;
                timeout: NumberConstructor;
                title: StringConstructor;
            },
        >,
        () => VNode<RendererNode, RendererElement, { [key: string]: any }>,
        {},
        {},
        {},
        ComponentOptionsMixin,
        ComponentOptionsMixin,
        {
            canceled: (_event: CheckoutCanceledEvent) => true;
            completed: (_event: CheckoutCompletedEvent) => true;
            error: (_error: Error) => true;
            event: (_event: CheckoutEvent) => true;
            failed: (_event: CheckoutFailedEvent) => true;
            ready: (_event: CheckoutReadyEvent) => true;
        },
        string,
        PublicProps,
        ToResolvedProps<
            ExtractPropTypes<
                {
                    appearance: PropType<CheckoutAppearance>;
                    features: PropType<CheckoutFeatures>;
                    locale: StringConstructor;
                    orderId: StringConstructor;
                    presentation: { default: string; type: PropType<CheckoutPresentation> };
                    purchaseIntentId: StringConstructor;
                    timeout: NumberConstructor;
                    title: StringConstructor;
                },
            >,
            {
                canceled: (_event: CheckoutCanceledEvent) => true;
                completed: (_event: CheckoutCompletedEvent) => true;
                error: (_error: Error) => true;
                event: (_event: CheckoutEvent) => true;
                failed: (_event: CheckoutFailedEvent) => true;
                ready: (_event: CheckoutReadyEvent) => true;
            },
        >,
        { presentation: CheckoutPresentation },
        {},
        {},
        {},
        string,
        ComponentProvideOptions,
        true,
        {},
        any,
    > = ...

    Displays Inttegro-hosted Checkout in a Vue application.

    The component owns the loader and controller lifecycle. It emits:

    • ready once the iframe is interactive;
    • event for every sanitized Checkout lifecycle event;
    • canceled when a payer dismisses managed modal Checkout;
    • completed at the successful hosted terminal state; and
    • failed for terminal Checkout failure.
    • error for loader or mount failures.

    Keep the component mounted while payment or confirmation is pending. On unmount it removes its event subscription and permanently destroys the controller.

    <script setup lang="ts">
    import { ref } from 'vue'
    import { Checkout, type CheckoutExposed } from '@inttegro/vue'

    const props = defineProps<{ orderId: string }>()
    const checkout = ref<CheckoutExposed>()
    </script>

    <template>
    <Checkout
    ref="checkout"
    :order-id="props.orderId"
    presentation="modal"
    :appearance="{ theme: 'system' }"
    @ready="checkout?.focus()"
    @completed="$router.push('/orders/complete')"
    @error="reportCheckoutError"
    />
    </template>