{"id":44781,"library":"dodopayments","title":"Dodo Payments Python Library","description":"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.","status":"active","version":"1.102.1","language":"python","source_language":"en","source_url":"https://github.com/dodopayments/dodopayments-python","tags":["dodo payments","payments","api client"],"install":[{"cmd":"pip install dodopayments","lang":"bash","label":"Install latest"}],"dependencies":[{"reason":"HTTP client library used for API requests","package":"httpx","optional":false},{"reason":"Data validation and serialization","package":"pydantic","optional":false}],"imports":[{"note":"The library exposes the client via a class, not module-level functions.","wrong":"import dodopayments","symbol":"DodoPayments","correct":"from dodopayments import DodoPayments"}],"quickstart":{"code":"from dodopayments import DodoPayments\n\nclient = DodoPayments(\n    bearer_token=os.environ.get('DODOPAYMENTS_BEARER_TOKEN', '')\n)\ntry:\n    payments = client.payments.list(limit=10)\n    print(payments)\nexcept Exception as e:\n    print(f\"Error: {e}\")","lang":"python","description":"Initialize the client with your bearer token and list recent payments."},"warnings":[{"fix":"Upgrade to >=1.0.0 and instantiate `DodoPayments` client with your bearer token.","message":"Version 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()`.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Replace `DodoPayments(bearer_token=..., asyncio=True)` with `AsyncDodoPayments(bearer_token=...)`.","message":"The `asyncio` parameter in `DodoPayments()` constructor is deprecated in v1.50.0 and removed in v1.60.0. Use the async client `AsyncDodoPayments` instead.","severity":"deprecated","affected_versions":">=1.50.0 <1.60.0"},{"fix":"Use `DodoPayments(bearer_token='sk_test_...')`","message":"Bearer token must be provided as a keyword argument, not positional. Incorrect: `DodoPayments('sk_test_...')`","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.102.1':30 'access':16 'api':13,21,45,50 'async':40 'base':35 'client':34,51 'client-bas':33 'conveni':15 'current':28 'dodo':1,11,18,47 'frequent':43 'invoic':25 'librari':4,8 'offici':6 'pattern':36 'payment':2,12,19,23,48,49 'provid':14 'python':3,7 'releas':42 'rest':20 'subscript':24 'support':22,41 'synchron':38 'updat':46 'use':31 'version':29 'webhook':27","created_at":"2026-06-07T12:51:48.253762+00:00","updated_at":"2026-06-07T12:51:48.253762+00:00","problems":[{"fix":"Run `pip install dodopayments`","cause":"Library not installed.","error":"ModuleNotFoundError: No module named 'dodopayments'"},{"fix":"Instantiate client: `from dodopayments import DodoPayments` then `client = DodoPayments(bearer_token=...)` and use `client.payments.list()`","cause":"Trying to use old module-level API from v<1.0.0 after upgrade to v1+.","error":"AttributeError: module 'dodopayments' has no attribute 'Payment'"},{"fix":"Provide as keyword: `DodoPayments(bearer_token='your_token')`","cause":"Bearer token not provided or provided as positional argument incorrectly.","error":"TypeError: DodoPayments() missing 1 required positional argument: 'bearer_token'"},{"fix":"Check your bearer token from Dodo Payments dashboard and ensure it is passed correctly.","cause":"Invalid or expired bearer token.","error":"DodoPaymentsError: 401 Unauthorized"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/dodopayments/dodopayments-python","github":"https://github.com/dodopayments/dodopayments-python","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["payments"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}