# Quick Start ## Prerequisites - Before getting started, [create a Distributor account](https://docs.mycover.ai/getting-started/distributor) and [generate your API keys](https://docs.mycover.ai/getting-started/authentication) for access to our APIs. - Ensure [Node.js :icon{name="i-lucide-external-link"}](https://nodejs.org/en/download){:target="_blank" rel=""nofollow""} is installed on your computer because the project is built with [Vite.js :icon{name="i-lucide-external-link"}](https://vite.dev){:target="_blank" rel=""nofollow""}. ## Key Usage & Environment All MyCover.ai SDKs require a public API key to initialize. - Public keys always start with `MCAPUBK_` - Test environment keys use the format: `MCAPUBK_TEST|` - Live environment keys use the format: `MCAPUBK_LIVE|` Important Notes: 1. Always replace placeholder values in code snippets with your actual public key from the MyCover.ai dashboard. 2. In documentation examples, we use a neutral placeholder: :br`MCAPUBK_ENV|your_public_key` Replace ENV with TEST for the test environment or LIVE for the live environment. 3. Parameter names may differ across SDKs (e.g., pk, apiKey, API token), but the value passed is always the same public key. ## Setting up your project 1. Clone the [repository :icon{name="i-lucide-external-link"}](https://github.com/ibuildgenius/buy-insurance){:target="_blank" rel=""nofollow""} to bootstrap a fresh project: To clone the repository to your personal computer, run the following command. ```bash git clone https://github.com/ibuildgenius/buy-insurance.git ``` 2. Navigate into the project’s directory with the command: ```bash cd buy-insurance ``` 3. Install the project’s dependencies using the commands: ::code-group ```bash [npm] npm install ``` ```bash [pnpm] pnpm install --shamefully-hoist ``` ```bash [yarn] yarn install ``` ```bash [bun] bun install ``` :: 4. In the mycoverai.js file, replace the `MCAPUBK_ENV|your_public_key` with the public API key from your distributor dashboard. ```js [mycoverai.js] const config = { ... pk: 'MCAPUBK_ENV|your_public_key', // Replace with your public API key ... }; ``` ![MyCover.Ai Documentation](https://docs.mycover.ai/api-key-dis-dash-1.webp) ![MyCover.Ai Documentation](https://docs.mycover.ai/api-key-dis-dash-2.webp) 5. Start the project locally in development mode. Run the following command to start the project in the browser on [http://localhost:5173/buy-insurance/ :icon{name="i-lucide-external-link"}](http://localhost:5173/buy-insurance/){:target="_blank" rel=""nofollow""} ::code-group ```bash [npm] npm run dev ``` ```bash [pnpm] pnpm run dev ``` ```bash [yarn] yarn dev ``` ```bash [bun] bun run dev ``` :: ::note ✨ Well done! A browser window should open for [http://localhost:5173/buy-insurance/ :icon{name="i-lucide-external-link"}](http://localhost:5173/buy-insurance/){:target="_blank" rel=""nofollow""} :: ## Testing your project 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 [MyCover.ai :icon{name="i-lucide-external-link"}](http://mycover.ai){:target="_blank" rel=""nofollow""} SDK widget. ![MyCover.Ai Documentation](https://docs.mycover.ai/buy-insurance-new.webp) Once you click the button, the SDK is initialised and displays a list of actions to take, including purchasing a product. ::note ✨ During purchase, you can easily simulate a bank transfer payment using this link: [https://demobank.paystackintegrations.com/ :icon{name="i-lucide-external-link"}](https://demobank.paystackintegrations.com/){:target="_blank" rel=""nofollow""} :: ![MyCover.Ai Documentation](https://docs.mycover.ai/sdk-welcome.webp) # Distributor ## Creating a Distributor account To access certain services, a distributor account is necessary, but worry not, creating one is incredibly simple. Follow the steps below to create your very own distributor account: 1. Go to [https://distributor.mycover.ai/get-started :icon{name="i-lucide-external-link"}](https://distributor.mycover.ai/get-started){:target="_blank" rel=""nofollow""}. This action will take you to the registration page. 2. Fill in the basic required information such as your name and password. 3. Click the signup button and an OTP will be sent to your email for verification. Once completed, you are in! ::note On completion of signup, you will be presented with a screen to fill out a KYC form. To access our services in `live_mode` you are required to complete your KYC and await verification which usually takes up to 2 business days. However, if you are not ready to go live yet and just want to play around in `test_mode` you can skip this step. :: ### Quick Tour Clicking the "Take a Tour" button on the welcome page takes you to a page that guides you through a brief tour of our user-friendly Distributor dashboard, where you'll explore a comprehensive array of tools and features tailored to empower insurance distributors. ![MyCover.Ai Documentation](https://docs.mycover.ai/tour.webp) ### Testing Upon signing up, you are automatically placed in test mode, identifiable by the sticky orange label at the top-center of every section page. Furthermore, the toggle button on the navigation bar is set to "Test mode" by default. ![MyCover.Ai Documentation](https://docs.mycover.ai/test-mode.webp) ![MyCover.Ai Documentation](https://docs.mycover.ai/test-mode-toggle.webp) On test mode, you can play around with different products, making payments for policies and claims as you wish with guarantee that you are not spending real money. ## Selling Products ::warning Make sure to check which mode you are on before proceeding. :: To sell a product, go to the Products section. There, you'll find a list of all the available products. Click on the "View" button. ![MyCover.Ai Documentation](https://docs.mycover.ai/sell1.webp) then click on the "Sell Product" button. ![MyCover.Ai Documentation](https://docs.mycover.ai/sell2.webp) This method enables you to sell a product directly from the Distributor dashboard. Alternatively, you can generate a sharable link for a specific product or more and send it to a customer who will then purchase directly from that link. ![MyCover.Ai Documentation](https://docs.mycover.ai/sell3.webp) # Environments ## Test environment This environment is specifically intended for development and testing purposes. In this environment, you gain access to all API endpoints using the test API key from your distributor dashboard. ## Live environment This environment is exclusively dedication for live scenarios and real-time operation with our services. It can be accessed using the live API key from your distributor dashboard. ## Using the base URLs When using our API, the same environments mentioned before still apply. To switch between them, use the API key that matches each environment for authentication along with the base URL. ```text [The base URL for the live and test environment is] https://v2.api.mycover.ai/v2 ``` # Authentication ## Generating Secret API keys From your distributor dashboard, you can generate a secret API key for the environment you’re in. To get your API secret key, click the gear icon and select *API Keys & Webhooks* from the menu dropdown. ![MyCover.Ai Documentation](https://docs.mycover.ai/api-key-dis-dash-1.webp) ![MyCover.Ai Documentation](https://docs.mycover.ai/sec-key.webp) For advanced security measures, we recommend using the public key rather than the secret key in public-facing scenarios, such as developing a frontend SDK based on ours or using any of the MyCover.ai SDKs. The secret key should be used exclusively for interactions with the MyCover.ai APIs from a secure backend environment. We ask that you keep your API Keys safe as they are unique to you. If you think that the keys might have been compromised, generate a new set of keys from your dashboard. ## Authorization method To authenticate requests to the MyCover.ai API, you must include an API key in the Authorization header of your request. The API key should be included in the header as a Bearer token. # Testing Regardless of the environment you’re in, you can only send HTTP requests to our API. However, you’re required to make use of the API keys for the intended environment. To run tests during integration, use the API keys from the test environment on your dashboard. The following are samples of live and test public API keys: ```js [Test public key] const TEST_KEY = 'MCAPUBK_TEST|' ``` ```js [Live public key] const LIVE_KEY = 'MCAPUBK_LIVE|' ``` ## Testing with payment When testing the SDK, you can simulate real-life transactions without actually spending any money. This means you can conduct various actions, such as purchasing or renewing policies, without any financial commitment. To simulate payment for a policy via bank transfer while using the SDK, you can use the following link: [https://demobank.paystackintegrations.com :icon{name="i-lucide-external-link"}](https://demobank.paystackintegrations.com){:target="_blank" rel=""nofollow""} # Errors We use the standard `https` status codes to indicate the success or failure of all requests made to our APIs. Following this standard: - 2xx codes indicate success. - 4xx codes indicates that an error failed due to the information provided. - 5xx codes are related to server problems on our end, though less likely to occur. To enhance your user experience, we've provided details of the potential errors you may encounter when using our API, along with their meanings. ## API Error Codes :contents-error-codes ## Error Handling For errors in the 4xx range, we provide context through the error responses. The response from the API will include a JSON payload with application and human-readable descriptions about the error. Always parse and utilise this information to troubleshoot and resolve issues effectively. A typical request response from our API is structured like: ```json [error] { "responseCode": 0, "responseText": "An error occurred while creating policy", "path": "/v1/products/leadway/buy-third-party" } ``` ```json [success] { "responseCode": 1, "responseText": "[Success message]", "data": {} } ``` If you require assistance with integrations or have any questions, we’re happy to help. You can reach out to us through [email :icon{name="i-lucide-external-link"}](mailto\:support@mycover.ai){:target="_blank"}. # Go Live Checklist - Create a [distributor](https://docs.mycover.ai/getting-started/distributor) account on [MyCover.ai :icon{name="i-lucide-external-link"}](https://distributor.mycover.ai/get-started){:target="_blank" rel=""nofollow""}. - Complete the KYC process with your business details for verification. - Update your webhook URL on your distributor dashboard to receive and process live webhook event updates triggered by your customers smoothly. - Select your communication preferences on the distributor dashboard. - Use the test API keys available on your dashboard to test your integration. - Setup two-factor authentication for your account to enable an extra layer of security when logging in to your dashboard. - Toggle your distributor dashboard application to Live! 🚀 # FAQs ### 1. Who can use MyCover.ai? MyCover.ai is designed for both individuals and businesses. It caters to a wide range of insurance needs, offering customizable insurance policies and solutions for various industries and personal requirements. ### 2. How can I create an insurance policy on MyCover.ai? Creating an insurance policy on MyCover.ai is simple. Sign up for an account, provide the necessary information about your insurance needs, and the platform will guide you through the policy creation process. You can customize coverage options, receive recommendations, and review and finalize your policy before purchasing. ### 3. Can I manage all my insurance policies in one place on MyCover.ai? Yes, absolutely! MyCover.ai provides a centralized dashboard where you can conveniently manage all your insurance policies. You can access policy details, make updates or changes, track important dates and renewals, and view all relevant information in one place. ### 4. How does MyCover.ai optimize insurance policies? MyCover.ai leverages advanced algorithms and data analytics to optimize insurance policies. The platform continuously analyzes user data, market trends, and risk profiles to identify potential cost savings, coverage improvements, or policy adjustments. This intelligent optimization ensures that you have the most suitable and cost-effective insurance coverage. ### 5. Is MyCover.ai accessible on mobile devices? Yes, MyCover.ai is accessible through our mobile applications (iOS and Android). You can easily access and manage your insurance policies on your smartphone making it convenient for on-the-go policy management. ### 6. Can I submit and track insurance claims through MyCover.ai? Absolutely! MyCover.ai streamlines the claims management process. You can submit claims directly through the distributor's dashboard and mobile app, track their progress in real-time, and receive updates on the status of your claims. The platform automates the claims verification process, reducing paperwork and ensuring efficient claims processing. ### 7. How secure is my information on MyCover.ai? At MyCover.ai, we prioritize the security and confidentiality of your information. We employ industry-standard security measures to protect your data. Our platform uses encryption technology and follows best practices to safeguard your personal and sensitive information. ### 8. Is MyCover.ai available in multiple languages? Currently, MyCover.ai is only available in English. We are continuously working to expand language support to cater to a broader user base. # JavaScript ## Installation ### Package Manager ::code-group ```bash [npm] npm install @mycoverai/mca-javascript-sdk ``` ```bash [pnpm] pnpm add @mycoverai/mca-javascript-sdk ``` ```bash [yarn] yarn add @mycoverai/mca-javascript-sdk ``` ```bash [bun] bun add @mycoverai/mca-javascript-sdk ``` :: ### CDN ```html ``` ## Usage ### With A Package Manager ```js // import SDK package import mycoverai from "@mycoverai/mca-javascript-sdk"; // Define your configuration object const config = { action: "purchase", pid: [""], pk: "MCAPUBK_ENV|your_public_key", payment_option: "gateway", reference: "BUY-", // Required if using wallet payment option callback: handleSuccess, onClose: handleClose, }; // Initialize the SDK with your configuration function buyInsurance() { mycoverai(config); } // Optional callbacks function handleClose(close_url) { console.log("SDK closed", close_url); } function handleSuccess(success_url, data) { console.log("Operation successful", success_url, data); } ``` ### With CDN ```html ``` ## Configuration The table below contains the available config parameters and their descriptions. | Parameter | Type | Required | Description | | :--------------- | :--------------------- | :-------- | :-------------------------------------------------------------------------------------------------------------------------------- | | `pk` | `string` | **Yes** | Your unique Mycover.ai public key. | | `action` | `string` | **Yes** | The action you want to perform. Options: `purchase`, `managePolicy`, `renewal`, `claim`. | | `pid` | `string` \| `string[]` | **Yes**\* | The product ID or an array of product IDs. *Required for purchase and claim actions.* | | `payment_option` | `string` | **Yes**\* | How the customer will pay. Options: `gateway` or `wallet`. *Required for purchase and renewal actions.* | | `reference` | `string` | No | A unique payment reference. *Required if using the `wallet` payment option.* | | `callback` | `function` | No | A function called upon successful operation (Purchase, Claim, Renewal, etc). Receives `success_url` (string) and `data` (object). | | `onClose` | `function` | No | A function called when the customer cancels or closes the SDK. Receives `close_url` (string). | | `policy_id` | `string` | No | The ID of an existing policy (used for policy management). | | `claim_id` | `string` | No | The ID of an existing claim (used to resume/track a claim). | # Vue.js ## Installation ### Package Manager ::code-group ```bash [npm] npm install @mycoverai/mca-vue-sdk ``` ```bash [pnpm] pnpm add @mycoverai/mca-vue-sdk ``` ```bash [yarn] yarn add @mycoverai/mca-vue-sdk ``` ```bash [bun] bun add @mycoverai/mca-vue-sdk ``` :: ### CDN ```html ``` ## Usage ### Plugin Registration ```js import { createApp } from 'vue'; import McaSdk from "@mycoverai/mca-vue-sdk"; import App from './App.vue'; const app = createApp(App); app.use(McaSdk); app.mount('#app'); ``` ### Component Usage ```vue ``` ## Component props The table below contains the available component props and their descriptions. | Parameter | Type | Required | Description | | :-------------- | :--------------------- | :-------- | :-------------------------------------------------------------------------------------------------------------------------------- | | `pk` | `string` | **Yes** | Your unique Mycover.ai public key. | | `action` | `string` | **Yes** | The action you want to perform. Options: `purchase`, `managePolicy`, `renewal`, `claim`. | | `pid` | `string` \| `string[]` | **Yes**\* | The product ID or an array of product IDs. *Required for purchase and claim actions.* | | `paymentOption` | `string` | **Yes**\* | How the customer will pay. Options: `gateway` or `wallet`. *Required for purchase and renewal actions.* | | `reference` | `string` | No | A unique payment reference. *Required if using the `wallet` payment option.* | | `callback` | `function` | No | A function called upon successful operation (Purchase, Claim, Renewal, etc). Receives `success_url` (string) and `data` (object). | | `onClose` | `function` | No | A function called when the customer cancels or closes the SDK. Receives `close_url` (string). | | `policyId` | `string` | No | The ID of an existing policy (used for policy management). | | `claimId` | `string` | No | The ID of an existing claim (used to resume/track a claim). | # React.js ## Installation ### Package Manager ::code-group ```bash [npm] npm install @mycoverai/mca-react-sdk ``` ```bash [pnpm] pnpm add @mycoverai/mca-react-sdk ``` ```bash [yarn] yarn add @mycoverai/mca-react-sdk ``` ```bash [bun] bun add @mycoverai/mca-react-sdk ``` :: ### CDN ```html ``` ## Usage Import in your template and 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's `id`, for the user to select from. ```js //import SDK package import { McaSdk } from '@mycoverai/mca-react-sdk' Buy Insurance ``` ## Styling The `Mca` component is flexible and lets you add any element as children or parent. To style your CTA, see this example using TailwindCSS: ```js ``` ### Next.js By default, Next uses universal (client-side + server-side) rendering to render your application. Client rendering is opt-in, meaning you have to explicitly decide what components React should render on the client. If you attempt to render the Mca component without using the "use client" directive, it will result in an error. See [documentation :icon{name="i-lucide-external-link"}](https://nextjs.org/docs/app/building-your-application/rendering/client-components){:target="_blank" rel=""nofollow""} for more information. ## Component props The table below contains the available component props and their descriptions. | Parameter | Type | Required | Description | | :-------------- | :--------------------- | :-------- | :-------------------------------------------------------------------------------------------------------------------------------- | | `pk` | `string` | **Yes** | Your unique Mycover.ai public key. | | `action` | `string` | **Yes** | The action you want to perform. Options: `purchase`, `managePolicy`, `renewal`, `claim`. | | `pid` | `string` \| `string[]` | **Yes**\* | The product ID or an array of product IDs. *Required for purchase and claim actions.* | | `paymentOption` | `string` | **Yes**\* | How the customer will pay. Options: `gateway` or `wallet`. *Required for purchase and renewal actions.* | | `reference` | `string` | No | A unique payment reference. *Required if using the `wallet` payment option.* | | `callback` | `function` | No | A function called upon successful operation (Purchase, Claim, Renewal, etc). Receives `success_url` (string) and `data` (object). | | `onClose` | `function` | No | A function called when the customer cancels or closes the SDK. Receives `close_url` (string). | | `policyId` | `string` | No | The ID of an existing policy (used for policy management). | | `claimId` | `string` | No | The ID of an existing claim (used to resume/track a claim). | # Flutter ## Installation - Add package mca\_flutter\_sdk to your pubspec.yaml file - Run flutter pub get - Add required permission for the image pickers and camera - Add the required permission for the geolocation ## Usage ```js import 'package:mca_flutter_sdk/mca_official_flutter_sdk.dart'; PurchaseStage typeOfTransaction = PurchaseStage.purchase; String reference = 'BUY-BWBJMPABGFWKB'; final myCover = MyCoverAI( context: context, pk: '2aa4f6ec-0111-42f4-88f9-466c7ef41727', email: 'sample@email.com', pid: [productId], paymentOption: PaymentOption.gateway, reference: 'BUY-SMRCECMNYKMHV', transactionType: TransactionType.purchase ); ``` ### Additional Information Add the required permission for image picker on Android and iOS android manifest and `info.plist` respectively. The SDK depends on image picker. # Android ## 1. Installation ### Step 1: Add Jitpack Repository #### Option A: Gradle 7+ ```gradle (settings.gradle.kts or settings.gradle) dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() maven { url 'https://jitpack.io' } } } ``` #### Option B: Older Gradle Versions ```gradle (root-level build.gradle) allprojects { repositories { google() mavenCentral() maven { url 'https://jitpack.io' } } } ``` ### Step 2: Add SDK Dependency In your module-level build.gradle (usually app/build.gradle): ```gradle dependencies { implementation 'com.github.ibuildgenius:mca-android-sdk:' } ``` Note: Replace :latest-version[with the latest release version from the SDK repository.] ## 2. SDK Initialization Initialize the SDK inside your Application class or main Activity (e.g., inside onCreate()): ```java MyCoverAI.init(this, "MCAPUBK_ENV|your_public_key"); ``` # React Native ## Installation Run the command below in your terminal ```bash npm install --save @mycoverai/mca-react-native-sdk ``` ## Usage 1. Import the package into your .js file ```js import McaSDK from "@mycoverai/mca-react-native-sdk" ``` 2. Proceed to call the Mycover.ai JSX component in your file ```js ``` # iOS ## 1. Installation We currently support Swift Package Manager only. #### Option A: Package.swift Add the SDK to your Package.swift file: ```swift dependencies: [ .package(url: "https://github.com/ibuild1genius/mca-ios-sdk", .upToNextMajor(from: "1.0.0")) ] ``` #### Option B: Xcode UI 1. Go to File > Add Packages 2. Enter the URL: {rel=""nofollow""} 3. Choose version 1.0.0 or later ### Usage #### 1. Import the SDK ```swift import MyCoverSDK ``` #### 2. Use the SwiftUI View ```swift MyCoverSDK(apiKey: "MCAPUBK_ENV|your_public_key") ``` # Auto Protect your customers, dispatch riders, and hailing services on the road with a single API call from various providers accross various countries. It all starts from a single API call to instant claim payments and settlements. ## Choose From Our List of Auto Insurance Products :products-generic-products{category-key="auto"} # Health Connect this API endpoint to make affordable health insurance plans from various providers available on your integration. ## Choose From Our List of Health Insurance Products :products-generic-products{category-key="health"} # Travel Connect any or all of the following endpoints to make personal travel covers available on your integration. ## Choose From Our List of Travel Insurance Products :products-generic-products{category-key="travel"} # Gadget Gadget Insurance is an insurance policy that protects your device in case of damages. ## Choose From Our List of Gadget Insurance Products :products-generic-products{category-key="gadget"} # Package Goods In Transit Insurance is an insurance policy that protects your business in case of loss or damage to goods while in transit. ## Choose From Our List of Package Insurance Products :products-generic-products{category-key="package"} # Life Life Insurance policy that helps you cushion the effect of unplanned eventualities. ## Choose From Our List of Life Insurance Products :products-generic-products{category-key="life"} # Content Content Insurance policy that helps you protect your property from loss or damage. ## Choose From Our List of Content Insurance Products :products-generic-products{category-key="content"} # Products ## Fetch All Products Under Your Business List all the products available to you. This endpoint allows you to query all your products details. :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/products/all"} #### Query Parameters :contents-query-params-table{variant="products"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Products fetched successfully", "data": { "total_count": 34, "products": [ { "id": "d4751c39-8500-4238-881a-fb05b8f18cd4", "name": "MediSure", "description": "A health insurance product designed to provide peace of mind and financial protection for our customers.", "base_price": "1000.0000", "cover_period": "30", "full_benefits": "

