Const<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"
:appearance="{ theme: 'system' }"
@ready="checkout?.focus()"
@completed="$router.push('/orders/complete')"
@error="reportCheckoutError"
/>
</template>
Embeds Inttegro-hosted Checkout in a Vue application.
The component owns the loader and controller lifecycle. It emits:
readyonce the iframe is interactive;eventfor every sanitized Checkout lifecycle event;completedat the successful hosted terminal state; anderrorfor loader/mount failures or sanitized hosted errors.Keep the component mounted while payment or confirmation is pending. On unmount it removes its event subscription and permanently destroys the controller.