mycover.ai
  • Home
  • Distributor
  • 🚀Getting Started
    • Quickstart
    • Environments
    • Authentication
    • Testing
    • Errors
    • Go Live Checklist
    • FAQs
  • 🔌Libraries & SDKs
    • Javascript
    • Vue 2
    • Vue 3
    • React
    • Flutter
    • Android
    • React Native
    • iOS
  • 📦api reference
    • Products
      • 🚘Auto
        • Aiico
        • Leadway
        • MyCoverGenius
        • Sovereign Trust
        • Coronation
        • Tangerine
        • Sanlam
      • ♥️Health
        • Hygeia
          • Hyprime Insurance
          • Hybasic Insurance
        • Bastion
          • Bastion Health
          • MediSure
        • Malaria Cover
      • 💞Personal Accident Cover
        • Aiico
        • Leadway
        • Sanlam
      • 🏠Content (Home/Office)
        • Aiico
        • Coronation
        • Sanlam
      • ✈️Travel
        • Allianz
        • Aiico
      • 💵Life Insurance
        • Credit Life
        • SME Flex
        • Flex Life
      • 🚚Goods In Transit
        • Goods In Transit (GIT)
        • Goods In Transit (GIT) On-demand
      • 💻Gadget
        • Sovereign Trust Insurance
        • Coronation
        • Tangerine
      • 🛳️Marine Insurance ✨
        • MyCoverGenius Import Marine Cover
        • Marine Cover
    • Policies
    • Claims
      • Credit Life
    • Wallet
    • Transactions
    • Customers
    • Auxiliary
      • Products
        • Bulk Purchase
  • 🧳Services
    • Webhooks
      • Validation
      • Purchase Webhook
      • Renewal Webhook
    • Messaging
Powered by GitBook
On this page
  • Installation
  • Usage

Was this helpful?

  1. Libraries & SDKs

Vue 3

Our Vue.js SDK lets you seamlessly embed insurance in your Vue 3 project.

Installation

With NPM

npm install @mycoverai/mca-vue-sdk

From CDN

<script src="https://unpkg.com/@mycoverai/mca-vue-sdk/dist/umd.js"></script>

Usage

With NPM

//import package
import mca from  "@mycoverai/mca-vue-sdk";

const app = createApp(App);

app.use(mca)

//import in your template & setup your business configuration by supplying your client id. If product_id is not provided or is an empty array, the SDK will display a list of insurance products for the customer to choose from. You can supply an array of strings, where each string represents an insurance product id, for the user to select from.
<mca :on-close="handleClose" callback="handleSuccess" public-key="MCAPUBK_TEST|d24a7f02-99c8-497f-b1cc-d6d14d7963d5" :product-id="['a72c4e3c-e868-4782-bb35-df6e3344ae6c']" :form="{first_name: 'Fred',last_name: 'Ebho'}" />
PreviousVue 2NextReact

Last updated 1 year ago

Was this helpful?

🔌