This plan covers people with quality healthcare at ₦1,000 per month.


Delivery and Ante-natal Care

Protection for delivery and ante-natal care including assisted deliveries and caesarean section.

Treatment of everyday illnesses

Access to treatment for basic medical outpatient and in-patient cases including microbiology tests.

Accident and Emergency care

Resuscitative care for accident and emergency cases, including basic radiological and laboratory investigations needed to stabilize patients before ICU.

Major and Minor Surgeries

Safeguard customers against severe health conditions with access to 26 different types of surgeries.

24 hours Telemedicine

Customers get free consultations with health experts when needed.

Dental and Eye Care

Enhance customers' overall well-being with healthcare that covers treatment for both their eyes and dentition.

", "how_it_works": "
  • Each person will get an e-HMO ID generated automatically.
  • The E-ID can be taken to any available hospital under the plan to get healthcare.
  • At the hospital, the HMO ID is presented as a means of verification to receive healthcare without paying.
", "stability_percentage": 100, "provider": { "id": "04e7e852-0c80-4c62-8a24-c5f4a5e5c6d6", "organization_name": "Bastion" }, "country": { "id": "758d3834-5488-4603-bc41-4f542dd3de87", "name": "Nigeria" }, "currency": { "id": "29dbe1da-218d-4b9d-bd43-8870055471a7", "name": "Nigerian Naira" }, "category": { "id": "9d78bc79-3fa8-447d-b688-e42c1c6838a0", "name": "Health" } }, // ... ] } } ``` :: ### Get One Product Details by ID :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/products/:productId"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Products fetched successfully", "data": { "id": "d4751c39-8500-4238-881a-fb05b8f18cd4", "name": "MediSure", "prefix": "bastion", "route_name": "bastion-medisure", "is_renewable": true, "is_claimable": false, "is_inspectable": false, "is_certificateable": false, "prevent_duplicate_purchase": true, "is_multi_sharing_formula": false, "base_price": "10000.0000", "cover_period": "30", "is_active": true, "category_id": "9d78bc79-3fa8-447d-b688-e42c1c6838a0", "provider_id": "04e7e852-0c80-4c62-8a24-c5f4a5e5c6d6", "stability_percentage": 100, "country_id": "bb67ae67-53d1-4810-be05-33043115399c", "currency_id": "6b3147f9-aa5b-4fd9-934d-ee5a179db989", "created_at": "2025-07-31T17:38:40.991Z", "updated_at": "2025-10-14T12:38:07.428Z", "provider": { "id": "04e7e852-0c80-4c62-8a24-c5f4a5e5c6d6", "organization_name": "Bastion" }, "country": { "id": "bb67ae67-53d1-4810-be05-33043115399c", "name": "Nigeria" }, "currency": { "id": "6b3147f9-aa5b-4fd9-934d-ee5a179db989", "name": "Nigerian Naira" }, "category": { "id": "9d78bc79-3fa8-447d-b688-e42c1c6838a0", "name": "Health" } } } ``` :: ## Fetch All Product Categories :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/products/categories"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Product categories fetched successfully", "data": [ { "id": "14fb5968-48d2-49ac-88a8-0ee40e01fcca", "name": "Package", "created_at": "2021-09-03T14:59:35.475Z", "product_count": "4", "provider_count": "1" }, { "id": "1e87194d-5eb1-48b6-8837-a9cbc78d4ec3", "name": "Gadget", "created_at": "2021-09-03T14:59:35.392Z", "product_count": "3", "provider_count": "2" }, // ... ] } ``` :: # Policies ## View Policies Use the following endpoint to list all the policies on your integration. ### Fetch All Policies Under Your Business :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/policies"} #### Query Parameters :contents-query-params-table{variant="policies"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Policies fetched successfully", "data": { "total_result": 86, "policies": [ { "id": "9cdf65f6-f982-4f8c-a17a-923bfa20b05f", "app_mode": "test", "first_name": "Dekunle", "last_name": "Gold", "email": "dekunlegold@yopmail.com", "phone_number": "2349081408793", "date_of_birth": "1999-01-20T16:31:00.000Z", "activation_date": "2025-10-28T16:32:55.053Z", "start_date": "2025-10-28T16:32:55.053Z", "expiration_date": "2026-10-28T00:00:00.000Z", "amount": "60000.0000", "is_active": true, "is_submitted_to_provider": true, "customer_id": "8afbc691-0ad8-4a07-af22-3a99df457c3b", "insured_id": "edd1a9a4-6396-40ea-b8da-13bc333c7195", "insured_policy_relationship": "covered_person", "insured_type": "dependant", "distributor_id": "dff30873-0ac9-49ff-b05a-ef4901734a2c", "provider_id": "f029cc0c-9eb8-41b3-82b1-a9cc26fde03f", "product_id": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", "product_category_id": "1e87194d-5eb1-48b6-8837-a9cbc78d4ec3", "country_id": "bb67ae67-53d1-4810-be05-33043115399c", "currency_id": "6b3147f9-aa5b-4fd9-934d-ee5a179db989", "purchase_id": "c081655f-a863-4db7-ab23-fc453af8479c", "policy_number": "ACC/AR/10/2025/HQ/5800", "certificate_url": "https://ss.mycover.ai/#QVCgODCCQe", "meta": { "policy_number": "ACC/AR/10/2025/HQ/5800" }, "created_at": "2025-10-28T16:32:55.054Z", "updated_at": "2025-10-28T16:32:58.420Z", "provider": { "id": "f029cc0c-9eb8-41b3-82b1-a9cc26fde03f", "organization_name": "Sovereign Trust" }, "distributor": { "id": "dff30873-0ac9-49ff-b05a-ef4901734a2c", "organization_name": "ebuttemetta ogechi doinz" }, "product": { "id": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", "name": "Gadget Cover", } } ] } ``` :: ### Get One Policy Details by ID :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/policies/:policyId"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Policy retrieved successfully", "data": { "id": "9cdf65f6-f982-4f8c-a17a-923bfa20b05f", "app_mode": "test", "first_name": "Dekunle", "last_name": "Gold", "email": "dekunlegold@yopmail.com", "phone_number": "2349081408793", "date_of_birth": "1999-01-20T16:31:00.000Z", "activation_date": "2025-10-28T16:32:55.053Z", "start_date": "2025-10-28T16:32:55.053Z", "expiration_date": "2026-10-28T00:00:00.000Z", "amount": "60000.0000", "is_active": true, "is_submitted_to_provider": true, "customer_id": "8afbc691-0ad8-4a07-af22-3a99df457c3b", "insured_id": "edd1a9a4-6396-40ea-b8da-13bc333c7195", "insured_policy_relationship": "covered_person", "insured_type": "dependant", "distributor_id": "dff30873-0ac9-49ff-b05a-ef4901734a2c", "provider_id": "f029cc0c-9eb8-41b3-82b1-a9cc26fde03f", "product_id": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", "product_category_id": "1e87194d-5eb1-48b6-8837-a9cbc78d4ec3", "country_id": "bb67ae67-53d1-4810-be05-33043115399c", "currency_id": "6b3147f9-aa5b-4fd9-934d-ee5a179db989", "purchase_id": "c081655f-a863-4db7-ab23-fc453af8479c", "policy_number": "ACC/AR/10/2025/HQ/5800", "certificate_url": "https://ss.mycover.ai/#QVCgODCCQe", "meta": { "policy_number": "ACC/AR/10/2025/HQ/5800" }, "created_at": "2025-10-28T16:32:55.054Z", "updated_at": "2025-10-28T16:32:58.420Z", "provider": { "id": "f029cc0c-9eb8-41b3-82b1-a9cc26fde03f", "organization_name": "Sovereign Trust" }, "distributor": { "id": "dff30873-0ac9-49ff-b05a-ef4901734a2c", "organization_name": "ebuttemetta ogechi doinz" }, "product": { "id": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", "name": "Gadget Cover", } } ``` :: # Claims This means, with our responsive Claims Tracking API, no manual process is involved while you seamlessly track and monitor the claim status between customers and providers. Our status endpoint enables our server to respond with the claim details and status of the specified claim reference. ## View Claims See a list of all the claims made by your customers and your providers’ response on your integration. :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/claims"} #### Query Parameters :contents-query-params-table{variant="claims"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Claims retrieved successfully", "data": { "total_result": 86, "claims": [ { "id": "9cdf65f6-f982-4f8c-a17a-923bfa20b05f", } ] } } ``` :: ### Get One Claim Details by ID :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/claims/:claimId"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Claim retrieved successfully", "data": { "claim":{ "id": "9cdf65f6-f982-4f8c-a17a-923bfa20b05f", } } ``` :: # Customers ## Get All Customers Fetch a list of all your customers :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/customers"} ### Query Parameters :contents-query-params-table{variant="customers-all"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Customers fetched successfully", "data": { "total_result": 4, "total_count": 4, "customers": [ { "id": "5e2bd0d5-5a5e-4933-a3a4-8eb165ff2d2e", "first_name": "Taiwo", "last_name": "Suleman", "email": "tauselefagri-5613@yopmail.com", "phone_number": "2349132326212", "gender": "Male", "date_of_birth": "1990-04-05", "home_address": "Lekki Phase 1", "state_of_residence": "Lagos", "is_active": true, "is_returning_customer": true, "profile": "customer", "customer_code": "CUS-26088", "role": "user", "app_mode": "test", "country_id": "bb67ae67-53d1-4810-be05-33043115399c", "created_at": "2025-10-06T12:59:21.377Z", "updated_at": "2025-10-08T09:40:15.128Z", }, ] } } ``` :: ### Get One Customer Details by ID :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/customers/:customerId"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Customers fetched successfully", "data": { "id": "5e2bd0d5-5a5e-4933-a3a4-8eb165ff2d2e", "first_name": "Taiwo", "last_name": "Suleman", "email": "tauselefagri-5613@yopmail.com", "phone_number": "2349132326212", "gender": "Male", "date_of_birth": "1990-04-05", "home_address": "Lekki Phase 1", "state_of_residence": "Lagos", "is_active": true, "is_returning_customer": true, "profile": "customer", "customer_code": "CUS-26088", "role": "user", "app_mode": "test", "country_id": "bb67ae67-53d1-4810-be05-33043115399c", "created_at": "2025-10-06T12:59:21.377Z", "updated_at": "2025-10-08T09:40:15.128Z", } } ``` :: ## View Customer's Purchase History See customer’s purchase details, dates and transaction info :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/customers/:customerId/purchases"} :contents-query-params-table{variant="customers-purchases"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Customer purchase fetched successfully", "data": { "total_count": 14, "purchases": [ { "id": "8f20581f-092b-4746-b02b-62d76520ed56", "created_at": "2025-10-27T09:55:41.173Z", "amount": "930.0000", "product": { "name": "MediSure", "category": { "name": "Health" } }, "provider": { "organization_name": "Bastion" }, "customer": { "first_name": "Taiwo", "last_name": "Suleman", "email": "tauselefagri-5613@yopmail.com", "id": "5e2bd0d5-5a5e-4933-a3a4-8eb165ff2d2e" } } ] } } ``` :: ## View Customer's Policy History See customer’s policy details, dates and transaction info :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/customers/:customerId/policies"} :contents-query-params-table{variant="customers-policies"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Customer policies fetched successfully", "data": { "total_result": 14, "policies": [ { "id": "d314077d-5f0b-42a3-ad95-ec40ee6faabb", "app_mode": "test", "is_as_service": false, "first_name": "Taiwo", "last_name": "Suleman", "email": "tauselefagri-5613@yopmail.com", "phone_number": "2349132326212", "date_of_birth": "1990-04-05T00:00:00.000Z", "activation_date": "2025-10-28T00:00:00.000Z", "start_date": "2025-10-27T09:55:41.193Z", "expiration_date": "2025-11-26T00:00:00.000Z", "amount": "930.0000", "is_active": true, "is_submitted_to_provider": true, "customer_id": "5e2bd0d5-5a5e-4933-a3a4-8eb165ff2d2e", "insured_id": "832054c7-f9ee-4546-96f0-90a08a82de77", "insured_policy_relationship": "policy_holder", "insured_type": "primary_insured", "distributor_id": "9ea1fa8f-a6b7-4501-a26c-7acaae846212", "provider_id": "04e7e852-0c80-4c62-8a24-c5f4a5e5c6d6", "product_id": "d4751c39-8500-4238-881a-fb05b8f18cd4", "product_category_id": "9d78bc79-3fa8-447d-b688-e42c1c6838a0", "country_id": "bb67ae67-53d1-4810-be05-33043115399c", "currency_id": "29dbe1da-218d-4b9d-bd43-8870055471a7", "purchase_id": "8f20581f-092b-4746-b02b-62d76520ed56", "policy_number": "100012398", "certificate_url": "https://s3.eu-west-2.amazonaws.com/staging.mycover.ai/6bb3420a-33b4-49dc-a877-c09e07c502bf-Taiwo", "created_at": "2025-10-27T09:55:41.194Z", "updated_at": "2025-10-27T09:55:44.962Z", "policy_holder": { "first_name": "Taiwo", "last_name": "Suleman" }, "insured": { "first_name": "Taiwo", "last_name": "Suleman" }, "product": { "name": "MediSure", "category": { "name": "Health" } } } ] } } ``` :: # Sales View a list of all the transactions you’ve done on your integration. This endpoint describes how to view customer purchases and renewals. You can also query specific transactions using the appropriate reference. ## View Purchases and Renewals See a list of all the purchases and renewals made by your customers. :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/purchases"} #### Query Parameters :contents-query-params-table{variant="sales"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Purchases fetched successfully", "data": { "total_result": 125, "total_count": 125, "purchases": [ { "id": "50d4ef41-ba21-4309-8b09-8eff0d13886f", "app_mode": "test", "is_renewal": false, "amount": "50000.0000", "customer_id": "70b33e7f-bbb4-42c2-ad92-29c20ee0e9ab", "distributor_id": "5a32b459-8c3b-46bc-b699-0c5902824b1b", "payment_channel": "none", "payment_option": "wallet", "policy_id": "507d32df-4b25-462b-ac5a-d26d63468e67", "product_category_id": "978ced0d-0e05-4de6-b43a-b408c0e8b95e", "product_id": "0ced01f3-7698-4101-a244-dd5d70e974c4", "provider_id": "f029cc0c-9eb8-41b3-82b1-a9cc26fde03f", "country_id": "bb67ae67-53d1-4810-be05-33043115399c", "currency_id": "6b3147f9-aa5b-4fd9-934d-ee5a179db989", "created_at": "2025-10-30T22:55:55.293Z", "updated_at": "2025-10-30T22:55:55.387Z", "customer": { "first_name": "Ogonnawwwww", "last_name": "Geeddsss", "email": "geeddsss@yopmail.com", "phone_number": "2348091222123", "gender": "Male" }, "policy": { "policy_number": "PAC/PP/10/2025/AC/6167" }, "provider": { "organization_name": "Sovereign Trust" }, "distributor": { "organization_name": "suramogaji enterprise" }, "product": { "name": "Mini Comprehensive" } }, // ... ] } } ``` :: ### Get One Purchase or Renewal Details by ID :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/purchases/:id"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Purchase retrieved successfully", "data": { "id": "50d4ef41-ba21-4309-8b09-8eff0d13886f", "app_mode": "test", "is_renewal": false, "amount": "50000.0000", "customer_id": "70b33e7f-bbb4-42c2-ad92-29c20ee0e9ab", "distributor_id": "5a32b459-8c3b-46bc-b699-0c5902824b1b", "payment_channel": "none", "payment_option": "wallet", "policy_id": "507d32df-4b25-462b-ac5a-d26d63468e67", "product_category_id": "978ced0d-0e05-4de6-b43a-b408c0e8b95e", "product_id": "0ced01f3-7698-4101-a244-dd5d70e974c4", "provider_id": "f029cc0c-9eb8-41b3-82b1-a9cc26fde03f", "country_id": "bb67ae67-53d1-4810-be05-33043115399c", "currency_id": "6b3147f9-aa5b-4fd9-934d-ee5a179db989", "created_at": "2025-10-30T22:55:55.293Z", "updated_at": "2025-10-30T22:55:55.387Z", "customer": { "id": "70b33e7f-bbb4-42c2-ad92-29c20ee0e9ab", "first_name": "Ogonnawwwww", "last_name": "Geeddsss", "email": "geeddsss@yopmail.com", "phone_number": "2348091222123", "gender": "Male", }, "policy": { "id": "507d32df-4b25-462b-ac5a-d26d63468e67", "app_mode": "test", "is_as_service": false, "first_name": "Abdullahi", "last_name": "Jerry", "email": "geeddsss@yopmail.com", "phone_number": "2348068988777", "date_of_birth": "2007-01-01T22:54:00.000Z", "activation_date": "2025-10-30T22:55:55.381Z", "start_date": "2025-10-30T22:55:55.380Z", "expiration_date": "2026-10-30T00:00:00.000Z", "amount": "50000.0000", "is_active": true, "is_submitted_to_provider": true, "customer_id": "70b33e7f-bbb4-42c2-ad92-29c20ee0e9ab", "insured_id": "2e6a15aa-0ab4-4511-8841-488748032d11", "insured_policy_relationship": "policy_holder", "insured_type": "primary_insured", "distributor_id": "5a32b459-8c3b-46bc-b699-0c5902824b1b", "provider_id": "f029cc0c-9eb8-41b3-82b1-a9cc26fde03f", "product_id": "0ced01f3-7698-4101-a244-dd5d70e974c4", "product_category_id": "978ced0d-0e05-4de6-b43a-b408c0e8b95e", "country_id": "bb67ae67-53d1-4810-be05-33043115399c", "currency_id": "6b3147f9-aa5b-4fd9-934d-ee5a179db989", "purchase_id": "50d4ef41-ba21-4309-8b09-8eff0d13886f", "policy_number": "PAC/PP/10/2025/AC/6167", "certificate_url": "https://ss.mycover.ai/#pQFKxrGJpB", "created_at": "2025-10-30T22:55:55.381Z", "updated_at": "2025-10-30T22:55:58.269Z", }, "provider": { "organization_name": "Sovereign Trust" }, "distributor": { "organization_name": "suramogaji enterprise" }, "product": { "name": "Mini Comprehensive", "category": { "name": "Auto" } } } } ``` :: # Auxiliary ## File Upload Use this endpoint to upload a file > This is an authenticated endpoint. ::ui-endpoint --- auth: true method: POST url: https://v2.api.mycover.ai/v2/utilities/files/upload --- :: #### Query Parameters :contents-query-params-table{variant="auxiliary"} #### Response ::code-collapse ```json [201 Created] { "responseCode": 1, "responseText": "File upload successful", "data": { "upload_id": "03a6d0d5-7a7a-4cbe-a26d-89f53558492a" // UUID of the uploaded file } } ``` :: ## Get Genders Use this endpoint to get genders :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/utilities/genders"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Genders retrieved", "data": { "genders": [ "Male", "Female" ] } } ``` :: ## Get States Use this endpoint to get states and LGAs in Nigeria > This is an authenticated endpoint. #### Response ::ui-endpoint --- auth: true method: GET url: https://v2.api.mycover.ai/v2/products/utility/e55de863-7d98-4236-bd61-40328cd7f7fc --- :: ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Product utility fetched successfully", "data": [ { "label": "Abia", "value": "Abia" }, { "label": "Adamawa", "value": "Adamawa" }, { "label": "Akwa Ibom", "value": "Akwa Ibom" }, { "label": "Anambra", "value": "Anambra" }, { "label": "Bauchi", "value": "Bauchi" }, { "label": "Bayelsa", "value": "Bayelsa" }, // ... ] } ``` :: ## Get Vehicle Make List Use this endpoint to get vehicle make list > This is an authenticated endpoint. #### Response ::ui-endpoint --- auth: true method: GET url: https://v2.api.mycover.ai/v2/products/utility/fa2fb85f-9d1a-4652-a136-9da8e4c57c5c --- :: ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Product utility fetched successfully", "data": [ { "label": "Acura", "value": "Acura" }, { "label": "Alfa Romeo", "value": "Alfa Romeo" }, { "label": "Audi", "value": "Audi" }, // ... ] } ``` :: ## Get Vehicle Model List Use this endpoint to get vehicle model list > This is an authenticated endpoint. #### Response ::ui-endpoint --- auth: true method: GET url: https://v2.api.mycover.ai/v2/products/utility/86db5030-df01-4e2d-821b-e43e017f7e67?query=Toyota --- :: ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Product utility fetched successfully", "data": [ { "label": "Camry", "value": "Camry" }, { "label": "Corolla", "value": "Corolla" }, { "label": "Highlander", "value": "Highlander" }, // ... ] } ``` :: # Preliminary To receive these webhooks, you will need a `POST` endpoint on your server that can be called by our system to send you webhooks. ## Setting Up Webhooks To enable webhooks, please follow the steps below: ### Step 1 [Log in :icon{name="i-lucide-external-link"}](http://distributor.mycover.ai){:target="_blank" rel=""nofollow""} to your Distributor dashboard. Then, click on the settings icon to navigate to the settings page. ![MyCover.Ai Documentation](https://docs.mycover.ai/api-key-dis-dash-1.webp) ### Step 2 At the bottom, you will find the webhook section. Click on the toggle to enable webhooks. ![MyCover.Ai Documentation](https://docs.mycover.ai/webhook-1.webp) ### Step 3 Once webhooks are enabled, a form will appear where you can enter your webhook URL. This URL is the endpoint on your server that will receive the webhook notifications from our system. After entering the URL, click on the "Save" button to save your webhook URL. ::note You can enter multiple URLs separated by `|` . E.g `https://example.com/webhook|https://example.com/webhook2` . Each will receive a copy of every webhook. :: ![MyCover.Ai Documentation](https://docs.mycover.ai/webhook-url.webp) ## Validation You can effortlessly verify webhooks received from the MyCover.ai platform by following these steps: Signature Inclusion: Every sent webhook includes a signature in the headers called `x-mycoverai-signature`. This signature is the encrypted webhook data using the merchant's (i.e Distributor) private secret API key. ::note Your secret API Key is located at Settings > Api Key & Web hooks. It is usually annotated with "MCASECK". :: Validation on Merchant's End: Merchants can follow the same encryption steps using their secret API key. Then, they can compare the created signature with the one they received. If the signatures are the same, it's safe to go ahead and use the webhook information. However, if the signatures don't match, they should ignore the webhook and not use the information it carries. ::code-group ```js [Node.js] const crypto = require("crypto"); const secretKey = 'MCASECK|'; const signature = crypto .createHmac("sha512", secretKey) .update(JSON.stringify(req.body)) .digest("hex"); if (req.headers['x-mycoverai-signature'] === signature) { const event = req.body; // Do something with event - that will not take long // Return Ok res.send(200); } ``` ```python [Python] import json import hashlib import hmac secret_key = 'MCASECK|' json_payload = json.dumps(req_body, separators=(',', ':')) secret_key_bytes = secret_key.encode() hmac_obj = hmac.new(secret_key_bytes, digestmod=hashlib.sha512) hmac_obj.update(json_payload.encode()) signature = hmac_obj.hexdigest() if req.headers.get('x-mycoverai-signature') == signature: print('Do something with req_body') # Return Ok ``` :: ## Retry Logic Webhook delivery is retried automatically on failure. We consider a delivery failed if your endpoint returns a non-2xx HTTP status or does not respond within 60 seconds. We retry up to 10 additional times using exponential backoff: | Attempt | Delay | Cumulative time elapsed | | ------- | ----------- | ---------------------------- | | 1 | 30 seconds | 30 seconds | | 2 | 1 minute | 1 minute 30 seconds | | 3 | 2 minutes | 3 minutes 30 seconds | | 4 | 4 minutes | 7 minutes 30 seconds | | 5 | 8 minutes | 15 minutes 30 seconds | | 6 | 16 minutes | 31 minutes 30 seconds | | 7 | 32 minutes | 63 minutes 30 seconds | | 8 | 64 minutes | 2 hours 7 minutes 30 seconds | | 9 | \~2.1 hours | \~4 hours 13 minutes | | 10 | \~4.3 hours | \~8 hours 31 minutes | ## Idempotency Because webhooks can be retried up to 10 times, your endpoint may receive the same event more than once. This can happen not just from retries, but also from transient network issues or rare cases where your server processes a request but fails to return a response in time. Design your endpoint to be idempotent so that processing the same event multiple times produces the same result as processing it once. ### Using the event ID Every webhook payload includes a unique `event_id` field. Use it to deduplicate incoming events: 1. When an event arrives, check your data store for the `event_id`. 2. If it already exists, return a `200 OK` and discard the payload. 3. If it is new, process the event and persist the `event_id` before returning `200 OK`. ```js { "event_id": "C6HdCeTS_7L6GOmlIS1kD", "event": "purchase.successful", "status": "processed", "data": { ... } } ``` ## Webhook Payload Structure Every webhook we send shares a common envelope structure, regardless of the event type. Understanding this structure lets you write a single parsing layer that handles all webhook events consistently. ```typescript interface IWebhookPayload { event_id: string; event: string; status: "processed" | "failed"; data: IWebhookData; } ``` ### Top-level payload | Field | Type | Description | | ---------- | ------------------------ | ----------------------------------------------------------------------------- | | `event_id` | `string` | Unique identifier for this event. Use this to deduplicate retried deliveries. | | `event` | `string` | The event type that triggered this webhook, e.g. `purchase.successful`. | | `status` | `"processed" | "failed"` | Whether the operation completed successfully or encountered an error. | | `data` | `IWebhookData` | The event payload. See below. | ### Data object ```typescript interface IWebhookData { essential: { [key: string]: any }; created_at: string; updated_at: string; meta?: { [key: string]: any }; sdk?: { [key: string]: any }; } ``` | Field | Type | Description | | ------------ | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `essential` | `object` | Core fields guaranteed to be present for this event type - customer details, policy identifiers, amounts, and so on. The specific keys vary by event. | | `created_at` | `string` | ISO 8601 timestamp of when the resource was created. | | `updated_at` | `string` | ISO 8601 timestamp of when the resource was last updated. | | `meta` | `object` *(optional)* | Additional context about the resource, such as policy limits or supplementary identifiers. Present on most events but not guaranteed. | | `sdk` | `object` *(optional)* | Data relevant to SDK-initiated flows, including configurations and any generated links (e.g. claim or inspection URLs). Used to initialize MCA SDK with a specific action. Present on most events but not guaranteed. | ### Example payload Here is a full example for a purchase.successful event: ```js { "event_id": "C6HdCeTS_7L6GOmlIS1kD", "event": "purchase.successful", "status": "processed", "data": { "essential": { "first_name": "Jimmy", "last_name": "Kardi", "email": "cafafroucroti-7682@yopmail.com", "phone_number": "2349102345678", "customer_id": "908d7572-726c-4467-a613-2d3a1478c17d", "policy_id": "26f6dd66-c300-4314-8c81-b0dfe4f6e3fe", "policy_number": "TESTACC/AR/05/2026/HQ/2430", "product_id": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", "amount": "25000.0000", "expiration_date": "2027-05-21T00:00:00.000Z" }, "meta": { "sum_insured": 500000, "policy_number": "TESTACC/AR/05/2026/HQ/2439" }, "sdk": { "config": { "pk": "YOUR_PUBLIC_KEY", "pid": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", ... }, "claim_link": "https://...", "inspection_link": "https://..." }, "created_at": "2026-05-21T21:49:06.551Z", "updated_at": "2026-05-21T21:49:11.843Z" } } ``` # Events Events are how we notify your application when something happens in your integration. Each time a significant action occurs like a policy is purchased, a claim is submitted, or a payment is processed, we generate an event object and deliver it to your configured webhook endpoint. Understanding events is central to building a reliable integration. Rather than polling our API for changes, you can listen for events and react to them in real time. ::note Always remember to use the `event_id` to deduplicate incoming events. :: ## Event types Every event has an `event` field that identifies what happened. Event types follow a `resource.action` naming pattern. For example, `purchase.successful` or `claim.submitted`. This makes it easy to filter and route events in your handler. We group events by the resource they relate to. Each group is documented below with its available event types, the fields you can expect in `data.essential`, and a sample payload. ### Purchase and renewal This event is triggered when a policy is purchased or renewed. ::code-group ```json [purchase.successful] { "data": { "meta": { "sum_insured": 500000, "policy_number": "TESTACC/AR/05/2026/HQ/7520" }, "essential": { "email": "cafafroucroti-7682@yopmail.com", "amount": "25000.0000", "last_name": "Kardi", "policy_id": "0cc16073-f566-4749-adf8-0e0d980089a6", "first_name": "Jimmy", "product_id": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", "customer_id": "908d7572-726c-4467-a613-2d3a1478c17d", "policy_number": "TESTACC/AR/05/2026/HQ/7520", "expiration_date": "2027-05-22T00:00:00.000Z" }, "sdk": { "config": { "pk": "YOUR_PUBLIC_KEY", "pid": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", "email": "cafafroucroti-7682@yopmail.com", "phone": "2349102345678", "action": "claim", "progress": "submission", "policy_id": "0cc16073-f566-4749-adf8-0e0d980089a6", "business_id": "f19b711c-ce4b-4b10-9af7-6ebb84ea5d07", "claim_type": "Gadget", "customer_id": "908d7572-726c-4467-a613-2d3a1478c17d", "first_name": "Jimmy", "currency_code": "NGN", "policy_number": "TESTACC/AR/05/2026/HQ/7520" }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQk...", "inspection_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQk..." }, "created_at": "2026-05-22T14:23:57.419Z", "updated_at": "2026-05-22T14:24:01.815Z" }, "event": "purchase.successful", "status": "processed", "event_id": "l6w0iT2yGXfQsOJCe8ipa" } ``` ```json [purchase.renewed] { "data": { "meta": { "sum_insured": 500000, "policy_number": "TESTACC/AR/05/2026/HQ/7520" }, "essential": { "email": "cafafroucroti-7682@yopmail.com", "amount": "50000.0000", "last_name": "Kardi", "policy_id": "0cc16073-f566-4749-adf8-0e0d980089a6", "first_name": "Jimmy", "product_id": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", "customer_id": "908d7572-726c-4467-a613-2d3a1478c17d", "policy_number": "TESTACC/AR/05/2026/HQ/7520", "expiration_date": "2028-05-21T00:00:00.000Z" }, "sdk": { "config": { ... "action": "claim", "progress": "submission", ... }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQk...", "inspection_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQk..." }, "created_at": "2026-05-22T14:23:57.419Z", "updated_at": "2026-05-22T14:52:41.598Z" }, "event": "purchase.renewed", "status": "processed", "event_id": "OCiaG6J3nVpz6g6zAKmM1" } ``` :: ### Policy update This event is triggered whenever a policy's details or status are updated. Common scenarios include: - **Certificate/HMO document generation**: The official policy certificate/HMO document URL is generated or regenerated. This updates the `certificate_url` field in the `essential` object. - **Policy details**: The policy details are updated like `first_name`, `last_name`, `email`, `phone`, `product_id`, `customer_id`, `policy_number`, `expiration_date`. This updates the `essential` object. ::code-group ```json [policy.updated] { "data": { "meta": { "sum_insured": 500000, "policy_number": "TESTACC/AR/05/2026/HQ/0388" }, "essential": { "email": "cafafroucroti-7682@yopmail.com", "amount": "25000.0000", "last_name": "Kardi", "policy_id": "f6685b51-965c-4f10-a180-dcc107aaf747", "first_name": "Jimmy", "product_id": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", "customer_id": "908d7572-726c-4467-a613-2d3a1478c17d", "policy_number": "TESTACC/AR/05/2026/HQ/0388", "certificate_url": "https://s3.eu-west-2.amazonaws.com...pdf", "expiration_date": "2027-05-22T00:00:00.000Z" }, "sdk": { "config": { ... "action": "claim", "progress": "submission", ... }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQktfVEV..." }, "created_at": "2026-05-22T16:06:37.911Z", "updated_at": "2026-05-22T16:06:42.597Z" }, "event": "policy.updated", "status": "processed", "event_id": "fkc9J8OI_J1q4QMT9PrOV" } ``` :: ### Claims These events are triggered when a claim is created, updated, or moves through the processing pipeline. #### Event Types and Triggers | Event | Description | | :--------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `claim.submitted` | Triggered when a new claim is successfully submitted by a customer. | | `claim.approved` | Triggered when the claim is approved by the Provider or Insurer. | | `claim.disapproved` | Triggered when the claim is disapproved. A `comment` field is included in the payload explaining the reason. | | `claim.offer_sent` | Triggered when a claim/settlement offer is generated and sent to the customer. | | `claim.offer_rejected` | Triggered when the customer rejects the claim offer. A `comment` field is included with the reason. | | `claim.updated` | Triggered during intermediate processing updates. Key triggers include: :br • **Document submission**: The customer uploads a required document (e.g., travel tickets or receipts). :br • **Inspection completion**: The customer completes a post-loss inspection. :br • **Additional information requested**: The provider requests extra details or documents. :br • **Additional information submitted**: The customer responds to the information request. :br • **Repair estimation**: An estimated cost of repair is submitted. :br • **Offer acceptance**: The customer accepts the settlement offer. :br • **Payout/Settlement**: The payout is processed, and the claim is fully settled. | #### Key Payload Properties Use these properties to track the real-time status and type of a claim as it progresses: | Property Path | Description | Possible Values | | :-------------------------- | :-------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **`data.essential.status`** | Represents the high-level operational state of the claim. | `Pending`, `Inspection submitted`, `Third party inspection submitted`, `Documented`, `Approved`, `Declined`, `Requested additional information`, `Submitted additional information`, `Repair estimate submitted`, `Offer sent`, `Offer accepted`, `Offer rejected`, `Paid` | | **`data.essential.type`** | Indicates the category of the insurance claim. | `Vehicle`, `Gadget`, `Credit life`, `Travel`, `Life`, `Content` | | **`data.meta.progress`** | Tracks the step-by-step workflow milestone of the claim. | `submission`, `inspection`, `documentation`, `additional_info`, `third_party_inspection`, `technician_repair_estimate`, `repair_estimate`, `offer`, `status` | ::code-group ```json [claim.submitted] { "data": { "meta": { "damages": [ { "damage_area": "Front", "damage_part": "Bumper", "far_range_url": "https://s3.eu-west-2.amazonaws.com...jpg", "close_range_url": "https://s3.eu-west-2.amazonaws.com...jpg" } ], "progress": "submission", "loss_type": "Collision", "policy_id": "373af503-4b1e-4c5d-98b8-1e3cbec0f04a", "claim_type": "Vehicle", "public_key": "595960b8-e4a2-4f05-b2f7-a6307e9f462a", "business_id": "92e39bc5-6110-4dcb-8583-bc50c2e6922b", "currency_id": "6b3147f9-aa5b-4fd9-934d-ee5a179db989", "incident_date": "2026-05-07", "incident_time": "10:49", "incident_type": "Accidental damage", "driver_license": "ABC12345DE6", "is_third_party": true, "status_time_line": [ { "name": "Pending", "time_stamp": "Thu, May 7, 2026, 10:53 AM" } ], "incident_location": "lokoja", "driver_license_url": "https://s3.eu-west-2.amazonaws.com...jpg", "no_of_damage_parts": 1, "has_third_party_info": false, "incident_best_explain": "Collision", "third_party_loss_type": [ "Third party bodily injury" ] }, "essential": { "type": "Vehicle", "status": "Pending", "policy_id": "21dd7902-3448-4f96-ab10-81652d534a13", "product_id": "24140c74-fc6f-42f5-a0d2-24800b22d80a", "customer_id": "ae9e9db8-80cd-4469-be31-aa2cb8198ec9", "incident_date": "2026-03-06", "claimant_email": "mailer@mail.com", "additional_info": null, "claimant_last_name": "Jimmy", "claimant_first_name": "Kenneth", "description": "This pertains to harm on a vehicle's physical components, such as dents..." }, "sdk": { "config": { "pk": "YOUR_PUBLIC_KEY", "pid": "24140c74-fc6f-42f5-a0d2-24800b22d80a", "email": "mailer@mail.com", "phone": "2347064378577", "action": "claim", "progress": "inspection", "policy_id": "21dd7902-3448-4f96-ab10-81652d534a13", "business_id": "f19b711c-ce4b-4b10-9af7-6ebb84ea5d07", "claim_type": "Vehicle", "customer_id": "ae9e9db8-80cd-4469-be31-aa2cb8198ec9", "first_name": "Arthur", "currency_code": "NGN", "policy_number": "110105102401479" }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQktfV..." }, "created_at": "2024-08-29T19:50:22.357Z", "updated_at": "2025-12-31T13:29:39.176Z" }, "event": "claim.submitted", "status": "processed", "event_id": "SeCOzLVdJ6MG8gvQH_eQd" } ``` ```json [claim.approved] { "data": { "meta": { "date": "2024-08-20", "time": "10:10", "address": "Creek road nembe", "interior": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": "interior" }, "back_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "dashboard": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": "dashboard" }, "left_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "loss_type": [ "Collision" ], "timestamp": "2024-08-29T20:04:18.994Z", "video_url": "https://s3.eu-west-2.amazonaws.com-blob", "front_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "right_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "geolocation": "Alimosho, Lagos State, 100314, Nigeria", "account_name": "chigozie sunday ezenwa", "incident_type": "Accidental damage", "account_number": "0062746853", "chassis_number": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": "chassis_number" }, "is_third_party": false, "payment_method": "bank transfer", "status_time_line": [ { "name": "Pending", "time_stamp": "Aug 29, 2024 9:05 PM" }, { "name": "Inspection submitted", "time_stamp": "Aug 29, 2024 9:06 PM" }, { "name": "Reviewing", "time_stamp": "Aug 29, 2024 9:07 PM" }, { "name": "Approved", "time_stamp": "Aug 29, 2024 9:07 PM" } ], "inspection_device_type": "Android" }, "essential": { "type": "Vehicle", "status": "Approved", "policy_id": "21dd7902-3448-4f96-ab10-81652d534a13", "product_id": "24140c74-fc6f-42f5-a0d2-24800b22d80a", "customer_id": "ae9e9db8-80cd-4469-be31-aa2cb8198ec9", "description": "Tell us how the incident happened ", "incident_date": "2024-08-20", "claimant_email": "mailer@mail.com", "additional_info": [ { "id": "3b9c1c63-05ce-4047-bd67-804f9c80ef46", "type": "text", "label": "Bumper", "profile": "mca_admin", "data_or_url": "", "description": "mqasmxs" } ], "claimant_last_name": "Golden", "claimant_first_name": "Arthur" }, "sdk": { "config": { ... "action": "claim", "progress": "repair_estimate", "claim_type": "Vehicle" ... }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQktfV..." }, "created_at": "2024-08-29T19:50:22.357Z", "updated_at": "2025-12-31T13:29:39.176Z" }, "event": "claim.approved", "status": "processed", "event_id": "tPtKJn1H-vG-WGBYzzKcT" } ``` ```json [claim.disapproved] { "data": { "meta": { "date": "2024-08-20", "time": "10:10", "address": "Creek road nembe", "interior": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "back_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "bank_code": "232", "bank_name": "Sterling Bank", "dashboard": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "left_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "loss_type": [ "Collision" ], "timestamp": "2024-08-29T20:04:18.994Z", "video_url": "https://s3.eu-west-2.amazonaws.com-blob", "front_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "right_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "geolocation": "Alimosho, Lagos State, 100314, Nigeria", "account_name": "chigozie sunday ezenwa", "incident_type": "Accidental damage", "account_number": "0062746853", "chassis_number": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "is_third_party": false, "status_time_line": [ { "name": "Pending", "time_stamp": "Aug 29, 2024 9:05 PM" }, { "name": "Inspection submitted", "time_stamp": "Aug 29, 2024 9:06 PM" }, { "name": "Reviewing", "time_stamp": "Aug 29, 2024 9:07 PM" }, { "name": "Declined", "time_stamp": "Wed, Mar 25, 2026, 3:37 PM" } ], "inspection_device_type": "Android", "is_third_party_insured": false }, "essential": { "comment": "This is the reason for the rejection...", "type": "Vehicle", "status": "Declined", "policy_id": "21dd7902-3448-4f96-ab10-81652d534a13", "product_id": "24140c74-fc6f-42f5-a0d2-24800b22d80a", "customer_id": "ae9e9db8-80cd-4469-be31-aa2cb8198ec9", "description": "Tell us how the incident happened ", "incident_date": "2024-08-20", "claimant_email": "mailer@mail.com", "additional_info": null, "claimant_last_name": "Golden", "claimant_first_name": "Arthur" }, "sdk": { "config": { ... "action": "claim", "progress": "inspection", "claim_type": "Vehicle", ... }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQktfV..." }, "created_at": "2024-08-29T19:50:22.357Z", "updated_at": "2025-12-31T13:29:39.176Z" }, "event": "claim.disapproved", "status": "processed", "event_id": "iGaOUrqlt2Oui2cIxUl7t" } ``` ```json [claim.offer_sent] { "data": { "meta": { "date": "2024-08-20", "time": "10:10", "address": "Creek road nembe", "interior": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "back_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "bank_code": "232", "bank_name": "Sterling Bank", "dashboard": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "left_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "loss_type": [ "Collision" ], "timestamp": "2024-08-29T20:04:18.994Z", "video_url": "https://s3.eu-west-2.amazonaws.com-blob", "front_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "right_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "geolocation": "Alimosho, Lagos State, 100314, Nigeria", "account_name": "chigozie sunday ezenwa", "incident_type": "Accidental damage", "account_number": "0062746853", "chassis_number": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "is_third_party": false, "status_time_line": [ { "name": "Pending", "time_stamp": "Aug 29, 2024 9:05 PM" }, { "name": "Inspection submitted", "time_stamp": "Aug 29, 2024 9:06 PM" }, { "name": "Reviewing", "time_stamp": "Aug 29, 2024 9:07 PM" }, { "name": "Approved", "time_stamp": "Wed, Mar 25, 2026, 3:37 PM" }, { "name": "Offer sent", "time_stamp": "Wed, Mar 25, 2026, 4:37 PM" } ], "inspection_device_type": "Android", "is_third_party_insured": false }, "essential": { "type": "Vehicle", "status": "Offer sent", "policy_id": "21dd7902-3448-4f96-ab10-81652d534a13", "product_id": "24140c74-fc6f-42f5-a0d2-24800b22d80a", "customer_id": "ae9e9db8-80cd-4469-be31-aa2cb8198ec9", "description": "Tell us how the incident happened ", "incident_date": "2024-08-20", "claimant_email": "mailer@mail.com", "additional_info": null, "claimant_last_name": "Golden", "claimant_first_name": "Arthur" }, "sdk": { "config": { ... "action": "claim", "progress": "offer", "claim_type": "Vehicle", ... }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQktfV..." }, "created_at": "2024-08-29T19:50:22.357Z", "updated_at": "2025-12-31T13:29:39.176Z" }, "event": "claim.offer_sent", "status": "processed", "event_id": "iGaOUrqlt2Oui2cIxUl7t" } ``` ```json [claim.offer_rejected] { "data": { "meta": { "date": "2024-08-20", "time": "10:10", "address": "Creek road nembe", "interior": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "back_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "bank_code": "232", "bank_name": "Sterling Bank", "dashboard": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "left_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "loss_type": [ "Collision" ], "timestamp": "2024-08-29T20:04:18.994Z", "video_url": "https://s3.eu-west-2.amazonaws.com-blob", "front_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "right_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "geolocation": "Alimosho, Lagos State, 100314, Nigeria", "account_name": "chigozie sunday ezenwa", "incident_type": "Accidental damage", "account_number": "0062746853", "chassis_number": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "is_third_party": false, "status_time_line": [ { "name": "Pending", "time_stamp": "Aug 29, 2024 9:05 PM" }, { "name": "Inspection submitted", "time_stamp": "Aug 29, 2024 9:06 PM" }, { "name": "Reviewing", "time_stamp": "Aug 29, 2024 9:07 PM" }, { "name": "Approved", "time_stamp": "Wed, Mar 25, 2026, 3:40 PM" }, { "name": "Offer sent", "time_stamp": "Wed, Mar 25, 2026, 3:50 PM" }, { "name": "Offer rejected", "time_stamp": "Wed, Mar 26, 2026, 4:00 PM" } ], "inspection_device_type": "Android", "is_third_party_insured": false }, "essential": { "comment": "This is the reason for the offer rejection...", "type": "Vehicle", "status": "Offer rejected", "policy_id": "21dd7902-3448-4f96-ab10-81652d534a13", "product_id": "24140c74-fc6f-42f5-a0d2-24800b22d80a", "customer_id": "ae9e9db8-80cd-4469-be31-aa2cb8198ec9", "description": "Tell us how the incident happened ", "incident_date": "2024-08-20", "claimant_email": "mailer@mail.com", "additional_info": null, "claimant_last_name": "Golden", "claimant_first_name": "Arthur" }, "sdk": { "config": { ... "action": "claim", "progress": "status", "claim_type": "Vehicle", ... }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQktfV..." }, "created_at": "2024-08-29T19:50:22.357Z", "updated_at": "2025-12-31T13:29:39.176Z" }, "event": "claim.offer_rejected", "status": "processed", "event_id": "iGaOUrqlt2Oui2cIxUl7t" } ``` ```json [claim.updated] { "data": { "meta": { ... }, "essential": { "type": "Gadget", "status": "Inspection submitted", "policy_id": "21dd7902-3448-4f96-ab10-81652d534a13", "product_id": "24140c74-fc6f-42f5-a0d2-24800b22d80a", "customer_id": "ae9e9db8-80cd-4469-be31-aa2cb8198ec9", "description": "Tell us how the incident happened ", "incident_date": "2024-08-20", "claimant_email": "mailer@mail.com", "additional_info": null, "claimant_last_name": "Golden", "claimant_first_name": "Arthur" }, "sdk": { "config": { ... "action": "claim", "progress": "status", "claim_type": "Gadget", ... }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQktfV..." }, "created_at": "2024-08-29T19:50:22.357Z", "updated_at": "2025-12-31T13:29:39.176Z" }, "event": "claim.updated", "status": "processed", "event_id": "iGaOUrqlt2Oui2cIxUl7t" } ``` :: ### Inspection This event is triggered whenever a pre-loss inspection is completed. ::code-group ```json [inspection.completed] { "data": { "meta": { "policy": { "email": "vauwaketteissu-9756@yopmail.com", "amount": "350000.0000", "last_name": "italawaasw", "first_name": "italowaaah", "product_id": "45140c74-fc6f-42f5-a0d2-66800b22d999", "customer_id": "7de326d2-c0b0-4f74-91ee-29b680593fff", "policy_number": "OJ152221010245", "certificate_url": "https://s3.eu-west-2.amazonaws.com...", "expiration_date": "2027-02-17T00:00:00.000Z" }, "category": "preloss", "progress": "submission", "policy_id": "b494dba7-df0e-4647-aa1a-17a6251ad123", "timestamp": "23:00", "video_url": "https://s3.eu-west-2.amazonaws.com...blob", "public_key": "aed22457-722b-4c94-81c8-c7780bdc7368", "business_id": "f19b711c-ce4b-4b10-9af7-6ebb84ea5d07", "currency_id": "6b3147f9-aa5b-4fd9-934d-ee5a179db989", "geolocation": "Okporo Road, Rumuodara, Obio/Akpor, Rivers, 500211, Nigeria", "inspection_type": "Vehicle", "vehicle_category": "Car", "inspection_images": { "left": "https://s3.eu-west-2.amazonaws.com...png", "rear": "https://s3.eu-west-2.amazonaws.com...png", "front": "https://s3.eu-west-2.amazonaws.com...png", "right": "https://s3.eu-west-2.amazonaws.com...png", "interior": "https://s3.eu-west-2.amazonaws.com...png", "dashboard": "https://s3.eu-west-2.amazonaws.com...png", "chassis_number": "https://s3.eu-west-2.amazonaws.com...png" }, "inspection_duration": "500", "inspection_device_type": "Phone" }, "essential": { "type": "Vehicle", "status": "completed", "category": "preloss", "end_date": "2026-02-16", "policy_id": "b494dba7-df0e-4647-aa1a-17a6251ad123", "start_date": "2026-01-17", "is_approved": false, "inspection_report_url": null }, "sdk": { "config": { "pk": "YOUR_PUBLIC_KEY", "pid": "45140c74-fc6f-42f5-a0d2-66800b22d999", "email": "vauwaketteissu-9756@yopmail.com", "phone": "2348091233123", "action": "claim", "progress": "submission", "policy_id": "b494dba7-df0e-4647-aa1a-17a6251ad123", "business_id": "f19b711c-ce4b-4b10-9af7-6ebb84ea5d07", "claim_type": "Vehicle", "customer_id": "7de326d2-c0b0-4f74-91ee-29b680593fff", "first_name": "italowaaah", "currency_code": "NGN", "policy_number": "OJ152221010245" }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQktfVEV..." }, "created_at": "2026-02-17T19:58:25.396Z", "updated_at": "2026-02-17T19:58:25.396Z" }, "event": "inspection.completed", "status": "processed", "event_id": "zrELhU1462se8_pidjhUg" } ``` :: # Messaging ## Email Notifications 1. Purchase Confirmation: When a customer buys a plan. 2. Registration OTP: Verification code for registration and activation. 3. Purchase Success: Notification confirming successful purchase. 4. Activation/Policy Completion: Links for activation or inspection to complete policy registration. 5. Claim Lodgement: Notification when a claim is lodged. 6. Claim Offer: Notification when a claim offer is generated. ## SMS Notifications 1. Policy Details: Sending policy details to the policy owner. 2. Inspection Success: Notification when an inspection is completed successfully. 3. Claim Offer: Notification when a claim offer is generated. ## Selecting Communication Preferences You can customise your notification settings according to your preferences on the distributor dashboard. If you wish to disable all notifications to customers, toggle off all options for notifications. ![MyCover.Ai Documentation](https://docs.mycover.ai/to-preferences.webp) ![MyCover.Ai Documentation](https://docs.mycover.ai/preferences.webp) # Write beautiful docs with Markdown ::u-page-hero --- class: homepage-hero --- #title ![MyCover.Ai Documentation](https://docs.mycover.ai/hero.webp) #description Welcome to the MyCover.ai documentation! Make insurance purchase a swift, simple, and delightful experience for your users with our APIs and low-code tools. #links :::u-button --- class: "!text-white" color: primary size: xl to: https://docs.mycover.ai/getting-started/quick-start trailing-icon: i-lucide-arrow-right --- Get started ::: :: ::u-page-section #title Explore Products #features :::u-page-feature --- icon: i-lucide-car to: https://docs.mycover.ai/api-preference/products/auto --- #title Auto #description Sell and manage auto insurance from a variety of providers. ::: :::u-page-feature --- icon: i-lucide-heart to: https://docs.mycover.ai/api-preference/products/health --- #title Health #description Access health insurance providers and process medical coverage. ::: :::u-page-feature --- icon: i-lucide-plane to: https://docs.mycover.ai/api-preference/products/travel --- #title Travel #description Provide travel insurance for Schengen and non-Schengen countries. ::: :::u-page-feature --- icon: i-lucide-monitor to: https://docs.mycover.ai/api-preference/products/gadget --- #title Gadget #description Protect gadgets through our providers and manage claims easily. ::: :::u-page-feature --- icon: i-lucide-package to: https://docs.mycover.ai/api-preference/products/package --- #title Package #description Ensure protection for goods in transit to logistic businesses & operations. ::: :::u-page-feature --- icon: i-lucide-house-heart to: https://docs.mycover.ai/api-preference/products/life --- #title Life #description Offer businesses protection against customer loan defaults. ::: :::u-page-feature --- icon: i-lucide-sofa to: https://docs.mycover.ai/api-preference/products/content --- #title Content #description Process protection for the contents of homes and offices. ::: :::u-page-feature --- icon: i-lucide-sparkles to: https://docs.mycover.ai/products --- #title More #description Browse all the insurance products we offer. ::: :: # Quick Start ## Prerequisites - Before getting started, [create a Distributor account](https://docs.mycover.ai/getting-started/distributor) and [generate your API keys](https://docs.mycover.ai/getting-started/authentication) for access to our APIs. - Ensure [Node.js :icon{name="i-lucide-external-link"}](https://nodejs.org/en/download){:target="_blank" rel=""nofollow""} is installed on your computer because the project is built with [Vite.js :icon{name="i-lucide-external-link"}](https://vite.dev){:target="_blank" rel=""nofollow""}. ## Key Usage & Environment All MyCover.ai SDKs require a public API key to initialize. - Public keys always start with `MCAPUBK_` - Test environment keys use the format: `MCAPUBK_TEST|` - Live environment keys use the format: `MCAPUBK_LIVE|` Important Notes: 1. Always replace placeholder values in code snippets with your actual public key from the MyCover.ai dashboard. 2. In documentation examples, we use a neutral placeholder: :br`MCAPUBK_ENV|your_public_key` Replace ENV with TEST for the test environment or LIVE for the live environment. 3. Parameter names may differ across SDKs (e.g., pk, apiKey, API token), but the value passed is always the same public key. ## Setting up your project 1. Clone the [repository :icon{name="i-lucide-external-link"}](https://github.com/ibuildgenius/buy-insurance){:target="_blank" rel=""nofollow""} to bootstrap a fresh project: To clone the repository to your personal computer, run the following command. ```bash git clone https://github.com/ibuildgenius/buy-insurance.git ``` 2. Navigate into the project’s directory with the command: ```bash cd buy-insurance ``` 3. Install the project’s dependencies using the commands: ::code-group ```bash [npm] npm install ``` ```bash [pnpm] pnpm install --shamefully-hoist ``` ```bash [yarn] yarn install ``` ```bash [bun] bun install ``` :: 4. In the mycoverai.js file, replace the `MCAPUBK_ENV|your_public_key` with the public API key from your distributor dashboard. ```js [mycoverai.js] const config = { ... pk: 'MCAPUBK_ENV|your_public_key', // Replace with your public API key ... }; ``` ![MyCover.Ai Documentation](https://docs.mycover.ai/api-key-dis-dash-1.webp) ![MyCover.Ai Documentation](https://docs.mycover.ai/api-key-dis-dash-2.webp) 5. Start the project locally in development mode. Run the following command to start the project in the browser on [http://localhost:5173/buy-insurance/ :icon{name="i-lucide-external-link"}](http://localhost:5173/buy-insurance/){:target="_blank" rel=""nofollow""} ::code-group ```bash [npm] npm run dev ``` ```bash [pnpm] pnpm run dev ``` ```bash [yarn] yarn dev ``` ```bash [bun] bun run dev ``` :: ::note ✨ Well done! A browser window should open for [http://localhost:5173/buy-insurance/ :icon{name="i-lucide-external-link"}](http://localhost:5173/buy-insurance/){:target="_blank" rel=""nofollow""} :: ## Testing your project 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 [MyCover.ai :icon{name="i-lucide-external-link"}](http://mycover.ai){:target="_blank" rel=""nofollow""} SDK widget. ![MyCover.Ai Documentation](https://docs.mycover.ai/buy-insurance-new.webp) Once you click the button, the SDK is initialised and displays a list of actions to take, including purchasing a product. ::note ✨ During purchase, you can easily simulate a bank transfer payment using this link: [https://demobank.paystackintegrations.com/ :icon{name="i-lucide-external-link"}](https://demobank.paystackintegrations.com/){:target="_blank" rel=""nofollow""} :: ![MyCover.Ai Documentation](https://docs.mycover.ai/sdk-welcome.webp) # Distributor ## Creating a Distributor account To access certain services, a distributor account is necessary, but worry not, creating one is incredibly simple. Follow the steps below to create your very own distributor account: 1. Go to [https://distributor.mycover.ai/get-started :icon{name="i-lucide-external-link"}](https://distributor.mycover.ai/get-started){:target="_blank" rel=""nofollow""}. This action will take you to the registration page. 2. Fill in the basic required information such as your name and password. 3. Click the signup button and an OTP will be sent to your email for verification. Once completed, you are in! ::note On completion of signup, you will be presented with a screen to fill out a KYC form. To access our services in `live_mode` you are required to complete your KYC and await verification which usually takes up to 2 business days. However, if you are not ready to go live yet and just want to play around in `test_mode` you can skip this step. :: ### Quick Tour Clicking the "Take a Tour" button on the welcome page takes you to a page that guides you through a brief tour of our user-friendly Distributor dashboard, where you'll explore a comprehensive array of tools and features tailored to empower insurance distributors. ![MyCover.Ai Documentation](https://docs.mycover.ai/tour.webp) ### Testing Upon signing up, you are automatically placed in test mode, identifiable by the sticky orange label at the top-center of every section page. Furthermore, the toggle button on the navigation bar is set to "Test mode" by default. ![MyCover.Ai Documentation](https://docs.mycover.ai/test-mode.webp) ![MyCover.Ai Documentation](https://docs.mycover.ai/test-mode-toggle.webp) On test mode, you can play around with different products, making payments for policies and claims as you wish with guarantee that you are not spending real money. ## Selling Products ::warning Make sure to check which mode you are on before proceeding. :: To sell a product, go to the Products section. There, you'll find a list of all the available products. Click on the "View" button. ![MyCover.Ai Documentation](https://docs.mycover.ai/sell1.webp) then click on the "Sell Product" button. ![MyCover.Ai Documentation](https://docs.mycover.ai/sell2.webp) This method enables you to sell a product directly from the Distributor dashboard. Alternatively, you can generate a sharable link for a specific product or more and send it to a customer who will then purchase directly from that link. ![MyCover.Ai Documentation](https://docs.mycover.ai/sell3.webp) # Environments ## Test environment This environment is specifically intended for development and testing purposes. In this environment, you gain access to all API endpoints using the test API key from your distributor dashboard. ## Live environment This environment is exclusively dedication for live scenarios and real-time operation with our services. It can be accessed using the live API key from your distributor dashboard. ## Using the base URLs When using our API, the same environments mentioned before still apply. To switch between them, use the API key that matches each environment for authentication along with the base URL. ```text [The base URL for the live and test environment is] https://v2.api.mycover.ai/v2 ``` # Authentication ## Generating Secret API keys From your distributor dashboard, you can generate a secret API key for the environment you’re in. To get your API secret key, click the gear icon and select *API Keys & Webhooks* from the menu dropdown. ![MyCover.Ai Documentation](https://docs.mycover.ai/api-key-dis-dash-1.webp) ![MyCover.Ai Documentation](https://docs.mycover.ai/sec-key.webp) For advanced security measures, we recommend using the public key rather than the secret key in public-facing scenarios, such as developing a frontend SDK based on ours or using any of the MyCover.ai SDKs. The secret key should be used exclusively for interactions with the MyCover.ai APIs from a secure backend environment. We ask that you keep your API Keys safe as they are unique to you. If you think that the keys might have been compromised, generate a new set of keys from your dashboard. ## Authorization method To authenticate requests to the MyCover.ai API, you must include an API key in the Authorization header of your request. The API key should be included in the header as a Bearer token. # Testing Regardless of the environment you’re in, you can only send HTTP requests to our API. However, you’re required to make use of the API keys for the intended environment. To run tests during integration, use the API keys from the test environment on your dashboard. The following are samples of live and test public API keys: ```js [Test public key] const TEST_KEY = 'MCAPUBK_TEST|' ``` ```js [Live public key] const LIVE_KEY = 'MCAPUBK_LIVE|' ``` ## Testing with payment When testing the SDK, you can simulate real-life transactions without actually spending any money. This means you can conduct various actions, such as purchasing or renewing policies, without any financial commitment. To simulate payment for a policy via bank transfer while using the SDK, you can use the following link: [https://demobank.paystackintegrations.com :icon{name="i-lucide-external-link"}](https://demobank.paystackintegrations.com){:target="_blank" rel=""nofollow""} # Errors We use the standard `https` status codes to indicate the success or failure of all requests made to our APIs. Following this standard: - 2xx codes indicate success. - 4xx codes indicates that an error failed due to the information provided. - 5xx codes are related to server problems on our end, though less likely to occur. To enhance your user experience, we've provided details of the potential errors you may encounter when using our API, along with their meanings. ## API Error Codes :contents-error-codes ## Error Handling For errors in the 4xx range, we provide context through the error responses. The response from the API will include a JSON payload with application and human-readable descriptions about the error. Always parse and utilise this information to troubleshoot and resolve issues effectively. A typical request response from our API is structured like: ```json [error] { "responseCode": 0, "responseText": "An error occurred while creating policy", "path": "/v1/products/leadway/buy-third-party" } ``` ```json [success] { "responseCode": 1, "responseText": "[Success message]", "data": {} } ``` If you require assistance with integrations or have any questions, we’re happy to help. You can reach out to us through [email :icon{name="i-lucide-external-link"}](mailto\:support@mycover.ai){:target="_blank"}. # Go Live Checklist - Create a [distributor](https://docs.mycover.ai/getting-started/distributor) account on [MyCover.ai :icon{name="i-lucide-external-link"}](https://distributor.mycover.ai/get-started){:target="_blank" rel=""nofollow""}. - Complete the KYC process with your business details for verification. - Update your webhook URL on your distributor dashboard to receive and process live webhook event updates triggered by your customers smoothly. - Select your communication preferences on the distributor dashboard. - Use the test API keys available on your dashboard to test your integration. - Setup two-factor authentication for your account to enable an extra layer of security when logging in to your dashboard. - Toggle your distributor dashboard application to Live! 🚀 # FAQs ### 1. Who can use MyCover.ai? MyCover.ai is designed for both individuals and businesses. It caters to a wide range of insurance needs, offering customizable insurance policies and solutions for various industries and personal requirements. ### 2. How can I create an insurance policy on MyCover.ai? Creating an insurance policy on MyCover.ai is simple. Sign up for an account, provide the necessary information about your insurance needs, and the platform will guide you through the policy creation process. You can customize coverage options, receive recommendations, and review and finalize your policy before purchasing. ### 3. Can I manage all my insurance policies in one place on MyCover.ai? Yes, absolutely! MyCover.ai provides a centralized dashboard where you can conveniently manage all your insurance policies. You can access policy details, make updates or changes, track important dates and renewals, and view all relevant information in one place. ### 4. How does MyCover.ai optimize insurance policies? MyCover.ai leverages advanced algorithms and data analytics to optimize insurance policies. The platform continuously analyzes user data, market trends, and risk profiles to identify potential cost savings, coverage improvements, or policy adjustments. This intelligent optimization ensures that you have the most suitable and cost-effective insurance coverage. ### 5. Is MyCover.ai accessible on mobile devices? Yes, MyCover.ai is accessible through our mobile applications (iOS and Android). You can easily access and manage your insurance policies on your smartphone making it convenient for on-the-go policy management. ### 6. Can I submit and track insurance claims through MyCover.ai? Absolutely! MyCover.ai streamlines the claims management process. You can submit claims directly through the distributor's dashboard and mobile app, track their progress in real-time, and receive updates on the status of your claims. The platform automates the claims verification process, reducing paperwork and ensuring efficient claims processing. ### 7. How secure is my information on MyCover.ai? At MyCover.ai, we prioritize the security and confidentiality of your information. We employ industry-standard security measures to protect your data. Our platform uses encryption technology and follows best practices to safeguard your personal and sensitive information. ### 8. Is MyCover.ai available in multiple languages? Currently, MyCover.ai is only available in English. We are continuously working to expand language support to cater to a broader user base. # JavaScript ## Installation ### Package Manager ::code-group ```bash [npm] npm install @mycoverai/mca-javascript-sdk ``` ```bash [pnpm] pnpm add @mycoverai/mca-javascript-sdk ``` ```bash [yarn] yarn add @mycoverai/mca-javascript-sdk ``` ```bash [bun] bun add @mycoverai/mca-javascript-sdk ``` :: ### CDN ```html ``` ## Usage ### With A Package Manager ```js // import SDK package import mycoverai from "@mycoverai/mca-javascript-sdk"; // Define your configuration object const config = { action: "purchase", pid: [""], pk: "MCAPUBK_ENV|your_public_key", payment_option: "gateway", reference: "BUY-", // Required if using wallet payment option callback: handleSuccess, onClose: handleClose, }; // Initialize the SDK with your configuration function buyInsurance() { mycoverai(config); } // Optional callbacks function handleClose(close_url) { console.log("SDK closed", close_url); } function handleSuccess(success_url, data) { console.log("Operation successful", success_url, data); } ``` ### With CDN ```html ``` ## Configuration The table below contains the available config parameters and their descriptions. | Parameter | Type | Required | Description | | :--------------- | :--------------------- | :-------- | :-------------------------------------------------------------------------------------------------------------------------------- | | `pk` | `string` | **Yes** | Your unique Mycover.ai public key. | | `action` | `string` | **Yes** | The action you want to perform. Options: `purchase`, `managePolicy`, `renewal`, `claim`. | | `pid` | `string` \| `string[]` | **Yes**\* | The product ID or an array of product IDs. *Required for purchase and claim actions.* | | `payment_option` | `string` | **Yes**\* | How the customer will pay. Options: `gateway` or `wallet`. *Required for purchase and renewal actions.* | | `reference` | `string` | No | A unique payment reference. *Required if using the `wallet` payment option.* | | `callback` | `function` | No | A function called upon successful operation (Purchase, Claim, Renewal, etc). Receives `success_url` (string) and `data` (object). | | `onClose` | `function` | No | A function called when the customer cancels or closes the SDK. Receives `close_url` (string). | | `policy_id` | `string` | No | The ID of an existing policy (used for policy management). | | `claim_id` | `string` | No | The ID of an existing claim (used to resume/track a claim). | # Vue.js ## Installation ### Package Manager ::code-group ```bash [npm] npm install @mycoverai/mca-vue-sdk ``` ```bash [pnpm] pnpm add @mycoverai/mca-vue-sdk ``` ```bash [yarn] yarn add @mycoverai/mca-vue-sdk ``` ```bash [bun] bun add @mycoverai/mca-vue-sdk ``` :: ### CDN ```html ``` ## Usage ### Plugin Registration ```js import { createApp } from 'vue'; import McaSdk from "@mycoverai/mca-vue-sdk"; import App from './App.vue'; const app = createApp(App); app.use(McaSdk); app.mount('#app'); ``` ### Component Usage ```vue ``` ## Component props The table below contains the available component props and their descriptions. | Parameter | Type | Required | Description | | :-------------- | :--------------------- | :-------- | :-------------------------------------------------------------------------------------------------------------------------------- | | `pk` | `string` | **Yes** | Your unique Mycover.ai public key. | | `action` | `string` | **Yes** | The action you want to perform. Options: `purchase`, `managePolicy`, `renewal`, `claim`. | | `pid` | `string` \| `string[]` | **Yes**\* | The product ID or an array of product IDs. *Required for purchase and claim actions.* | | `paymentOption` | `string` | **Yes**\* | How the customer will pay. Options: `gateway` or `wallet`. *Required for purchase and renewal actions.* | | `reference` | `string` | No | A unique payment reference. *Required if using the `wallet` payment option.* | | `callback` | `function` | No | A function called upon successful operation (Purchase, Claim, Renewal, etc). Receives `success_url` (string) and `data` (object). | | `onClose` | `function` | No | A function called when the customer cancels or closes the SDK. Receives `close_url` (string). | | `policyId` | `string` | No | The ID of an existing policy (used for policy management). | | `claimId` | `string` | No | The ID of an existing claim (used to resume/track a claim). | # React.js ## Installation ### Package Manager ::code-group ```bash [npm] npm install @mycoverai/mca-react-sdk ``` ```bash [pnpm] pnpm add @mycoverai/mca-react-sdk ``` ```bash [yarn] yarn add @mycoverai/mca-react-sdk ``` ```bash [bun] bun add @mycoverai/mca-react-sdk ``` :: ### CDN ```html ``` ## Usage Import in your template and 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's `id`, for the user to select from. ```js //import SDK package import { McaSdk } from '@mycoverai/mca-react-sdk' Buy Insurance ``` ## Styling The `Mca` component is flexible and lets you add any element as children or parent. To style your CTA, see this example using TailwindCSS: ```js ``` ### Next.js By default, Next uses universal (client-side + server-side) rendering to render your application. Client rendering is opt-in, meaning you have to explicitly decide what components React should render on the client. If you attempt to render the Mca component without using the "use client" directive, it will result in an error. See [documentation :icon{name="i-lucide-external-link"}](https://nextjs.org/docs/app/building-your-application/rendering/client-components){:target="_blank" rel=""nofollow""} for more information. ## Component props The table below contains the available component props and their descriptions. | Parameter | Type | Required | Description | | :-------------- | :--------------------- | :-------- | :-------------------------------------------------------------------------------------------------------------------------------- | | `pk` | `string` | **Yes** | Your unique Mycover.ai public key. | | `action` | `string` | **Yes** | The action you want to perform. Options: `purchase`, `managePolicy`, `renewal`, `claim`. | | `pid` | `string` \| `string[]` | **Yes**\* | The product ID or an array of product IDs. *Required for purchase and claim actions.* | | `paymentOption` | `string` | **Yes**\* | How the customer will pay. Options: `gateway` or `wallet`. *Required for purchase and renewal actions.* | | `reference` | `string` | No | A unique payment reference. *Required if using the `wallet` payment option.* | | `callback` | `function` | No | A function called upon successful operation (Purchase, Claim, Renewal, etc). Receives `success_url` (string) and `data` (object). | | `onClose` | `function` | No | A function called when the customer cancels or closes the SDK. Receives `close_url` (string). | | `policyId` | `string` | No | The ID of an existing policy (used for policy management). | | `claimId` | `string` | No | The ID of an existing claim (used to resume/track a claim). | # Flutter ## Installation - Add package mca\_flutter\_sdk to your pubspec.yaml file - Run flutter pub get - Add required permission for the image pickers and camera - Add the required permission for the geolocation ## Usage ```js import 'package:mca_flutter_sdk/mca_official_flutter_sdk.dart'; PurchaseStage typeOfTransaction = PurchaseStage.purchase; String reference = 'BUY-BWBJMPABGFWKB'; final myCover = MyCoverAI( context: context, pk: '2aa4f6ec-0111-42f4-88f9-466c7ef41727', email: 'sample@email.com', pid: [productId], paymentOption: PaymentOption.gateway, reference: 'BUY-SMRCECMNYKMHV', transactionType: TransactionType.purchase ); ``` ### Additional Information Add the required permission for image picker on Android and iOS android manifest and `info.plist` respectively. The SDK depends on image picker. # Android ## 1. Installation ### Step 1: Add Jitpack Repository #### Option A: Gradle 7+ ```gradle (settings.gradle.kts or settings.gradle) dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() maven { url 'https://jitpack.io' } } } ``` #### Option B: Older Gradle Versions ```gradle (root-level build.gradle) allprojects { repositories { google() mavenCentral() maven { url 'https://jitpack.io' } } } ``` ### Step 2: Add SDK Dependency In your module-level build.gradle (usually app/build.gradle): ```gradle dependencies { implementation 'com.github.ibuildgenius:mca-android-sdk:' } ``` Note: Replace :latest-version[with the latest release version from the SDK repository.] ## 2. SDK Initialization Initialize the SDK inside your Application class or main Activity (e.g., inside onCreate()): ```java MyCoverAI.init(this, "MCAPUBK_ENV|your_public_key"); ``` # React Native ## Installation Run the command below in your terminal ```bash npm install --save @mycoverai/mca-react-native-sdk ``` ## Usage 1. Import the package into your .js file ```js import McaSDK from "@mycoverai/mca-react-native-sdk" ``` 2. Proceed to call the Mycover.ai JSX component in your file ```js ``` # iOS ## 1. Installation We currently support Swift Package Manager only. #### Option A: Package.swift Add the SDK to your Package.swift file: ```swift dependencies: [ .package(url: "https://github.com/ibuild1genius/mca-ios-sdk", .upToNextMajor(from: "1.0.0")) ] ``` #### Option B: Xcode UI 1. Go to File > Add Packages 2. Enter the URL: {rel=""nofollow""} 3. Choose version 1.0.0 or later ### Usage #### 1. Import the SDK ```swift import MyCoverSDK ``` #### 2. Use the SwiftUI View ```swift MyCoverSDK(apiKey: "MCAPUBK_ENV|your_public_key") ``` # Auto Protect your customers, dispatch riders, and hailing services on the road with a single API call from various providers accross various countries. It all starts from a single API call to instant claim payments and settlements. ## Choose From Our List of Auto Insurance Products :products-generic-products{category-key="auto"} # Health Connect this API endpoint to make affordable health insurance plans from various providers available on your integration. ## Choose From Our List of Health Insurance Products :products-generic-products{category-key="health"} # Travel Connect any or all of the following endpoints to make personal travel covers available on your integration. ## Choose From Our List of Travel Insurance Products :products-generic-products{category-key="travel"} # Gadget Gadget Insurance is an insurance policy that protects your device in case of damages. ## Choose From Our List of Gadget Insurance Products :products-generic-products{category-key="gadget"} # Package Goods In Transit Insurance is an insurance policy that protects your business in case of loss or damage to goods while in transit. ## Choose From Our List of Package Insurance Products :products-generic-products{category-key="package"} # Life Life Insurance policy that helps you cushion the effect of unplanned eventualities. ## Choose From Our List of Life Insurance Products :products-generic-products{category-key="life"} # Content Content Insurance policy that helps you protect your property from loss or damage. ## Choose From Our List of Content Insurance Products :products-generic-products{category-key="content"} # Products ## Fetch All Products Under Your Business List all the products available to you. This endpoint allows you to query all your products details. :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/products/all"} #### Query Parameters :contents-query-params-table{variant="products"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Products fetched successfully", "data": { "total_count": 34, "products": [ { "id": "d4751c39-8500-4238-881a-fb05b8f18cd4", "name": "MediSure", "description": "A health insurance product designed to provide peace of mind and financial protection for our customers.", "base_price": "1000.0000", "cover_period": "30", "full_benefits": "

