Skip to main content

Python and Go SDKs

SolvaPay now has SDKs for Python and Go, next to the TypeScript SDK. Each covers the server side:
  • Make a function paid: each call is checked against the customer’s plan and billed when it succeeds.
  • Paid and free MCP tools, with SolvaPay sign-in, the built-in account and activate_plan tools, and the checkout widget on MCP Apps hosts.
  • Webhook verification.
  • The full SolvaPay API, generated from the same spec as the TypeScript types.
The paywall, its messages, the account tool’s answers and webhook verification behave the same in all three SDKs. A shared conformance suite checks the Python and Go SDKs against the TypeScript SDK on every change. Each SDK has its own version line, starting at 0.1.0 (Go tags are go/vX.Y.Z), so the numbers don’t line up across languages. Python and Go have no frontend packages, but the React checkout components work with a Python or Go backend: see React web checkout for Python and Go.

The CLI for Python and Go

The SolvaPay CLI now sets up Python and Go projects too. It runs on Node.js 22 or later:
  • npx solvapay init detects the language from go.mod, uv.lock, poetry.lock, pyproject.toml, requirements.txt or package.json. It signs you in, writes SOLVAPAY_SECRET_KEY and SOLVAPAY_PRODUCT_REF to .env, and adds the SDK pinned exactly with uv add, poetry add or go get. For plain pip it prints the install command. When the folder has files for two languages, or none, pass --language ts|python|go.
  • npm create solvapay@latest my-server -- --type mcp --language python (or go) scaffolds a paid MCP server with one paid tool, one free tool, tests and a Dockerfile.
  • npx solvapay doctor checks that the SDK is the newest release in every language the project uses, and prints the upgrade command.
  • npx solvapay verify <server url> checks a running MCP server in any language.
In a folder with no project files, init --yes no longer creates a package.json on its own. Pass --language ts for that. See CLI setup. See the Python SDK and the Go SDK.

Agent payments (preview)

SolvaPay agents can pay for your API or MCP tools per call. Each paid call is authorized with SolvaPay before it runs and completed at its actual cost. The TypeScript (@solvapay/agents), Python (solvapay[agents]) and Go (github.com/solvapay/solvapay-sdk/go/agents) SDKs support it. Agent payments are in preview and have to be turned on for your account. See agent payments for TypeScript, Python and Go.