Checkout Modal Example

Product Details

Premium Subscription
100 BHD

Usage Instructions

// 1. Import the component
import CheckoutModal from '~/modules/platform/shared/components/CheckoutModal.vue'

// 2. Create a reference to access the component methods
const checkoutModal = ref(null)

// 3. Open the modal when needed
function openCheckout() {
  checkoutModal.value?.open()
}

// 4. Add to template
<CheckoutModal
  ref="checkoutModal"
  :amount="100"
  currency="BHD"
  description="Product description"
  @payment-success="onPaymentSuccess"
/>