# Developer overview

> Choose REST API, MCP, widgets, webhooks or analytics, and build a Komashi integration using the correct authentication and provider context.

Canonical: https://komashi.com/docs/provider/Developers/who-is-a-developer/
Language: en

Connect Komashi to your application, website or AI assistant. You can use the integration methods together: for example, embed a subscription widget, receive subscription changes through webhooks, and read usage from the REST API.

## Choose an integration

| You want to… | Use | Start here |
| --- | --- | --- |
| Read and manage customers, subscriptions, invoices and usage from your backend | REST API with a provider API key | [REST API integration](https://komashi.com/docs/provider/Developers/api-integration/index.md) |
| Let an AI assistant work with your connected businesses | MCP with an OAuth 2.1 user connection | [MCP integration](https://komashi.com/docs/provider/Developers/mcp-integration/index.md) |
| Add a ready-made service selection or subscription interface to your website | Embeddable widgets | [Embed widgets](https://komashi.com/docs/provider/Developers/widget-integration/index.md) |
| Receive notifications when selected records change | Outgoing webhooks | [Webhooks](https://komashi.com/docs/provider/Settings/11webhooks/index.md) |
| Measure visits and customer journeys | Google Analytics, Microsoft Clarity or PostHog | [Analytics & tracking](https://komashi.com/docs/provider/Settings/13analytics/index.md) |

## Use Komashi documentation through Context7

Komashi is also available in Context7. If your coding assistant has Context7 connected, add the relevant source to your task so it can retrieve Komashi documentation while helping you build an integration:

- [Komashi documentation on Context7](https://context7.com/llmstxt/komashi_llms-full_txt) — guides covering setup, integrations and platform features.
- [Komashi OpenAPI reference on Context7](https://context7.com/openapi/komashi_api-docs_spec) — REST API operations and request/response schemas.

For example, give your assistant this instruction:

```text
Use Context7 to read the Komashi documentation and OpenAPI reference:
https://context7.com/llmstxt/komashi_llms-full_txt
https://context7.com/openapi/komashi_api-docs_spec

Use these sources to help me integrate Komashi into my application.
Check the documented endpoints and required fields before writing code.
```

Context7 supplies documentation context. To read or change your account's actual data, connect through the [REST API](https://komashi.com/docs/provider/Developers/api-integration/index.md) or [MCP](https://komashi.com/docs/provider/Developers/mcp-integration/index.md) with the appropriate authentication.

## Where to configure integrations

Open the provider's **Control Center**. The sidebar's **Integration** group contains **API**, **Webhooks**, **Widgets** and **Analytics**.

[![Control Center with the Integration navigation and API Keys page](https://komashi.com/docs/assets/images/integrations-api-keys.png)](/assets/images/integrations-api-keys.png)

The provider you have selected determines which keys, webhooks, widget examples and analytics settings you see. Switch to the correct business before configuring an integration.

MCP is an account connection: open your account **Settings → MCP** to review active connections. It authenticates you as a user and lets you select one of your linked providers. It does not use the provider API keys shown on the API page.

## Understand the data model

| Concept | What it represents |
| --- | --- |
| Provider | The business whose data you manage. |
| Service | A product or service sold by that business. |
| Plan | A package within a service. |
| Period | The billing interval or fixed term associated with a plan. |
| Add-on and option | An extra feature, variant or usage allowance. |
| Customer and contact | The billing customer and its contact people. |
| Subscription | An individual subscribed item with its own status and dates. |
| Subscription group | Related subscription items created through the same checkout. A group ID and subscription ID are different identifiers. |
| Usage | The consumption recorded against an individual subscription. |

Discover IDs through API responses or MCP tools. Names, storefront slugs and identifiers are not interchangeable.

## Build your first integration

1. Configure the service, plans, billing periods and prices in Komashi.
2. Choose how the customer will interact with it: your own frontend, a widget or the Komashi storefront.
3. For a backend integration, create a separate [API key](https://komashi.com/docs/provider/Settings/10api/index.md) and make a read-only request first. For an AI assistant, complete the [MCP connection](https://komashi.com/docs/provider/Developers/mcp-integration/index.md) instead.
4. Read the existing catalog before creating customer or subscription records. Use the returned IDs.
5. For a payable subscription flow, send the customer to the returned checkout URL. Determine subscription access from Komashi's subscription state rather than a browser return URL alone.
6. Add webhooks for the events your system needs, and reconcile important records through the API.
7. Configure analytics if you need visitor measurement; it serves a different purpose from operational webhooks.

Keep provider API keys on your backend. A widget embed contains public configuration such as a service ID and does not require an API key in the browser.

## Common integration patterns

**A subscription website:** embed the Service Picker and let Komashi display the configured plans. Handle any business-specific access rules in your application and use API lookups or webhooks to keep them current.

**An existing SaaS application:** use the REST API to connect your customer records, create subscription checkout flows and record usage. `sync-usage` sets an absolute total; `adjust-usage` applies an increase or decrease.

**An AI-assisted workflow:** connect through `https://mcp.komashi.com/`, choose the business, and ask the assistant to inspect the catalog, manage records or prepare setup drafts. Review the proposed changes before approving actions.

Continue with [REST API](https://komashi.com/docs/provider/Developers/api-integration/index.md), [MCP](https://komashi.com/docs/provider/Developers/mcp-integration/index.md), [widgets](https://komashi.com/docs/provider/Developers/widget-integration/index.md) or [webhooks](https://komashi.com/docs/provider/Settings/11webhooks/index.md).
