{"id":24069,"library":"mollie-api-python","title":"Mollie API Client for Python","description":"Official Mollie API client for Python. Provides synchronous and asynchronous access to Mollie's payment, subscription, order, and other resources. Latest version 4.0.0 drops support for Python 3.8 and 3.9. Releases are ongoing, with several patches per year.","status":"active","version":"4.0.0","language":"python","source_language":"en","source_url":"https://github.com/mollie/mollie-api-python","tags":["payments","mollie","api-client","e-commerce"],"install":[{"cmd":"pip install mollie-api-python","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP client for API calls","package":"requests","optional":false}],"imports":[{"note":"MollieClient is in the submodule mollie.api.client, not directly under mollie.","wrong":"from mollie import MollieClient","symbol":"MollieClient","correct":"from mollie.api.client import MollieClient"},{"note":"Resource classes are in mollie.api.resources submodules.","wrong":"from mollie import Payment","symbol":"Payment","correct":"from mollie.api.resources.payment import Payment"}],"quickstart":{"code":"import os\nfrom mollie.api.client import MollieClient\n\nclient = MollieClient()\nclient.set_api_key(os.environ.get('MOLLIE_API_KEY', 'test_dHar4XY7LxsDOt2kVbK0GPLH4eLkgR'))\n\n# Create a payment\npayment = client.payments.create({\n    'amount': {'currency': 'EUR', 'value': '10.00'},\n    'description': 'Order #12345',\n    'redirectUrl': 'https://example.com/return',\n    'webhookUrl': 'https://example.com/webhook'\n})\n\nprint(f'Payment created: {payment.id}')","lang":"python","description":"Initialize client with API key and create a payment."},"warnings":[{"fix":"Upgrade Python to 3.10+ or pin mollie-api-python to <4.0.0.","message":"Version 4.0.0 drops support for Python 3.8 and 3.9. Users on those versions must pin to 3.9.1 or earlier.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Always pass testmode as a boolean, e.g., 'testmode': True. Upgrade to 3.7.4+ for proper handling.","message":"The 'testmode' parameter must be passed as a boolean (not a string) to avoid incorrect behavior. In older versions, testmode might not be sent correctly on POST/PATCH/DELETE.","severity":"deprecated","affected_versions":"<=3.7.2"},{"fix":"Check if result is not None before accessing attributes.","message":"When using pagination, the 'next()' method may return None instead of raising an exception. Ensure you check for None before accessing properties.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"from mollie.api.client import MollieClient","cause":"Incorrect import path; MollieClient is in mollie.api.client, not directly in mollie.","error":"ImportError: cannot import name 'MollieClient' from 'mollie'"},{"fix":"Check if the result is not None before accessing attributes.","cause":"Pagination next() returned None but code tried to access .id.","error":"AttributeError: 'NoneType' object has no attribute 'id'"},{"fix":"Set MOLLIE_API_KEY environment variable to a valid API key (test or live).","cause":"API key missing or incorrect; usually due to empty environment variable or wrong key format.","error":"mollie.api.error.Error: Invalid API key"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}