{"id":3388,"library":"adyen","title":"Adyen Python API Library","description":"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.","status":"active","version":"15.0.1","language":"en","source_language":"en","source_url":"https://github.com/Adyen/adyen-python-api-library","tags":["payment gateway","fintech","api client","payments"],"install":[{"cmd":"pip install Adyen","lang":"bash","label":"Install Adyen"}],"dependencies":[{"reason":"Requires Python 3.8 or higher.","package":"Python","optional":false},{"reason":"Optional HTTP client; the library can use 'requests' or 'pycurl'.","package":"requests","optional":true},{"reason":"Optional HTTP client; the library can use 'requests' or 'pycurl'.","package":"pycurl","optional":true}],"imports":[{"note":"Main library import for the facade client.","symbol":"Adyen","correct":"import Adyen"},{"note":"For explicit client instantiation, though `Adyen.Adyen()` is also common.","symbol":"AdyenClient","correct":"from Adyen import AdyenClient"}],"quickstart":{"code":"import Adyen\nimport os\n\n# Set your API Key and Merchant Account from environment variables\nADYEN_API_KEY = os.environ.get('ADYEN_API_KEY', 'YOUR_ADYEN_API_KEY')\nADYEN_MERCHANT_ACCOUNT = os.environ.get('ADYEN_MERCHANT_ACCOUNT', 'YOUR_MERCHANT_ACCOUNT')\n\n# Initialize Adyen client\nadyen = Adyen.Adyen()\nadyen.client.xapikey = ADYEN_API_KEY\nadyen.client.platform = 'test'  # Use 'live' for production\n\ntry:\n    # Example: Make a test payment request\n    request = {\n        \"merchantAccount\": ADYEN_MERCHANT_ACCOUNT,\n        \"amount\": {\"currency\": \"EUR\", \"value\": 1000},  # Value in minor units (e.g., 10 EUR)\n        \"reference\": \"my-test-payment-ref-123\",\n        \"paymentMethod\": {\"type\": \"scheme\", \"number\": \"4921960000000000\", \"expiryMonth\": \"12\", \"expiryYear\": \"2030\", \"cvc\": \"123\"}\n    }\n\n    print(\"Initiating payment request...\")\n    response = adyen.checkout.payments_api.payments(request)\n    print(\"Payment response:\", response)\n\n    if response.status_code == 200 and response.message.get('resultCode') == 'Authorised':\n        print(\"Payment successful!\")\n    else:\n        print(\"Payment failed or pending.\")\n        print(f\"Result Code: {response.message.get('resultCode')}, Refusal Reason: {response.message.get('refusalReason')}\")\n\nexcept Adyen.exceptions.AdyenError as e:\n    print(f\"Adyen API Error: {e.debug()}\")\nexcept Exception as e:\n    print(f\"An unexpected error occurred: {e}\")","lang":"python","description":"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."},"warnings":[{"fix":"Upgrade your Python environment to 3.8 or higher.","message":"Version 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.","severity":"breaking","affected_versions":">=15.0.0"},{"fix":"Update any custom `RecurringApi` base URL configurations to use the new `paltokenization` domain and path.","message":"In 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.","severity":"breaking","affected_versions":">=15.0.0"},{"fix":"Review the API Explorer and updated documentation for specific API services and method signatures when upgrading to v14.0.0 or later.","message":"Version 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.","severity":"breaking","affected_versions":">=14.0.0"},{"fix":"Migrate to the recommended `Checkout API` recurring endpoints, `Management API`, or other relevant updated services as per Adyen documentation.","message":"As of v13.5.0, `AdyenBalanceControlApi`, `AdyenRecurringApi` (prefer `Checkout API recurring endpoints`), and the POS Terminal Management API (prefer `Management API`) methods have been deprecated.","severity":"deprecated","affected_versions":">=13.5.0"},{"fix":"Consult Adyen's documentation for the recommended alternatives for terminal management operations.","message":"In 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.","severity":"deprecated","affected_versions":">=13.3.0"},{"fix":"Double-check your API key permissions, the `client.platform` setting, and the `ADYEN_LIVE_ENDPOINT_PREFIX` if operating in a live environment.","message":"Incorrect 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.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}