Registry / payments / Adyen

Adyen

JSON →
library14.0.0pypypi✓ verified 53d ago

Official Python API library for Adyen payment processing. Auto-generated from OpenAPI spec. PyPI package name is 'Adyen' (capital A). Uses X-API-Key auth, not OAuth. Each major version pins updated API versions and may contain breaking changes from codegen corrections.

paymentshttp-networking
pip install Adyen
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.925 runs
installs and imports cleanly · install 0.0s · import 0.172s · 29MB
glibc
py 3.103.925 runs
installs and imports cleanly · install 2.9s · import 0.161s · 29MB
27MB installed
● package 27MB
Code
Verified usage

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

Adyen
import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = 'YOUR_X_API_KEY' adyen.client.platform = 'test' # or 'live'
import adyen from adyen import Adyen
Package name is 'Adyen' with capital A. 'import adyen' (lowercase) fails with ModuleNotFoundError.
Service-specific client
from Adyen import checkout checkout.client.xapikey = 'YOUR_X_API_KEY' checkout.client.platform = 'test'
adyen.payment.client.hmac = '...'
For multi-credential setups, use service-specific clients. The hmac field on adyen.payment.client is for webhook HMAC verification, not API auth.

Amounts are always in minor units (cents, pence). 1000 = $10.00 USD.

import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = 'YOUR_X_API_KEY' adyen.client.platform = 'test' # change to 'live' for production request = { 'merchantAccount': 'YOUR_MERCHANT_ACCOUNT', 'amount': {'currency': 'USD', 'value': 1000}, # value in minor units (cents) 'reference': 'order-12345', 'paymentMethod': { 'type': 'scheme', 'encryptedCardNumber': 'test_4111111111111111', 'encryptedExpiryMonth': 'test_03', 'encryptedExpiryYear': 'test_2030', 'encryptedSecurityCode': 'test_737' }, 'returnUrl': 'https://your-company.com/checkout/return' } result = adyen.checkout.payments_api.payments(request) print(result.message)
Debug
Known issues
breakingv13.0 introduced a codegen fix: service methods that previously duplicated required path parameters as separate unused method arguments were corrected. Code that was passing those extra args (e.g. method(entity_id, entity_id, request)) now receives TypeError for unexpected arguments.
fix
Review method signatures for services you use and remove any duplicated path parameter arguments. Only the request object and explicit path params (e.g. psp_reference) should be passed.
affects: < 13.0.0
breakingPOS Terminal Management API deprecated. All terminal fleet management must migrate to the Management API. Calls to terminal management endpoints via the old API return deprecation errors.
fix
Use adyen.management.terminal_management to manage terminal fleet via the Management API.
affects: all
gotchaPackage name is 'Adyen' (capital A). pip install adyen (lowercase) installs a different, unrelated package. import adyen fails with ModuleNotFoundError.
fix
pip install Adyen && import Adyen
affects: all
gotchaAll payment amounts are in minor currency units. 1000 = $10.00 USD, £10.00 GBP, €10.00 EUR. Passing major units (e.g. value: 10) results in processing 10 cents/pence.
fix
Multiply by 100 for 2-decimal currencies. Check Adyen docs for currencies with different decimal places (e.g. JPY has 0 decimals).
affects: all
gotchaadyen.client.platform must be set to 'test' or 'live'. Default is 'test'. Forgetting to set 'live' in production sends requests to the test environment, resulting in no real charges.
fix
Set adyen.client.platform = 'live' in production. Test and live environments use separate API keys.
affects: all
gotchaLive environment endpoints require a live URL prefix specific to your account (e.g. {YOUR-UNIQUE-LIVE-PREFIX}-checkout-live.adyenpayments.com). The SDK default live URL will fail for checkout endpoints without this prefix.
fix
Set adyen.client.live_endpoint_prefix to your unique live prefix from Adyen Customer Area when using the live environment.
affects: all
gotchaPip warnings or notices related to running pip as root, not using a virtual environment, or available pip updates are observed in the test output. These are general advisories from the pip package manager and do not indicate a failure or issue with the Adyen SDK itself.
fix
Review and address pip's recommendations regarding environment setup (e.g., use virtual environments, avoid running pip as root) and keep pip updated. These messages are external to the Adyen SDK's functionality.
affects: all
gotchaPip displays warnings about running as a root user, which can cause permission issues, and often notifies about available updates. These are general pip environment issues, not specific to the Adyen library.
fix
It is recommended to use a virtual environment for package installations to avoid permission issues and conflicts with the system package manager. Consider updating pip if a notice is displayed, using 'pip install --upgrade pip'.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'Adyen'
The Adyen package is not installed or the import statement uses incorrect capitalization.
fix
Ensure the package is installed using 'pip install Adyen' and import it with 'import Adyen'.
AttributeError: module 'Adyen' has no attribute 'Client'
The Adyen module does not contain a 'Client' attribute; the correct attribute is 'AdyenClient'.
fix
Use 'from Adyen.client import AdyenClient' to import the correct class.
TypeError: 'Adyen' object is not callable
Attempting to call the 'Adyen' module as a function, which is not supported.
fix
Instantiate the client correctly using 'adyen = Adyen.Adyen()'.
ImportError: cannot import name 'Adyen' from 'adyen'
The package name is case-sensitive; 'Adyen' should be capitalized.
fix
Use 'import Adyen' instead of 'import adyen'.
AdyenAPIAuthenticationError: HTTP Status 401 Unauthorized
The API key provided is invalid or missing.
fix
Verify that the correct API key is set using 'adyen.client.xapikey = "YourXapikey"'.
Upgrade
Version history
15.0.2latest on PyPI
Audit
Dependencies
requestsrequiredHTTP client used internally.
Agent activity
95 hits · last 30 days
node
12
seranking-bot
4
applebot
2
ahrefsbot
2
petalbot
1
amazonbot
1
bytedance
1
googlebot
1
Perplexity
1
Resources