Registry / payments / dodopayments

dodopayments

JSON →
library1.102.1pypypi✓ verified 83d ago

The official Python library for the Dodo Payments API. Provides convenient access to Dodo Payments' REST API, supporting payments, subscriptions, invoices, and webhooks. Current version: 1.102.1. Uses a client-based pattern with synchronous and async support. Released frequently with API updates.

pip install dodopayments
INSTALL
IMPORT
SIG · DODOPAYMENTS
D
dodopayments
paymentspythonv1.102.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DodoPayments
from dodopayments import DodoPayments
import dodopayments
The library exposes the client via a class, not module-level functions.

Initialize the client with your bearer token and list recent payments.

from dodopayments import DodoPayments client = DodoPayments( bearer_token=os.environ.get('DODOPAYMENTS_BEARER_TOKEN', '') ) try: payments = client.payments.list(limit=10) print(payments) except Exception as e: print(f"Error: {e}")
Debug
Known issues
breakingVersion 1.0.0 changed from a module-level API to a client-based pattern. Old code using `dodopayments.Payment.list()` must be updated to `client.payments.list()`.
fix
Upgrade to >=1.0.0 and instantiate `DodoPayments` client with your bearer token.
affects: <1.0.0
deprecatedThe `asyncio` parameter in `DodoPayments()` constructor is deprecated in v1.50.0 and removed in v1.60.0. Use the async client `AsyncDodoPayments` instead.
fix
Replace `DodoPayments(bearer_token=..., asyncio=True)` with `AsyncDodoPayments(bearer_token=...)`.
affects: >=1.50.0 <1.60.0
gotchaBearer token must be provided as a keyword argument, not positional. Incorrect: `DodoPayments('sk_test_...')`
fix
Use `DodoPayments(bearer_token='sk_test_...')`
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'dodopayments'
Library not installed.
fix
Run `pip install dodopayments`
AttributeError: module 'dodopayments' has no attribute 'Payment'
Trying to use old module-level API from v<1.0.0 after upgrade to v1+.
fix
Instantiate client: `from dodopayments import DodoPayments` then `client = DodoPayments(bearer_token=...)` and use `client.payments.list()`
TypeError: DodoPayments() missing 1 required positional argument: 'bearer_token'
Bearer token not provided or provided as positional argument incorrectly.
fix
Provide as keyword: `DodoPayments(bearer_token='your_token')`
DodoPaymentsError: 401 Unauthorized
Invalid or expired bearer token.
fix
Check your bearer token from Dodo Payments dashboard and ensure it is passed correctly.
Upgrade
Version history
1.102.1latest on PyPI · released Jun 6, 2026
Audit
Dependencies
httpxrequiredHTTP client library used for API requests
pydanticrequiredData validation and serialization
Agent activity
35 hits · last 30 days
node
30
OpenAI (training)
1
Resources
dodopayments — pip install dodopayments · libregistry