KwitKwit Docs

API v1 overview

Base URL, authentication, and endpoint map

llms.txtBase URL, authentication, and endpoint map

Base URL

https://api.kwit.dev/v1

All paths below are relative to /v1.

Authentication

Every request requires:

Authorization: Bearer kwit_live_<your_key>

Keys are created in the dashboard (Developers → API Keys). Invalid or expired keys return 401 with { "error": "Invalid or expired API key" }.

Use the @kwit/sdk for typed requests, retries on 429/5xx, and webhook verification.

Endpoint map

ResourceMethods
CustomersPOST /customers, GET /customers/:id/state, POST /customers/:id/meter-credits
CheckoutPOST /checkout, GET /checkout/:sessionId
PortalPOST /portal/sessions
ProductsPOST /products, GET /products, GET /products/:id, PATCH /products/:id/meter-prices
DiscountsPOST /discounts, GET /discounts/:id, POST /discounts/validate
SubscriptionsPOST /subscriptions, GET /subscriptions/:id, POST /subscriptions/:id/cancel
Checkout linksPOST /checkout-links, GET /checkout-links/:id
Usage billingPOST /events/ingest, GET /events, POST /meters, GET /meters, PATCH /meters/:id, DELETE /meters/:id

Validation errors

400 responses return Zod field errors:

{
  "error": {
    "email": ["Invalid email"]
  }
}

See Errors.

On this page