SDKs
NextThe Python and TypeScript SDKs, and tools for LangChain and the OpenAI Agents SDK.
Coming next. Both SDKs are previews in the engine repository (
sdks/), working against the sandbox. They are not yet published to PyPI or npm.
| Python | TypeScript | |
|---|---|---|
| Package | tatvapay (sdks/python) |
@tatvapay/sdk (sdks/typescript) |
| Needs | httpx, cryptography |
nothing: fetch and WebCrypto (Node 22+, browsers, Deno, Bun) |
| Client | TatvaPay(base_url, api_key=…, agent_id=…, private_key=…) |
new TatvaPay({ baseUrl, apiKey, agentId, privateJwk }) |
Both do the same things:
- Keys: make Ed25519 key pairs, save and load private JWK files, thumbprints.
- Signing: every agent request carries
TatvaPay-Agent-Signatureover the method, path, body hash, time and a nonce. - Calls: register agents, list sellers, ask for and make quotes, preview, pay (with an
Idempotency-Key), read payments, ask for refunds and mandates. - Receipts: verify offline against
/.well-known/tatvapay-keys.json(how). - HTTP 402:
fetch_paid/fetchPaidfor buyers,Paywallfor sellers (how).
Both are tested against the same vectors, made by the engine's own code, so a signature or a receipt check means the same thing in either language.
Agent frameworks
examples/agent_tools/tatvapay_tools.py turns the Python SDK into tools:
from tatvapay_tools import langchain_tools, openai_agents_tools
tools = langchain_tools(client) # LangChain StructuredTools
tools = openai_agents_tools(client) # OpenAI Agents SDK FunctionTools
They are the buyer's tools (find, quote, check, pay, receipt). None approves: payments above the mandate's limit come back requires_approval.
Last updated 1 October 2026
Something unclear or wrong? Tell us