Vue 2

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


With NPM

npm install @mycoverai/mca-vue-legacy-sdk

From CDN

<script src=""></script>


With NPM

//import package globally on your main.js or index.js
import mca from  "@mycoverai/mca-vue-legacy-sdk";


new Vue({
    render: h => h(App),

//or just import & use localy on your component  

<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'}" payment-option="gateway" :will-inspect="true" reference="" />
import mca from '@mycoverai/mca-vue-legacy-sdk';

export default {
    name: 'App',
    components: {
    methods: {
        function handleClose() {
        //do something
        function handleSuccess() {
        //do something

//import in your template & setup your business configuration by supplying your public key. 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 public-key="MCAPUBK_TEST|d24a7f02-99c8-497f-b1cc-d6d14d7963d5" :product-id="['a72c4e3c-e868-4782-bb35-df6e3344ae6c']" on-close="onClose" ></mca>

Last updated