Registry / payments / mollie-api-python

mollie-api-python

JSON →
library4.0.0pypypiunverified

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.

pip install mollie-api-python
INSTALL
IMPORT
SIG · MOLLIE-API-PYTHON
M
mollie-api-python
paymentspythonv4.0.0
Install
2.3s avg
Import
Disk
21MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 23.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.3s · import 0.000s · 24MB
21MB installed
● package 21MB
Code
Verified usage

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

MollieClient
from mollie import MollieClient
from mollie.api.client import MollieClient

Initialize client with API key and create a payment.

import os from mollie.api.client import MollieClient client = MollieClient() client.set_api_key(os.environ.get('MOLLIE_API_KEY', 'test_dHar4XY7LxsDOt2kVbK0GPLH4eLkgR')) # Create a payment payment = client.payments.create({ 'amount': {'currency': 'EUR', 'value': '10.00'}, 'description': 'Order #12345', 'redirectUrl': 'https://example.com/return', 'webhookUrl': 'https://example.com/webhook' }) print(f'Payment created: {payment.id}')
Debug
Known issues
breakingVersion 4.0.0 drops support for Python 3.8 and 3.9. Users on those versions must pin to 3.9.1 or earlier.
fix
Upgrade Python to 3.10+ or pin mollie-api-python to <4.0.0.
affects: >=4.0.0
deprecatedThe '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.
fix
Always pass testmode as a boolean, e.g., 'testmode': True. Upgrade to 3.7.4+ for proper handling.
affects: <=3.7.2
gotchaWhen using pagination, the 'next()' method may return None instead of raising an exception. Ensure you check for None before accessing properties.
fix
Check if result is not None before accessing attributes.
affects: all
Upgrade
Version history
4.0.0latest on PyPI · released Apr 28, 2026
Audit
Dependencies
requestsrequiredHTTP client for API calls
Agent activity
41 hits · last 30 days
node
36
OpenAI (training)
1
Resources
mollie-api-python — pip install mollie-api-python · libregistry