> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.trygrant.com/introduction/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.trygrant.com/_mcp/server. # Introduction Grant is a billing platform that helps you meter usage, manage customers and subscriptions, and generate invoices. The Grant API gives you programmatic access to every part of the billing lifecycle. ## Core concepts | Concept | Description | | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Customers** | The people or organizations you bill. Each customer can have billing and shipping addresses, an external ID for mapping to your system, and one or more subscriptions. | | **Subscriptions** | Link a customer to a plan. Subscriptions track status, billing anchor day, and renewal dates. | | **Invoices** | Itemized bills sent to customers. Invoices follow a lifecycle from `draft` to `open` to `paid` (or `void` / `uncollectible`). Line items can be added, updated, and removed while in draft. | | **Events** | Billable usage events you send to Grant. Events are identified by an idempotency key and processed asynchronously via a durable queue. | ## How it works #### Send usage events Instrument your application to send billable events to the `/v1/events/ingest` endpoint whenever metered activity occurs (API calls, compute time, storage, etc.). #### Manage customers and subscriptions Create customers and attach them to plans via subscriptions. Grant tracks billing periods and renewal dates automatically. #### Generate invoices Create draft invoices, add line items, and finalize them to assign an invoice number and open them for payment. Grant provides a hosted payment page for each finalized invoice. ## API design The Grant API follows these conventions: * **Base URL** — `https://api.trygrant.com` * **Authentication** — Bearer token via API key (see [Authentication](/api-reference/authentication)) * **Content type** — All request and response bodies are `application/json` * **Pagination** — List endpoints use cursor-based pagination with `limit` and `cursor` query parameters * **Error format** — Errors return `{ success: false, error: { code, message }, request_id }` * **Rate limiting** — 1,000 requests per minute per company. Rate limit headers (`X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`) are included on every response. ## Next steps #### [Quickstart](/quickstart) Send your first event and create an invoice in under 5 minutes #### [Authentication](/api-reference/authentication) Learn how to authenticate your API requests #### [API reference](/api-reference) Browse the full API reference with interactive examples > API documentation for Grant — billing infrastructure for usage-based pricing