Registry / payments / adyen
library15.0.2pypypi✓ verified 22d ago

The Adyen Python API Library provides a comprehensive client for integrating with Adyen's various APIs, including Checkout, Management, Recurring, and more. It is currently at version 15.0.1 and receives frequent updates, often with minor or patch releases, and occasional major versions that align with Adyen's OpenAPI specification updates.

pip install Adyen
INSTALL
IMPORT
SIG · ADYEN
A
adyen
paymentspythonv15.0.2
Install
1.6s avg
Import
139ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v15.0.2 · 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.148s · 18.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.130s · 19MB
17MB installed
● package 17MB
Code
Verified usage

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

Adyen
import Adyen
Main library import for the facade client.
AdyenClient
from Adyen import AdyenClient
For explicit client instantiation, though `Adyen.Adyen()` is also common.

This quickstart demonstrates how to initialize the Adyen client, set your API key and merchant account, and make a simple credit card payment request using the `payments_api` service. Replace placeholder values with your actual Adyen credentials and test card details.

import Adyen import os # Set your API Key and Merchant Account from environment variables ADYEN_API_KEY = os.environ.get('ADYEN_API_KEY', 'YOUR_ADYEN_API_KEY') ADYEN_MERCHANT_ACCOUNT = os.environ.get('ADYEN_MERCHANT_ACCOUNT', 'YOUR_MERCHANT_ACCOUNT') # Initialize Adyen client adyen = Adyen.Adyen() adyen.client.xapikey = ADYEN_API_KEY adyen.client.platform = 'test' # Use 'live' for production try: # Example: Make a test payment request request = { "merchantAccount": ADYEN_MERCHANT_ACCOUNT, "amount": {"currency": "EUR", "value": 1000}, # Value in minor units (e.g., 10 EUR) "reference": "my-test-payment-ref-123", "paymentMethod": {"type": "scheme", "number": "4921960000000000", "expiryMonth": "12", "expiryYear": "2030", "cvc": "123"} } print("Initiating payment request...") response = adyen.checkout.payments_api.payments(request) print("Payment response:", response) if response.status_code == 200 and response.message.get('resultCode') == 'Authorised': print("Payment successful!") else: print("Payment failed or pending.") print(f"Result Code: {response.message.get('resultCode')}, Refusal Reason: {response.message.get('refusalReason')}") except Adyen.exceptions.AdyenError as e: print(f"Adyen API Error: {e.debug()}") except Exception as e: print(f"An unexpected error occurred: {e}")
Debug
Known issues
breakingVersion 15.0.0 raised the minimum Python requirement to 3.8. Support for Python 2.7 and 3.6 has been dropped. Integrations on older Python versions must upgrade before migrating to this release.
fix
Upgrade your Python environment to 3.8 or higher.
affects: >=15.0.0
breakingIn version 15.0.0, the base URL for the Recurring API changed from `pal-{env}.adyen.com/pal/servlet/Recurring/v68` to `paltokenization-{env}.adyen.com/paltokenization/servlet/Recurring/v68`. Any hard-coded environment-specific URL overrides for `RecurringApi` must be updated.
fix
Update any custom `RecurringApi` base URL configurations to use the new `paltokenization` domain and path.
affects: >=15.0.0
breakingVersion 14.0.0 introduced a significant refactoring of the service layer and corrected auto-generated method signatures. This may require adjustments to how API methods are called, particularly if relying on specific method names or structures from prior versions.
fix
Review the API Explorer and updated documentation for specific API services and method signatures when upgrading to v14.0.0 or later.
affects: >=14.0.0
deprecatedAs of v13.5.0, `AdyenBalanceControlApi`, `AdyenRecurringApi` (prefer `Checkout API recurring endpoints`), and the POS Terminal Management API (prefer `Management API`) methods have been deprecated.
fix
Migrate to the recommended `Checkout API` recurring endpoints, `Management API`, or other relevant updated services as per Adyen documentation.
affects: >=13.5.0
deprecatedIn version 13.3.0, methods within the `Terminal` service, such as `assign_terminals`, `find_terminal`, `get_stores_under_account`, `get_terminal_details`, and `get_terminals_under_account`, were deprecated.
fix
Consult Adyen's documentation for the recommended alternatives for terminal management operations.
affects: >=13.3.0
gotchaIncorrect API key, environment (`test` vs `live`), or live endpoint prefix (`ADYEN_LIVE_ENDPOINT_PREFIX`) are common causes of authentication or routing errors. For live environments, ensure the correct unique prefix is included in the endpoint configuration.
fix
Double-check your API key permissions, the `client.platform` setting, and the `ADYEN_LIVE_ENDPOINT_PREFIX` if operating in a live environment.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'adyen'
The 'adyen' module is not installed in the Python environment.
fix
Install the Adyen Python API library using pip: 'pip install Adyen'.
AttributeError: module 'Adyen' has no attribute 'Client'
Incorrect import statement; 'Adyen' is the module, and 'Client' should be accessed as 'Adyen.client.Client'.
fix
Use the correct import: 'from Adyen.client import Client'.
AdyenAPIAuthenticationError: HTTP Status 403: Not allowed
The API key provided lacks the necessary permissions for the requested operation.
fix
Ensure the API key has the required roles assigned in the Adyen Customer Area.
AdyenAPIResponseError: HTTP Status 422: Required object 'amount' is not provided.
The 'amount' field is missing from the API request payload.
fix
Include the 'amount' field in the request payload as per Adyen's API documentation.
AdyenAPIResponseError: HTTP Status 422: Invalid card number
The card number provided in the payment request is invalid or incorrectly formatted.
fix
Verify and correct the card number in the payment request.
Upgrade
Version history
15.0.2latest on PyPI · released Jun 1, 2026
Audit
Dependencies
PythonrequiredRequires Python 3.8 or higher.
requestsoptionalOptional HTTP client; the library can use 'requests' or 'pycurl'.
pycurloptionalOptional HTTP client; the library can use 'requests' or 'pycurl'.
Agent activity
68 hits · last 30 days
node
58
Perplexity
1
OpenAI (training)
1
Resources
adyen — pip install adyen · libregistry