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 raisesPaywallErrorwith a message and a checkout link. - Paid MCP tools.
create_solvapay_mcp_serverbuilds an MCP server where customers sign in with SolvaPay. It adds the built-inaccountandactivate_plantools and the checkout widget that ChatGPT and Claude open in the chat. - Webhooks.
verify_webhookchecks thesv-signatureheader and returns the parsed event. - API client.
AsyncApiClientandApiClientcover every SolvaPay SDK API operation, generated from the same spec as the TypeScript SDK. - Agent payments (preview).
solvapay.agentslets SolvaPay agents pay for each tool call.
Pages
Same behaviour as the TypeScript SDK
The paywall, its messages, theaccount 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.