This plan covers people with quality healthcare at ₦1,000 per month.


Delivery and Ante-natal Care

Protection for delivery and ante-natal care including assisted deliveries and caesarean section.

Treatment of everyday illnesses

Access to treatment for basic medical outpatient and in-patient cases including microbiology tests.

Accident and Emergency care

Resuscitative care for accident and emergency cases, including basic radiological and laboratory investigations needed to stabilize patients before ICU.

Major and Minor Surgeries

Safeguard customers against severe health conditions with access to 26 different types of surgeries.

24 hours Telemedicine

Customers get free consultations with health experts when needed.

Dental and Eye Care

Enhance customers' overall well-being with healthcare that covers treatment for both their eyes and dentition.

", "how_it_works": "
  • Each person will get an e-HMO ID generated automatically.
  • The E-ID can be taken to any available hospital under the plan to get healthcare.
  • At the hospital, the HMO ID is presented as a means of verification to receive healthcare without paying.
", "stability_percentage": 100, "provider": { "id": "04e7e852-0c80-4c62-8a24-c5f4a5e5c6d6", "organization_name": "Bastion" }, "country": { "id": "758d3834-5488-4603-bc41-4f542dd3de87", "name": "Nigeria" }, "currency": { "id": "29dbe1da-218d-4b9d-bd43-8870055471a7", "name": "Nigerian Naira" }, "category": { "id": "9d78bc79-3fa8-447d-b688-e42c1c6838a0", "name": "Health" } }, // ... ] } } ``` :: ### Get One Product Details by ID :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/products/:productId"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Products fetched successfully", "data": { "id": "d4751c39-8500-4238-881a-fb05b8f18cd4", "name": "MediSure", "prefix": "bastion", "route_name": "bastion-medisure", "is_renewable": true, "is_claimable": false, "is_inspectable": false, "is_certificateable": false, "prevent_duplicate_purchase": true, "is_multi_sharing_formula": false, "base_price": "10000.0000", "cover_period": "30", "is_active": true, "category_id": "9d78bc79-3fa8-447d-b688-e42c1c6838a0", "provider_id": "04e7e852-0c80-4c62-8a24-c5f4a5e5c6d6", "stability_percentage": 100, "country_id": "bb67ae67-53d1-4810-be05-33043115399c", "currency_id": "6b3147f9-aa5b-4fd9-934d-ee5a179db989", "created_at": "2025-07-31T17:38:40.991Z", "updated_at": "2025-10-14T12:38:07.428Z", "provider": { "id": "04e7e852-0c80-4c62-8a24-c5f4a5e5c6d6", "organization_name": "Bastion" }, "country": { "id": "bb67ae67-53d1-4810-be05-33043115399c", "name": "Nigeria" }, "currency": { "id": "6b3147f9-aa5b-4fd9-934d-ee5a179db989", "name": "Nigerian Naira" }, "category": { "id": "9d78bc79-3fa8-447d-b688-e42c1c6838a0", "name": "Health" } } } ``` :: ## Fetch All Product Categories :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/products/categories"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Product categories fetched successfully", "data": [ { "id": "14fb5968-48d2-49ac-88a8-0ee40e01fcca", "name": "Package", "created_at": "2021-09-03T14:59:35.475Z", "product_count": "4", "provider_count": "1" }, { "id": "1e87194d-5eb1-48b6-8837-a9cbc78d4ec3", "name": "Gadget", "created_at": "2021-09-03T14:59:35.392Z", "product_count": "3", "provider_count": "2" }, // ... ] } ``` :: # Policies ## View Policies Use the following endpoint to list all the policies on your integration. ### Fetch All Policies Under Your Business :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/policies"} #### Query Parameters :contents-query-params-table{variant="policies"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Policies fetched successfully", "data": { "total_result": 86, "policies": [ { "id": "9cdf65f6-f982-4f8c-a17a-923bfa20b05f", "app_mode": "test", "first_name": "Dekunle", "last_name": "Gold", "email": "dekunlegold@yopmail.com", "phone_number": "2349081408793", "date_of_birth": "1999-01-20T16:31:00.000Z", "activation_date": "2025-10-28T16:32:55.053Z", "start_date": "2025-10-28T16:32:55.053Z", "expiration_date": "2026-10-28T00:00:00.000Z", "amount": "60000.0000", "is_active": true, "is_submitted_to_provider": true, "customer_id": "8afbc691-0ad8-4a07-af22-3a99df457c3b", "insured_id": "edd1a9a4-6396-40ea-b8da-13bc333c7195", "insured_policy_relationship": "covered_person", "insured_type": "dependant", "distributor_id": "dff30873-0ac9-49ff-b05a-ef4901734a2c", "provider_id": "f029cc0c-9eb8-41b3-82b1-a9cc26fde03f", "product_id": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", "product_category_id": "1e87194d-5eb1-48b6-8837-a9cbc78d4ec3", "country_id": "bb67ae67-53d1-4810-be05-33043115399c", "currency_id": "6b3147f9-aa5b-4fd9-934d-ee5a179db989", "purchase_id": "c081655f-a863-4db7-ab23-fc453af8479c", "policy_number": "ACC/AR/10/2025/HQ/5800", "certificate_url": "https://ss.mycover.ai/#QVCgODCCQe", "meta": { "policy_number": "ACC/AR/10/2025/HQ/5800" }, "created_at": "2025-10-28T16:32:55.054Z", "updated_at": "2025-10-28T16:32:58.420Z", "provider": { "id": "f029cc0c-9eb8-41b3-82b1-a9cc26fde03f", "organization_name": "Sovereign Trust" }, "distributor": { "id": "dff30873-0ac9-49ff-b05a-ef4901734a2c", "organization_name": "ebuttemetta ogechi doinz" }, "product": { "id": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", "name": "Gadget Cover", } } ] } ``` :: ### Get One Policy Details by ID :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/policies/:policyId"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Policy retrieved successfully", "data": { "id": "9cdf65f6-f982-4f8c-a17a-923bfa20b05f", "app_mode": "test", "first_name": "Dekunle", "last_name": "Gold", "email": "dekunlegold@yopmail.com", "phone_number": "2349081408793", "date_of_birth": "1999-01-20T16:31:00.000Z", "activation_date": "2025-10-28T16:32:55.053Z", "start_date": "2025-10-28T16:32:55.053Z", "expiration_date": "2026-10-28T00:00:00.000Z", "amount": "60000.0000", "is_active": true, "is_submitted_to_provider": true, "customer_id": "8afbc691-0ad8-4a07-af22-3a99df457c3b", "insured_id": "edd1a9a4-6396-40ea-b8da-13bc333c7195", "insured_policy_relationship": "covered_person", "insured_type": "dependant", "distributor_id": "dff30873-0ac9-49ff-b05a-ef4901734a2c", "provider_id": "f029cc0c-9eb8-41b3-82b1-a9cc26fde03f", "product_id": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", "product_category_id": "1e87194d-5eb1-48b6-8837-a9cbc78d4ec3", "country_id": "bb67ae67-53d1-4810-be05-33043115399c", "currency_id": "6b3147f9-aa5b-4fd9-934d-ee5a179db989", "purchase_id": "c081655f-a863-4db7-ab23-fc453af8479c", "policy_number": "ACC/AR/10/2025/HQ/5800", "certificate_url": "https://ss.mycover.ai/#QVCgODCCQe", "meta": { "policy_number": "ACC/AR/10/2025/HQ/5800" }, "created_at": "2025-10-28T16:32:55.054Z", "updated_at": "2025-10-28T16:32:58.420Z", "provider": { "id": "f029cc0c-9eb8-41b3-82b1-a9cc26fde03f", "organization_name": "Sovereign Trust" }, "distributor": { "id": "dff30873-0ac9-49ff-b05a-ef4901734a2c", "organization_name": "ebuttemetta ogechi doinz" }, "product": { "id": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", "name": "Gadget Cover", } } ``` :: # Claims This means, with our responsive Claims Tracking API, no manual process is involved while you seamlessly track and monitor the claim status between customers and providers. Our status endpoint enables our server to respond with the claim details and status of the specified claim reference. ## View Claims See a list of all the claims made by your customers and your providers’ response on your integration. :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/claims"} #### Query Parameters :contents-query-params-table{variant="claims"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Claims retrieved successfully", "data": { "total_result": 86, "claims": [ { "id": "9cdf65f6-f982-4f8c-a17a-923bfa20b05f", } ] } } ``` :: ### Get One Claim Details by ID :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/claims/:claimId"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Claim retrieved successfully", "data": { "claim":{ "id": "9cdf65f6-f982-4f8c-a17a-923bfa20b05f", } } ``` :: # Customers ## Get All Customers Fetch a list of all your customers :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/customers"} ### Query Parameters :contents-query-params-table{variant="customers-all"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Customers fetched successfully", "data": { "total_result": 4, "total_count": 4, "customers": [ { "id": "5e2bd0d5-5a5e-4933-a3a4-8eb165ff2d2e", "first_name": "Taiwo", "last_name": "Suleman", "email": "tauselefagri-5613@yopmail.com", "phone_number": "2349132326212", "gender": "Male", "date_of_birth": "1990-04-05", "home_address": "Lekki Phase 1", "state_of_residence": "Lagos", "is_active": true, "is_returning_customer": true, "profile": "customer", "customer_code": "CUS-26088", "role": "user", "app_mode": "test", "country_id": "bb67ae67-53d1-4810-be05-33043115399c", "created_at": "2025-10-06T12:59:21.377Z", "updated_at": "2025-10-08T09:40:15.128Z", }, ] } } ``` :: ### Get One Customer Details by ID :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/customers/:customerId"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Customers fetched successfully", "data": { "id": "5e2bd0d5-5a5e-4933-a3a4-8eb165ff2d2e", "first_name": "Taiwo", "last_name": "Suleman", "email": "tauselefagri-5613@yopmail.com", "phone_number": "2349132326212", "gender": "Male", "date_of_birth": "1990-04-05", "home_address": "Lekki Phase 1", "state_of_residence": "Lagos", "is_active": true, "is_returning_customer": true, "profile": "customer", "customer_code": "CUS-26088", "role": "user", "app_mode": "test", "country_id": "bb67ae67-53d1-4810-be05-33043115399c", "created_at": "2025-10-06T12:59:21.377Z", "updated_at": "2025-10-08T09:40:15.128Z", } } ``` :: ## View Customer's Purchase History See customer’s purchase details, dates and transaction info :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/customers/:customerId/purchases"} :contents-query-params-table{variant="customers-purchases"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Customer purchase fetched successfully", "data": { "total_count": 14, "purchases": [ { "id": "8f20581f-092b-4746-b02b-62d76520ed56", "created_at": "2025-10-27T09:55:41.173Z", "amount": "930.0000", "product": { "name": "MediSure", "category": { "name": "Health" } }, "provider": { "organization_name": "Bastion" }, "customer": { "first_name": "Taiwo", "last_name": "Suleman", "email": "tauselefagri-5613@yopmail.com", "id": "5e2bd0d5-5a5e-4933-a3a4-8eb165ff2d2e" } } ] } } ``` :: ## View Customer's Policy History See customer’s policy details, dates and transaction info :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/customers/:customerId/policies"} :contents-query-params-table{variant="customers-policies"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Customer policies fetched successfully", "data": { "total_result": 14, "policies": [ { "id": "d314077d-5f0b-42a3-ad95-ec40ee6faabb", "app_mode": "test", "is_as_service": false, "first_name": "Taiwo", "last_name": "Suleman", "email": "tauselefagri-5613@yopmail.com", "phone_number": "2349132326212", "date_of_birth": "1990-04-05T00:00:00.000Z", "activation_date": "2025-10-28T00:00:00.000Z", "start_date": "2025-10-27T09:55:41.193Z", "expiration_date": "2025-11-26T00:00:00.000Z", "amount": "930.0000", "is_active": true, "is_submitted_to_provider": true, "customer_id": "5e2bd0d5-5a5e-4933-a3a4-8eb165ff2d2e", "insured_id": "832054c7-f9ee-4546-96f0-90a08a82de77", "insured_policy_relationship": "policy_holder", "insured_type": "primary_insured", "distributor_id": "9ea1fa8f-a6b7-4501-a26c-7acaae846212", "provider_id": "04e7e852-0c80-4c62-8a24-c5f4a5e5c6d6", "product_id": "d4751c39-8500-4238-881a-fb05b8f18cd4", "product_category_id": "9d78bc79-3fa8-447d-b688-e42c1c6838a0", "country_id": "bb67ae67-53d1-4810-be05-33043115399c", "currency_id": "29dbe1da-218d-4b9d-bd43-8870055471a7", "purchase_id": "8f20581f-092b-4746-b02b-62d76520ed56", "policy_number": "100012398", "certificate_url": "https://s3.eu-west-2.amazonaws.com/staging.mycover.ai/6bb3420a-33b4-49dc-a877-c09e07c502bf-Taiwo", "created_at": "2025-10-27T09:55:41.194Z", "updated_at": "2025-10-27T09:55:44.962Z", "policy_holder": { "first_name": "Taiwo", "last_name": "Suleman" }, "insured": { "first_name": "Taiwo", "last_name": "Suleman" }, "product": { "name": "MediSure", "category": { "name": "Health" } } } ] } } ``` :: # Sales View a list of all the transactions you’ve done on your integration. This endpoint describes how to view customer purchases and renewals. You can also query specific transactions using the appropriate reference. ## View Purchases and Renewals See a list of all the purchases and renewals made by your customers. :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/purchases"} #### Query Parameters :contents-query-params-table{variant="sales"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Purchases fetched successfully", "data": { "total_result": 125, "total_count": 125, "purchases": [ { "id": "50d4ef41-ba21-4309-8b09-8eff0d13886f", "app_mode": "test", "is_renewal": false, "amount": "50000.0000", "customer_id": "70b33e7f-bbb4-42c2-ad92-29c20ee0e9ab", "distributor_id": "5a32b459-8c3b-46bc-b699-0c5902824b1b", "payment_channel": "none", "payment_option": "wallet", "policy_id": "507d32df-4b25-462b-ac5a-d26d63468e67", "product_category_id": "978ced0d-0e05-4de6-b43a-b408c0e8b95e", "product_id": "0ced01f3-7698-4101-a244-dd5d70e974c4", "provider_id": "f029cc0c-9eb8-41b3-82b1-a9cc26fde03f", "country_id": "bb67ae67-53d1-4810-be05-33043115399c", "currency_id": "6b3147f9-aa5b-4fd9-934d-ee5a179db989", "created_at": "2025-10-30T22:55:55.293Z", "updated_at": "2025-10-30T22:55:55.387Z", "customer": { "first_name": "Ogonnawwwww", "last_name": "Geeddsss", "email": "geeddsss@yopmail.com", "phone_number": "2348091222123", "gender": "Male" }, "policy": { "policy_number": "PAC/PP/10/2025/AC/6167" }, "provider": { "organization_name": "Sovereign Trust" }, "distributor": { "organization_name": "suramogaji enterprise" }, "product": { "name": "Mini Comprehensive" } }, // ... ] } } ``` :: ### Get One Purchase or Renewal Details by ID :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/purchases/:id"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Purchase retrieved successfully", "data": { "id": "50d4ef41-ba21-4309-8b09-8eff0d13886f", "app_mode": "test", "is_renewal": false, "amount": "50000.0000", "customer_id": "70b33e7f-bbb4-42c2-ad92-29c20ee0e9ab", "distributor_id": "5a32b459-8c3b-46bc-b699-0c5902824b1b", "payment_channel": "none", "payment_option": "wallet", "policy_id": "507d32df-4b25-462b-ac5a-d26d63468e67", "product_category_id": "978ced0d-0e05-4de6-b43a-b408c0e8b95e", "product_id": "0ced01f3-7698-4101-a244-dd5d70e974c4", "provider_id": "f029cc0c-9eb8-41b3-82b1-a9cc26fde03f", "country_id": "bb67ae67-53d1-4810-be05-33043115399c", "currency_id": "6b3147f9-aa5b-4fd9-934d-ee5a179db989", "created_at": "2025-10-30T22:55:55.293Z", "updated_at": "2025-10-30T22:55:55.387Z", "customer": { "id": "70b33e7f-bbb4-42c2-ad92-29c20ee0e9ab", "first_name": "Ogonnawwwww", "last_name": "Geeddsss", "email": "geeddsss@yopmail.com", "phone_number": "2348091222123", "gender": "Male", }, "policy": { "id": "507d32df-4b25-462b-ac5a-d26d63468e67", "app_mode": "test", "is_as_service": false, "first_name": "Abdullahi", "last_name": "Jerry", "email": "geeddsss@yopmail.com", "phone_number": "2348068988777", "date_of_birth": "2007-01-01T22:54:00.000Z", "activation_date": "2025-10-30T22:55:55.381Z", "start_date": "2025-10-30T22:55:55.380Z", "expiration_date": "2026-10-30T00:00:00.000Z", "amount": "50000.0000", "is_active": true, "is_submitted_to_provider": true, "customer_id": "70b33e7f-bbb4-42c2-ad92-29c20ee0e9ab", "insured_id": "2e6a15aa-0ab4-4511-8841-488748032d11", "insured_policy_relationship": "policy_holder", "insured_type": "primary_insured", "distributor_id": "5a32b459-8c3b-46bc-b699-0c5902824b1b", "provider_id": "f029cc0c-9eb8-41b3-82b1-a9cc26fde03f", "product_id": "0ced01f3-7698-4101-a244-dd5d70e974c4", "product_category_id": "978ced0d-0e05-4de6-b43a-b408c0e8b95e", "country_id": "bb67ae67-53d1-4810-be05-33043115399c", "currency_id": "6b3147f9-aa5b-4fd9-934d-ee5a179db989", "purchase_id": "50d4ef41-ba21-4309-8b09-8eff0d13886f", "policy_number": "PAC/PP/10/2025/AC/6167", "certificate_url": "https://ss.mycover.ai/#pQFKxrGJpB", "created_at": "2025-10-30T22:55:55.381Z", "updated_at": "2025-10-30T22:55:58.269Z", }, "provider": { "organization_name": "Sovereign Trust" }, "distributor": { "organization_name": "suramogaji enterprise" }, "product": { "name": "Mini Comprehensive", "category": { "name": "Auto" } } } } ``` :: # Auxiliary ## File Upload Use this endpoint to upload a file > This is an authenticated endpoint. ::ui-endpoint --- auth: true method: POST url: https://v2.api.mycover.ai/v2/utilities/files/upload --- :: #### Query Parameters :contents-query-params-table{variant="auxiliary"} #### Response ::code-collapse ```json [201 Created] { "responseCode": 1, "responseText": "File upload successful", "data": { "upload_id": "03a6d0d5-7a7a-4cbe-a26d-89f53558492a" // UUID of the uploaded file } } ``` :: ## Get Genders Use this endpoint to get genders :ui-endpoint{method="GET" url="https://v2.api.mycover.ai/v2/utilities/genders"} #### Response ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Genders retrieved", "data": { "genders": [ "Male", "Female" ] } } ``` :: ## Get States Use this endpoint to get states and LGAs in Nigeria > This is an authenticated endpoint. #### Response ::ui-endpoint --- auth: true method: GET url: https://v2.api.mycover.ai/v2/products/utility/e55de863-7d98-4236-bd61-40328cd7f7fc --- :: ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Product utility fetched successfully", "data": [ { "label": "Abia", "value": "Abia" }, { "label": "Adamawa", "value": "Adamawa" }, { "label": "Akwa Ibom", "value": "Akwa Ibom" }, { "label": "Anambra", "value": "Anambra" }, { "label": "Bauchi", "value": "Bauchi" }, { "label": "Bayelsa", "value": "Bayelsa" }, // ... ] } ``` :: ## Get Vehicle Make List Use this endpoint to get vehicle make list > This is an authenticated endpoint. #### Response ::ui-endpoint --- auth: true method: GET url: https://v2.api.mycover.ai/v2/products/utility/fa2fb85f-9d1a-4652-a136-9da8e4c57c5c --- :: ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Product utility fetched successfully", "data": [ { "label": "Acura", "value": "Acura" }, { "label": "Alfa Romeo", "value": "Alfa Romeo" }, { "label": "Audi", "value": "Audi" }, // ... ] } ``` :: ## Get Vehicle Model List Use this endpoint to get vehicle model list > This is an authenticated endpoint. #### Response ::ui-endpoint --- auth: true method: GET url: https://v2.api.mycover.ai/v2/products/utility/86db5030-df01-4e2d-821b-e43e017f7e67?query=Toyota --- :: ::code-collapse ```json [200 OK] { "responseCode": 1, "responseText": "Product utility fetched successfully", "data": [ { "label": "Camry", "value": "Camry" }, { "label": "Corolla", "value": "Corolla" }, { "label": "Highlander", "value": "Highlander" }, // ... ] } ``` :: # Preliminary To receive these webhooks, you will need a `POST` endpoint on your server that can be called by our system to send you webhooks. ## Setting Up Webhooks To enable webhooks, please follow the steps below: ### Step 1 [Log in :icon{name="i-lucide-external-link"}](http://distributor.mycover.ai){:target="_blank" rel=""nofollow""} to your Distributor dashboard. Then, click on the settings icon to navigate to the settings page. ![MyCover.Ai Documentation](https://docs.mycover.ai/api-key-dis-dash-1.webp) ### Step 2 At the bottom, you will find the webhook section. Click on the toggle to enable webhooks. ![MyCover.Ai Documentation](https://docs.mycover.ai/webhook-1.webp) ### Step 3 Once webhooks are enabled, a form will appear where you can enter your webhook URL. This URL is the endpoint on your server that will receive the webhook notifications from our system. After entering the URL, click on the "Save" button to save your webhook URL. ::note You can enter multiple URLs separated by `|` . E.g `https://example.com/webhook|https://example.com/webhook2` . Each will receive a copy of every webhook. :: ![MyCover.Ai Documentation](https://docs.mycover.ai/webhook-url.webp) ## Validation You can effortlessly verify webhooks received from the MyCover.ai platform by following these steps: Signature Inclusion: Every sent webhook includes a signature in the headers called `x-mycoverai-signature`. This signature is the encrypted webhook data using the merchant's (i.e Distributor) private secret API key. ::note Your secret API Key is located at Settings > Api Key & Web hooks. It is usually annotated with "MCASECK". :: Validation on Merchant's End: Merchants can follow the same encryption steps using their secret API key. Then, they can compare the created signature with the one they received. If the signatures are the same, it's safe to go ahead and use the webhook information. However, if the signatures don't match, they should ignore the webhook and not use the information it carries. ::code-group ```js [Node.js] const crypto = require("crypto"); const secretKey = 'MCASECK|'; const signature = crypto .createHmac("sha512", secretKey) .update(JSON.stringify(req.body)) .digest("hex"); if (req.headers['x-mycoverai-signature'] === signature) { const event = req.body; // Do something with event - that will not take long // Return Ok res.send(200); } ``` ```python [Python] import json import hashlib import hmac secret_key = 'MCASECK|' json_payload = json.dumps(req_body, separators=(',', ':')) secret_key_bytes = secret_key.encode() hmac_obj = hmac.new(secret_key_bytes, digestmod=hashlib.sha512) hmac_obj.update(json_payload.encode()) signature = hmac_obj.hexdigest() if req.headers.get('x-mycoverai-signature') == signature: print('Do something with req_body') # Return Ok ``` :: ## Retry Logic Webhook delivery is retried automatically on failure. We consider a delivery failed if your endpoint returns a non-2xx HTTP status or does not respond within 60 seconds. We retry up to 10 additional times using exponential backoff: | Attempt | Delay | Cumulative time elapsed | | ------- | ----------- | ---------------------------- | | 1 | 30 seconds | 30 seconds | | 2 | 1 minute | 1 minute 30 seconds | | 3 | 2 minutes | 3 minutes 30 seconds | | 4 | 4 minutes | 7 minutes 30 seconds | | 5 | 8 minutes | 15 minutes 30 seconds | | 6 | 16 minutes | 31 minutes 30 seconds | | 7 | 32 minutes | 63 minutes 30 seconds | | 8 | 64 minutes | 2 hours 7 minutes 30 seconds | | 9 | \~2.1 hours | \~4 hours 13 minutes | | 10 | \~4.3 hours | \~8 hours 31 minutes | ## Idempotency Because webhooks can be retried up to 10 times, your endpoint may receive the same event more than once. This can happen not just from retries, but also from transient network issues or rare cases where your server processes a request but fails to return a response in time. Design your endpoint to be idempotent so that processing the same event multiple times produces the same result as processing it once. ### Using the event ID Every webhook payload includes a unique `event_id` field. Use it to deduplicate incoming events: 1. When an event arrives, check your data store for the `event_id`. 2. If it already exists, return a `200 OK` and discard the payload. 3. If it is new, process the event and persist the `event_id` before returning `200 OK`. ```js { "event_id": "C6HdCeTS_7L6GOmlIS1kD", "event": "purchase.successful", "status": "processed", "data": { ... } } ``` ## Webhook Payload Structure Every webhook we send shares a common envelope structure, regardless of the event type. Understanding this structure lets you write a single parsing layer that handles all webhook events consistently. ```typescript interface IWebhookPayload { event_id: string; event: string; status: "processed" | "failed"; data: IWebhookData; } ``` ### Top-level payload | Field | Type | Description | | ---------- | ------------------------ | ----------------------------------------------------------------------------- | | `event_id` | `string` | Unique identifier for this event. Use this to deduplicate retried deliveries. | | `event` | `string` | The event type that triggered this webhook, e.g. `purchase.successful`. | | `status` | `"processed" | "failed"` | Whether the operation completed successfully or encountered an error. | | `data` | `IWebhookData` | The event payload. See below. | ### Data object ```typescript interface IWebhookData { essential: { [key: string]: any }; created_at: string; updated_at: string; meta?: { [key: string]: any }; sdk?: { [key: string]: any }; } ``` | Field | Type | Description | | ------------ | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `essential` | `object` | Core fields guaranteed to be present for this event type - customer details, policy identifiers, amounts, and so on. The specific keys vary by event. | | `created_at` | `string` | ISO 8601 timestamp of when the resource was created. | | `updated_at` | `string` | ISO 8601 timestamp of when the resource was last updated. | | `meta` | `object` *(optional)* | Additional context about the resource, such as policy limits or supplementary identifiers. Present on most events but not guaranteed. | | `sdk` | `object` *(optional)* | Data relevant to SDK-initiated flows, including configurations and any generated links (e.g. claim or inspection URLs). Used to initialize MCA SDK with a specific action. Present on most events but not guaranteed. | ### Example payload Here is a full example for a purchase.successful event: ```js { "event_id": "C6HdCeTS_7L6GOmlIS1kD", "event": "purchase.successful", "status": "processed", "data": { "essential": { "first_name": "Jimmy", "last_name": "Kardi", "email": "cafafroucroti-7682@yopmail.com", "phone_number": "2349102345678", "customer_id": "908d7572-726c-4467-a613-2d3a1478c17d", "policy_id": "26f6dd66-c300-4314-8c81-b0dfe4f6e3fe", "policy_number": "TESTACC/AR/05/2026/HQ/2430", "product_id": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", "amount": "25000.0000", "expiration_date": "2027-05-21T00:00:00.000Z" }, "meta": { "sum_insured": 500000, "policy_number": "TESTACC/AR/05/2026/HQ/2439" }, "sdk": { "config": { "pk": "YOUR_PUBLIC_KEY", "pid": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", ... }, "claim_link": "https://...", "inspection_link": "https://..." }, "created_at": "2026-05-21T21:49:06.551Z", "updated_at": "2026-05-21T21:49:11.843Z" } } ``` # Events Events are how we notify your application when something happens in your integration. Each time a significant action occurs like a policy is purchased, a claim is submitted, or a payment is processed, we generate an event object and deliver it to your configured webhook endpoint. Understanding events is central to building a reliable integration. Rather than polling our API for changes, you can listen for events and react to them in real time. ::note Always remember to use the `event_id` to deduplicate incoming events. :: ## Event types Every event has an `event` field that identifies what happened. Event types follow a `resource.action` naming pattern. For example, `purchase.successful` or `claim.submitted`. This makes it easy to filter and route events in your handler. We group events by the resource they relate to. Each group is documented below with its available event types, the fields you can expect in `data.essential`, and a sample payload. ### Purchase and renewal This event is triggered when a policy is purchased or renewed. ::code-group ```json [purchase.successful] { "data": { "meta": { "sum_insured": 500000, "policy_number": "TESTACC/AR/05/2026/HQ/7520" }, "essential": { "email": "cafafroucroti-7682@yopmail.com", "amount": "25000.0000", "last_name": "Kardi", "policy_id": "0cc16073-f566-4749-adf8-0e0d980089a6", "first_name": "Jimmy", "product_id": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", "customer_id": "908d7572-726c-4467-a613-2d3a1478c17d", "policy_number": "TESTACC/AR/05/2026/HQ/7520", "expiration_date": "2027-05-22T00:00:00.000Z" }, "sdk": { "config": { "pk": "YOUR_PUBLIC_KEY", "pid": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", "email": "cafafroucroti-7682@yopmail.com", "phone": "2349102345678", "action": "claim", "progress": "submission", "policy_id": "0cc16073-f566-4749-adf8-0e0d980089a6", "business_id": "f19b711c-ce4b-4b10-9af7-6ebb84ea5d07", "claim_type": "Gadget", "customer_id": "908d7572-726c-4467-a613-2d3a1478c17d", "first_name": "Jimmy", "currency_code": "NGN", "policy_number": "TESTACC/AR/05/2026/HQ/7520" }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQk...", "inspection_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQk..." }, "created_at": "2026-05-22T14:23:57.419Z", "updated_at": "2026-05-22T14:24:01.815Z" }, "event": "purchase.successful", "status": "processed", "event_id": "l6w0iT2yGXfQsOJCe8ipa" } ``` ```json [purchase.renewed] { "data": { "meta": { "sum_insured": 500000, "policy_number": "TESTACC/AR/05/2026/HQ/7520" }, "essential": { "email": "cafafroucroti-7682@yopmail.com", "amount": "50000.0000", "last_name": "Kardi", "policy_id": "0cc16073-f566-4749-adf8-0e0d980089a6", "first_name": "Jimmy", "product_id": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", "customer_id": "908d7572-726c-4467-a613-2d3a1478c17d", "policy_number": "TESTACC/AR/05/2026/HQ/7520", "expiration_date": "2028-05-21T00:00:00.000Z" }, "sdk": { "config": { ... "action": "claim", "progress": "submission", ... }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQk...", "inspection_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQk..." }, "created_at": "2026-05-22T14:23:57.419Z", "updated_at": "2026-05-22T14:52:41.598Z" }, "event": "purchase.renewed", "status": "processed", "event_id": "OCiaG6J3nVpz6g6zAKmM1" } ``` :: ### Policy update This event is triggered whenever a policy's details or status are updated. Common scenarios include: - **Certificate/HMO document generation**: The official policy certificate/HMO document URL is generated or regenerated. This updates the `certificate_url` field in the `essential` object. - **Policy details**: The policy details are updated like `first_name`, `last_name`, `email`, `phone`, `product_id`, `customer_id`, `policy_number`, `expiration_date`. This updates the `essential` object. ::code-group ```json [policy.updated] { "data": { "meta": { "sum_insured": 500000, "policy_number": "TESTACC/AR/05/2026/HQ/0388" }, "essential": { "email": "cafafroucroti-7682@yopmail.com", "amount": "25000.0000", "last_name": "Kardi", "policy_id": "f6685b51-965c-4f10-a180-dcc107aaf747", "first_name": "Jimmy", "product_id": "eec0711c-1e4a-453b-a26c-2726e0a1a7cc", "customer_id": "908d7572-726c-4467-a613-2d3a1478c17d", "policy_number": "TESTACC/AR/05/2026/HQ/0388", "certificate_url": "https://s3.eu-west-2.amazonaws.com...pdf", "expiration_date": "2027-05-22T00:00:00.000Z" }, "sdk": { "config": { ... "action": "claim", "progress": "submission", ... }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQktfVEV..." }, "created_at": "2026-05-22T16:06:37.911Z", "updated_at": "2026-05-22T16:06:42.597Z" }, "event": "policy.updated", "status": "processed", "event_id": "fkc9J8OI_J1q4QMT9PrOV" } ``` :: ### Claims These events are triggered when a claim is created, updated, or moves through the processing pipeline. #### Event Types and Triggers | Event | Description | | :--------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `claim.submitted` | Triggered when a new claim is successfully submitted by a customer. | | `claim.approved` | Triggered when the claim is approved by the Provider or Insurer. | | `claim.disapproved` | Triggered when the claim is disapproved. A `comment` field is included in the payload explaining the reason. | | `claim.offer_sent` | Triggered when a claim/settlement offer is generated and sent to the customer. | | `claim.offer_rejected` | Triggered when the customer rejects the claim offer. A `comment` field is included with the reason. | | `claim.updated` | Triggered during intermediate processing updates. Key triggers include: :br • **Document submission**: The customer uploads a required document (e.g., travel tickets or receipts). :br • **Inspection completion**: The customer completes a post-loss inspection. :br • **Additional information requested**: The provider requests extra details or documents. :br • **Additional information submitted**: The customer responds to the information request. :br • **Repair estimation**: An estimated cost of repair is submitted. :br • **Offer acceptance**: The customer accepts the settlement offer. :br • **Payout/Settlement**: The payout is processed, and the claim is fully settled. | #### Key Payload Properties Use these properties to track the real-time status and type of a claim as it progresses: | Property Path | Description | Possible Values | | :-------------------------- | :-------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **`data.essential.status`** | Represents the high-level operational state of the claim. | `Pending`, `Inspection submitted`, `Third party inspection submitted`, `Documented`, `Approved`, `Declined`, `Requested additional information`, `Submitted additional information`, `Repair estimate submitted`, `Offer sent`, `Offer accepted`, `Offer rejected`, `Paid` | | **`data.essential.type`** | Indicates the category of the insurance claim. | `Vehicle`, `Gadget`, `Credit life`, `Travel`, `Life`, `Content` | | **`data.meta.progress`** | Tracks the step-by-step workflow milestone of the claim. | `submission`, `inspection`, `documentation`, `additional_info`, `third_party_inspection`, `technician_repair_estimate`, `repair_estimate`, `offer`, `status` | ::code-group ```json [claim.submitted] { "data": { "meta": { "damages": [ { "damage_area": "Front", "damage_part": "Bumper", "far_range_url": "https://s3.eu-west-2.amazonaws.com...jpg", "close_range_url": "https://s3.eu-west-2.amazonaws.com...jpg" } ], "progress": "submission", "loss_type": "Collision", "policy_id": "373af503-4b1e-4c5d-98b8-1e3cbec0f04a", "claim_type": "Vehicle", "public_key": "595960b8-e4a2-4f05-b2f7-a6307e9f462a", "business_id": "92e39bc5-6110-4dcb-8583-bc50c2e6922b", "currency_id": "6b3147f9-aa5b-4fd9-934d-ee5a179db989", "incident_date": "2026-05-07", "incident_time": "10:49", "incident_type": "Accidental damage", "driver_license": "ABC12345DE6", "is_third_party": true, "status_time_line": [ { "name": "Pending", "time_stamp": "Thu, May 7, 2026, 10:53 AM" } ], "incident_location": "lokoja", "driver_license_url": "https://s3.eu-west-2.amazonaws.com...jpg", "no_of_damage_parts": 1, "has_third_party_info": false, "incident_best_explain": "Collision", "third_party_loss_type": [ "Third party bodily injury" ] }, "essential": { "type": "Vehicle", "status": "Pending", "policy_id": "21dd7902-3448-4f96-ab10-81652d534a13", "product_id": "24140c74-fc6f-42f5-a0d2-24800b22d80a", "customer_id": "ae9e9db8-80cd-4469-be31-aa2cb8198ec9", "incident_date": "2026-03-06", "claimant_email": "mailer@mail.com", "additional_info": null, "claimant_last_name": "Jimmy", "claimant_first_name": "Kenneth", "description": "This pertains to harm on a vehicle's physical components, such as dents..." }, "sdk": { "config": { "pk": "YOUR_PUBLIC_KEY", "pid": "24140c74-fc6f-42f5-a0d2-24800b22d80a", "email": "mailer@mail.com", "phone": "2347064378577", "action": "claim", "progress": "inspection", "policy_id": "21dd7902-3448-4f96-ab10-81652d534a13", "business_id": "f19b711c-ce4b-4b10-9af7-6ebb84ea5d07", "claim_type": "Vehicle", "customer_id": "ae9e9db8-80cd-4469-be31-aa2cb8198ec9", "first_name": "Arthur", "currency_code": "NGN", "policy_number": "110105102401479" }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQktfV..." }, "created_at": "2024-08-29T19:50:22.357Z", "updated_at": "2025-12-31T13:29:39.176Z" }, "event": "claim.submitted", "status": "processed", "event_id": "SeCOzLVdJ6MG8gvQH_eQd" } ``` ```json [claim.approved] { "data": { "meta": { "date": "2024-08-20", "time": "10:10", "address": "Creek road nembe", "interior": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": "interior" }, "back_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "dashboard": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": "dashboard" }, "left_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "loss_type": [ "Collision" ], "timestamp": "2024-08-29T20:04:18.994Z", "video_url": "https://s3.eu-west-2.amazonaws.com-blob", "front_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "right_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "geolocation": "Alimosho, Lagos State, 100314, Nigeria", "account_name": "chigozie sunday ezenwa", "incident_type": "Accidental damage", "account_number": "0062746853", "chassis_number": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": "chassis_number" }, "is_third_party": false, "payment_method": "bank transfer", "status_time_line": [ { "name": "Pending", "time_stamp": "Aug 29, 2024 9:05 PM" }, { "name": "Inspection submitted", "time_stamp": "Aug 29, 2024 9:06 PM" }, { "name": "Reviewing", "time_stamp": "Aug 29, 2024 9:07 PM" }, { "name": "Approved", "time_stamp": "Aug 29, 2024 9:07 PM" } ], "inspection_device_type": "Android" }, "essential": { "type": "Vehicle", "status": "Approved", "policy_id": "21dd7902-3448-4f96-ab10-81652d534a13", "product_id": "24140c74-fc6f-42f5-a0d2-24800b22d80a", "customer_id": "ae9e9db8-80cd-4469-be31-aa2cb8198ec9", "description": "Tell us how the incident happened ", "incident_date": "2024-08-20", "claimant_email": "mailer@mail.com", "additional_info": [ { "id": "3b9c1c63-05ce-4047-bd67-804f9c80ef46", "type": "text", "label": "Bumper", "profile": "mca_admin", "data_or_url": "", "description": "mqasmxs" } ], "claimant_last_name": "Golden", "claimant_first_name": "Arthur" }, "sdk": { "config": { ... "action": "claim", "progress": "repair_estimate", "claim_type": "Vehicle" ... }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQktfV..." }, "created_at": "2024-08-29T19:50:22.357Z", "updated_at": "2025-12-31T13:29:39.176Z" }, "event": "claim.approved", "status": "processed", "event_id": "tPtKJn1H-vG-WGBYzzKcT" } ``` ```json [claim.disapproved] { "data": { "meta": { "date": "2024-08-20", "time": "10:10", "address": "Creek road nembe", "interior": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "back_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "bank_code": "232", "bank_name": "Sterling Bank", "dashboard": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "left_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "loss_type": [ "Collision" ], "timestamp": "2024-08-29T20:04:18.994Z", "video_url": "https://s3.eu-west-2.amazonaws.com-blob", "front_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "right_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "geolocation": "Alimosho, Lagos State, 100314, Nigeria", "account_name": "chigozie sunday ezenwa", "incident_type": "Accidental damage", "account_number": "0062746853", "chassis_number": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "is_third_party": false, "status_time_line": [ { "name": "Pending", "time_stamp": "Aug 29, 2024 9:05 PM" }, { "name": "Inspection submitted", "time_stamp": "Aug 29, 2024 9:06 PM" }, { "name": "Reviewing", "time_stamp": "Aug 29, 2024 9:07 PM" }, { "name": "Declined", "time_stamp": "Wed, Mar 25, 2026, 3:37 PM" } ], "inspection_device_type": "Android", "is_third_party_insured": false }, "essential": { "comment": "This is the reason for the rejection...", "type": "Vehicle", "status": "Declined", "policy_id": "21dd7902-3448-4f96-ab10-81652d534a13", "product_id": "24140c74-fc6f-42f5-a0d2-24800b22d80a", "customer_id": "ae9e9db8-80cd-4469-be31-aa2cb8198ec9", "description": "Tell us how the incident happened ", "incident_date": "2024-08-20", "claimant_email": "mailer@mail.com", "additional_info": null, "claimant_last_name": "Golden", "claimant_first_name": "Arthur" }, "sdk": { "config": { ... "action": "claim", "progress": "inspection", "claim_type": "Vehicle", ... }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQktfV..." }, "created_at": "2024-08-29T19:50:22.357Z", "updated_at": "2025-12-31T13:29:39.176Z" }, "event": "claim.disapproved", "status": "processed", "event_id": "iGaOUrqlt2Oui2cIxUl7t" } ``` ```json [claim.offer_sent] { "data": { "meta": { "date": "2024-08-20", "time": "10:10", "address": "Creek road nembe", "interior": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "back_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "bank_code": "232", "bank_name": "Sterling Bank", "dashboard": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "left_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "loss_type": [ "Collision" ], "timestamp": "2024-08-29T20:04:18.994Z", "video_url": "https://s3.eu-west-2.amazonaws.com-blob", "front_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "right_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "geolocation": "Alimosho, Lagos State, 100314, Nigeria", "account_name": "chigozie sunday ezenwa", "incident_type": "Accidental damage", "account_number": "0062746853", "chassis_number": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "is_third_party": false, "status_time_line": [ { "name": "Pending", "time_stamp": "Aug 29, 2024 9:05 PM" }, { "name": "Inspection submitted", "time_stamp": "Aug 29, 2024 9:06 PM" }, { "name": "Reviewing", "time_stamp": "Aug 29, 2024 9:07 PM" }, { "name": "Approved", "time_stamp": "Wed, Mar 25, 2026, 3:37 PM" }, { "name": "Offer sent", "time_stamp": "Wed, Mar 25, 2026, 4:37 PM" } ], "inspection_device_type": "Android", "is_third_party_insured": false }, "essential": { "type": "Vehicle", "status": "Offer sent", "policy_id": "21dd7902-3448-4f96-ab10-81652d534a13", "product_id": "24140c74-fc6f-42f5-a0d2-24800b22d80a", "customer_id": "ae9e9db8-80cd-4469-be31-aa2cb8198ec9", "description": "Tell us how the incident happened ", "incident_date": "2024-08-20", "claimant_email": "mailer@mail.com", "additional_info": null, "claimant_last_name": "Golden", "claimant_first_name": "Arthur" }, "sdk": { "config": { ... "action": "claim", "progress": "offer", "claim_type": "Vehicle", ... }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQktfV..." }, "created_at": "2024-08-29T19:50:22.357Z", "updated_at": "2025-12-31T13:29:39.176Z" }, "event": "claim.offer_sent", "status": "processed", "event_id": "iGaOUrqlt2Oui2cIxUl7t" } ``` ```json [claim.offer_rejected] { "data": { "meta": { "date": "2024-08-20", "time": "10:10", "address": "Creek road nembe", "interior": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "back_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "bank_code": "232", "bank_name": "Sterling Bank", "dashboard": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "left_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "loss_type": [ "Collision" ], "timestamp": "2024-08-29T20:04:18.994Z", "video_url": "https://s3.eu-west-2.amazonaws.com-blob", "front_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "right_side": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": false }, "geolocation": "Alimosho, Lagos State, 100314, Nigeria", "account_name": "chigozie sunday ezenwa", "incident_type": "Accidental damage", "account_number": "0062746853", "chassis_number": { "img_url": "https://s3.eu-west-2.amazonaws.com...png", "approved": true }, "is_third_party": false, "status_time_line": [ { "name": "Pending", "time_stamp": "Aug 29, 2024 9:05 PM" }, { "name": "Inspection submitted", "time_stamp": "Aug 29, 2024 9:06 PM" }, { "name": "Reviewing", "time_stamp": "Aug 29, 2024 9:07 PM" }, { "name": "Approved", "time_stamp": "Wed, Mar 25, 2026, 3:40 PM" }, { "name": "Offer sent", "time_stamp": "Wed, Mar 25, 2026, 3:50 PM" }, { "name": "Offer rejected", "time_stamp": "Wed, Mar 26, 2026, 4:00 PM" } ], "inspection_device_type": "Android", "is_third_party_insured": false }, "essential": { "comment": "This is the reason for the offer rejection...", "type": "Vehicle", "status": "Offer rejected", "policy_id": "21dd7902-3448-4f96-ab10-81652d534a13", "product_id": "24140c74-fc6f-42f5-a0d2-24800b22d80a", "customer_id": "ae9e9db8-80cd-4469-be31-aa2cb8198ec9", "description": "Tell us how the incident happened ", "incident_date": "2024-08-20", "claimant_email": "mailer@mail.com", "additional_info": null, "claimant_last_name": "Golden", "claimant_first_name": "Arthur" }, "sdk": { "config": { ... "action": "claim", "progress": "status", "claim_type": "Vehicle", ... }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQktfV..." }, "created_at": "2024-08-29T19:50:22.357Z", "updated_at": "2025-12-31T13:29:39.176Z" }, "event": "claim.offer_rejected", "status": "processed", "event_id": "iGaOUrqlt2Oui2cIxUl7t" } ``` ```json [claim.updated] { "data": { "meta": { ... }, "essential": { "type": "Gadget", "status": "Inspection submitted", "policy_id": "21dd7902-3448-4f96-ab10-81652d534a13", "product_id": "24140c74-fc6f-42f5-a0d2-24800b22d80a", "customer_id": "ae9e9db8-80cd-4469-be31-aa2cb8198ec9", "description": "Tell us how the incident happened ", "incident_date": "2024-08-20", "claimant_email": "mailer@mail.com", "additional_info": null, "claimant_last_name": "Golden", "claimant_first_name": "Arthur" }, "sdk": { "config": { ... "action": "claim", "progress": "status", "claim_type": "Gadget", ... }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQktfV..." }, "created_at": "2024-08-29T19:50:22.357Z", "updated_at": "2025-12-31T13:29:39.176Z" }, "event": "claim.updated", "status": "processed", "event_id": "iGaOUrqlt2Oui2cIxUl7t" } ``` :: ### Inspection This event is triggered whenever a pre-loss inspection is completed. ::code-group ```json [inspection.completed] { "data": { "meta": { "policy": { "email": "vauwaketteissu-9756@yopmail.com", "amount": "350000.0000", "last_name": "italawaasw", "first_name": "italowaaah", "product_id": "45140c74-fc6f-42f5-a0d2-66800b22d999", "customer_id": "7de326d2-c0b0-4f74-91ee-29b680593fff", "policy_number": "OJ152221010245", "certificate_url": "https://s3.eu-west-2.amazonaws.com...", "expiration_date": "2027-02-17T00:00:00.000Z" }, "category": "preloss", "progress": "submission", "policy_id": "b494dba7-df0e-4647-aa1a-17a6251ad123", "timestamp": "23:00", "video_url": "https://s3.eu-west-2.amazonaws.com...blob", "public_key": "aed22457-722b-4c94-81c8-c7780bdc7368", "business_id": "f19b711c-ce4b-4b10-9af7-6ebb84ea5d07", "currency_id": "6b3147f9-aa5b-4fd9-934d-ee5a179db989", "geolocation": "Okporo Road, Rumuodara, Obio/Akpor, Rivers, 500211, Nigeria", "inspection_type": "Vehicle", "vehicle_category": "Car", "inspection_images": { "left": "https://s3.eu-west-2.amazonaws.com...png", "rear": "https://s3.eu-west-2.amazonaws.com...png", "front": "https://s3.eu-west-2.amazonaws.com...png", "right": "https://s3.eu-west-2.amazonaws.com...png", "interior": "https://s3.eu-west-2.amazonaws.com...png", "dashboard": "https://s3.eu-west-2.amazonaws.com...png", "chassis_number": "https://s3.eu-west-2.amazonaws.com...png" }, "inspection_duration": "500", "inspection_device_type": "Phone" }, "essential": { "type": "Vehicle", "status": "completed", "category": "preloss", "end_date": "2026-02-16", "policy_id": "b494dba7-df0e-4647-aa1a-17a6251ad123", "start_date": "2026-01-17", "is_approved": false, "inspection_report_url": null }, "sdk": { "config": { "pk": "YOUR_PUBLIC_KEY", "pid": "45140c74-fc6f-42f5-a0d2-66800b22d999", "email": "vauwaketteissu-9756@yopmail.com", "phone": "2348091233123", "action": "claim", "progress": "submission", "policy_id": "b494dba7-df0e-4647-aa1a-17a6251ad123", "business_id": "f19b711c-ce4b-4b10-9af7-6ebb84ea5d07", "claim_type": "Vehicle", "customer_id": "7de326d2-c0b0-4f74-91ee-29b680593fff", "first_name": "italowaaah", "currency_code": "NGN", "policy_number": "OJ152221010245" }, "claim_link": "https://mycover.ai/purchase?q=eyJwayI6Ik1DQVBVQktfVEV..." }, "created_at": "2026-02-17T19:58:25.396Z", "updated_at": "2026-02-17T19:58:25.396Z" }, "event": "inspection.completed", "status": "processed", "event_id": "zrELhU1462se8_pidjhUg" } ``` :: # Messaging ## Email Notifications 1. Purchase Confirmation: When a customer buys a plan. 2. Registration OTP: Verification code for registration and activation. 3. Purchase Success: Notification confirming successful purchase. 4. Activation/Policy Completion: Links for activation or inspection to complete policy registration. 5. Claim Lodgement: Notification when a claim is lodged. 6. Claim Offer: Notification when a claim offer is generated. ## SMS Notifications 1. Policy Details: Sending policy details to the policy owner. 2. Inspection Success: Notification when an inspection is completed successfully. 3. Claim Offer: Notification when a claim offer is generated. ## Selecting Communication Preferences You can customise your notification settings according to your preferences on the distributor dashboard. If you wish to disable all notifications to customers, toggle off all options for notifications. ![MyCover.Ai Documentation](https://docs.mycover.ai/to-preferences.webp) ![MyCover.Ai Documentation](https://docs.mycover.ai/preferences.webp) # Write beautiful docs with Markdown ::u-page-hero --- class: homepage-hero --- #title ![MyCover.Ai Documentation](https://docs.mycover.ai/hero.webp) #description Welcome to the MyCover.ai documentation! Make insurance purchase a swift, simple, and delightful experience for your users with our APIs and low-code tools. #links :::u-button --- class: "!text-white" color: primary size: xl to: https://docs.mycover.ai/getting-started/quick-start trailing-icon: i-lucide-arrow-right --- Get started ::: :: ::u-page-section #title Explore Products #features :::u-page-feature --- icon: i-lucide-car to: https://docs.mycover.ai/api-preference/products/auto --- #title Auto #description Sell and manage auto insurance from a variety of providers. ::: :::u-page-feature --- icon: i-lucide-heart to: https://docs.mycover.ai/api-preference/products/health --- #title Health #description Access health insurance providers and process medical coverage. ::: :::u-page-feature --- icon: i-lucide-plane to: https://docs.mycover.ai/api-preference/products/travel --- #title Travel #description Provide travel insurance for Schengen and non-Schengen countries. ::: :::u-page-feature --- icon: i-lucide-monitor to: https://docs.mycover.ai/api-preference/products/gadget --- #title Gadget #description Protect gadgets through our providers and manage claims easily. ::: :::u-page-feature --- icon: i-lucide-package to: https://docs.mycover.ai/api-preference/products/package --- #title Package #description Ensure protection for goods in transit to logistic businesses & operations. ::: :::u-page-feature --- icon: i-lucide-house-heart to: https://docs.mycover.ai/api-preference/products/life --- #title Life #description Offer businesses protection against customer loan defaults. ::: :::u-page-feature --- icon: i-lucide-sofa to: https://docs.mycover.ai/api-preference/products/content --- #title Content #description Process protection for the contents of homes and offices. ::: :::u-page-feature --- icon: i-lucide-sparkles to: https://docs.mycover.ai/products --- #title More #description Browse all the insurance products we offer. ::: ::