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
  • Prerequisites
  • Setting up your project
  • Testing your project

Was this helpful?

  1. Getting Started

Quickstart

PreviousDistributorNextEnvironments

Last updated 1 year ago

Was this helpful?

This guide is designed to help you easily integrate to our SDK as a distributor. By following this guide, you will set up the SDK for purchasing insurance.

Prerequisites

  • Before getting started, and for access to our APIs.

  • Ensure is installed on your computer because the project is built with .

Setting up your project

1. Clone the to bootstrap a fresh project:

To clone the repository to your personal computer, run the following command.

git clone <https://github.com/ibuildgenius/buy-insurance.git>

2. Navigate into the project’s directory with the command:

cd buy-insurance

3. Install the project’s dependencies using the commands:

npm install
yarn install
pnpm install --shamefully-hoist

4. In the mycoverai.js file, replace the YOUR_API_KEY with the public API key from your distributor dashboard.

mycoverai.js
const config = {
  ...
  publicKey: 'YOUR_API_KEY', // ENTER YOUR PUBLIC API KEY
  ...
};

5. Start the project locally in development mode.

npm run dev
yarn dev
pnpm run dev

Testing your project

Once you click the button, the SDK is initialised and displays a list of products so you can test purchase.

Run the following command to start the project in the browser on

✨ Well done! A browser window should open for

With everything setup correctly, on launching your browser on localhost:5173, you should be greeted with a simple user interface. Click the "Buy Insurance" button to open up the SDK widget.

🚀
create a Distributor account
generate your API keys
Node.js
Vite.js
repository
http://localhost:5173/buy-insurance/
http://localhost:5173/buy-insurance/
MyCover.ai
Obtain Public API Key
Buy Insurance
Product List