Python SDK
Vatly is the European Merchant of Record for AI, software and digital products. Use this SDK for typed API calls from Python 3.10+. For a storage-backed billing integration, use Fluent Python or Vatly Django.
Alpha — under active development. Every alpha release may include breaking changes. Pin exact versions during alpha.
Install and connect
python -m pip install vatly-api-python==0.1.0a3
Set VATLY_API_KEY in your server environment. Test and live keys use the same
API host; the key selects the mode. Never put credentials in client-side code.
from vatly import VatlyClient
def example():
with VatlyClient() as client:
return client.customers.list({"limit": 10}).data
Resource-page functions accept that configured client. Copy a function, then call
example(client) inside the with block. Replace example resource IDs with your
own. Creation, updates, cancellations and refunds mutate the selected account.
Async applications
from vatly import AsyncVatlyClient
async def example():
async with AsyncVatlyClient() as client:
return [customer.id async for customer in client.customers.list_all({"limit": 25})]
Async resource methods use await; pagination uses async for. Both clients
return Pydantic models. Python fields use snake_case; dictionary inputs use Vatly's
camelCase wire keys. Unknown response fields are preserved.
Choose a guide
| Guide | What you can do |
|---|---|
| Configuration | Set timeouts, retries and handle errors |
| Customers | Create/find customers and open their portal |
| Checkouts | Build a hosted one-off or recurring payment |
| Subscriptions | Change plans, cancel, resume and update billing |
| Subscription plans | Manage recurring catalog products |
| One-off products | Manage one-time catalog products |
| Orders | Read lines, totals and invoice links |
| Refunds | Refund an order and track reversals |
| Chargebacks | Read payment disputes |
| Webhooks | Verify raw signed deliveries |
| Webhook endpoints | Register and manage receivers |
| API inventory | Look up every method and endpoint |
| Development | Contribute, regenerate models and run checks |
API reference contains the complete request
and response contracts. Examples in these guides are executed against published
0.1.0a3 packages with local HTTP fixtures; tests make no Vatly account changes.