Go
Go 1.25 or newer. Typed errors and an async event batcher.
Python
Python 3.10 or newer. Sync and async clients.
TypeScript
Node.js 18+, Bun, Deno, and edge runtimes.
Installing a Flexprice SDK
Configuring the SDK client
Every SDK takes two values: an API key and a server URL. The key decides the environment. The URL decides the region and must include/v1 with no trailing slash.
Use
https://api.cloud.flexprice.io/v1 for tenants in the India region.
The same call in each SDK language
Create a customer, then record one usage event for it:What every SDK gives you
- Full coverage. Customers, plans, prices, features, entitlements, subscriptions, events, invoices, payments, wallets, credit notes, and the rest of the API, as one service per resource on the client.
- Retries. Off by default. Pass a retry config to the client and it retries
429and5xxresponses with backoff. Event ingestion is safe to retry becauseevent_iddedupes. - Typed errors. A
404,400,409, or429surfaces as a value you can inspect rather than a bare string. - Webhook models. Typed payload models for every webhook event, so a handler can parse the body without hand-written structs. See Webhooks.
- Field naming. The API uses
snake_case. Go and TypeScript expose idiomaticPascalCaseandcamelCasefields and convert on the wire. Python keepssnake_case.
Keep SDK keys on the server
The SDKs authenticate with an API key that can read and write your whole environment. Use them from backend code only. For browser and mobile code, generate a customer-scoped portal session or proxy through your backend. See Harden client-side access.SDK versioning and releases
SDK releases are listed in the changelog and on each package registry. The SDKs are regenerated when the API changes, so an endpoint added to the API may appear in the reference before it appears in an SDK. Until it does, call it directly with the HTTP client of your choice; the SDK’s key and base URL work unchanged.Using the SDKs
Every SDK task in Go, Python, and TypeScript on one page: events, idempotency, errors, retries, pagination, and webhooks.
Example app
A React app that wires the TypeScript SDK end to end: client setup, usage events, and analytics.

