Skip to main content
The Python SDK (solvapay on PyPI) connects your Python service to SolvaPay. It needs Python 3.10 or later, is fully typed, and is async-first.

What it does

  • Paid functions. @solvapay.payable() checks each call against the customer’s plan, runs your function when the call is allowed, and records the usage. When the call isn’t allowed, it raises PaywallError with a message and a checkout link.
  • Paid MCP tools. create_solvapay_mcp_server builds an MCP server where customers sign in with SolvaPay. It adds the built-in account and activate_plan tools and the checkout widget that ChatGPT and Claude open in the chat.
  • Webhooks. verify_webhook checks the sv-signature header and returns the parsed event.
  • API client. AsyncApiClient and ApiClient cover every SolvaPay SDK API operation, generated from the same spec as the TypeScript SDK.
  • Agent payments (preview). solvapay.agents lets SolvaPay agents pay for each tool call.

Pages

Same behaviour as the TypeScript SDK

The paywall, its messages, the account and activate_plan answers, the widget’s tools and webhook verification behave the same as in the TypeScript SDK. A shared conformance suite checks this on every change.