Paid AI Python SDK

raw JSON →
1.8.0 verified Mon Apr 27 auth: no python

Official Python SDK for the Paid API (https://paid.ai). Provides sync and async clients to manage subscriptions, orders, checkouts, webhooks, customer portal sessions, credit balances, and more. Currently at version 1.8.0, with frequent releases adding new sub-clients. Requires Python >=3.10 <3.14.

pip install paid-python
error AttributeError: module 'paid' has no attribute 'Paid'
cause Importing incorrectly, e.g., `import paid` instead of `from paid import Paid`.
fix
Use from paid import Paid.
error PaidAPIError: Unauthorized
cause Missing or invalid API key.
fix
Ensure api_key is set correctly via constructor or environment variable PAID_API_KEY.
error TypeError: Client.__init__() missing 1 required positional argument: 'api_key'
cause Instantiating client without an API key.
fix
Pass api_key='sk-...' or set PAID_API_KEY environment variable.
error ModuleNotFoundError: No module named 'paid'
cause Package not installed or installed in wrong environment.
fix
Run pip install paid-python in the correct Python environment.
gotcha The SDK uses fern-generated client patterns. Do not instantiate sub-clients directly (e.g., `client.products` not `Products(client)`). Always access sub-resources via the main client.
fix Use `client.products.list()` instead of `Products(client).list()`.
gotcha API key must be passed explicitly or via environment variable `PAID_API_KEY`. The SDK does not automatically read from environment.
fix Set `PAID_API_KEY` environment variable or pass `api_key='sk-...'` to the client constructor.
deprecated The `create_checkout` method on the Checkouts client now accepts an optional `currency` parameter (added in 1.7.2). Previous versions may ignore currency.
fix Upgrade to >=1.7.2 and pass `currency='usd'` to `client.checkouts.create()`.

Initialize the sync client and list products. Async client is `from paid import AsyncPaid` with same instantiation.

from paid import Paid

client = Paid(
    api_key=os.environ.get('PAID_API_KEY', ''),
)

# List products
products = client.products.list()
print(products)