Skip to main content
FlexPrice provides native SDKs for Go, Python, and TypeScript/JavaScript, plus an MCP server for AI assistants. All SDKs are generated from the same OpenAPI spec, ensuring consistency across languages.

Available SDKs

Go SDK

Type-safe Go client with async batching support

Python SDK

Sync and async Python client with Pydantic models

TypeScript SDK

ESM and CommonJS support with full TypeScript types

MCP Server

Model Context Protocol server for AI assistants

Quick Comparison

FeatureGoPythonTypeScriptMCP
Packagegithub.com/flexprice/flexprice-go/v2flexprice@flexprice/sdk@flexprice/mcp-server
Min VersionGo 1.20+Python 3.10+Node.js 18+Node.js 20+
Async Support✓ (Batching)✓ (Native)✓ (Promise-based)N/A
Type Safety✓ (Pydantic)✓ (TypeScript)
Install Commandgo getpip installnpm installnpx
Best ForBackend services, high-volume eventsDjango/Flask apps, data pipelinesNode.js APIs, Next.js appsAI assistants, IDE integrations

Installation

go get github.com/flexprice/flexprice-go/v2

Common Features

All SDKs provide:
  • Full API coverage – Customers, plans, events, invoices, payments, entitlements, and more
  • Type-safe models – Request and response types generated from OpenAPI spec
  • Built-in retries – Automatic retry logic with exponential backoff
  • Error handling – Structured error responses with status codes
  • Authentication – Simple API key authentication via x-api-key header

Base URL Configuration

Always include /v1 in your base URL. Example: https://us.api.flexprice.io/v1
  • ✅ Correct: https://us.api.flexprice.io/v1
  • ❌ Wrong: https://us.api.flexprice.io (missing /v1)
  • ❌ Wrong: https://us.api.flexprice.io/v1/ (trailing slash)

Authentication

All SDKs use API key authentication:
1

Get your API key

Retrieve your API key from the FlexPrice dashboard
2

Store securely

Use environment variables (e.g., FLEXPRICE_API_KEY) – never hardcode keys
3

Initialize SDK

Pass the API key when creating the client (see language-specific guides)
API keys are for server-side use only. Never expose them in client-side code or public repositories.

Next Steps

Choose your language to get started:

Go SDK Guide

Go installation, initialization, and examples

Python SDK Guide

Python setup with sync and async examples

TypeScript SDK Guide

TypeScript/JavaScript integration guide

MCP Server Guide

Set up FlexPrice in Claude, Cursor, or VS Code