Python SDK
Install and start using the Python SDK.
Intro
The Adyen Checkout API SDK provides access to the Adyen Checkout API REST APIs.
Adyen Checkout API
Installation
Add the SDK to your project from its folder, with whichever package manager your project uses. Give each tool a path containing a slash, such as ../adyen-checkout-api — a bare folder name is looked up on PyPI instead, and resolves to whatever project holds that name there:
pip install <path-to-sdk>uv add <path-to-sdk>poetry add <path-to-sdk>Quick Start
Synchronous client
Construct AdyenCheckoutApiClient with keyword arguments, and call close() when you are done. Every argument is optional.
from adyen_checkout_api import AdyenCheckoutApiClient
from adyen_checkout_api.core import BasicAuthCredentials
client = AdyenCheckoutApiClient(
api_key_auth="YOUR_API_KEY", basic_auth=BasicAuthCredentials(username="YOUR_USERNAME", password="YOUR_PASSWORD")
)
client.close()Alternatively, scope it — with AdyenCheckoutApiClient(...) as client: closes the pool on exit.
Asynchronous client
AsyncAdyenCheckoutApiClient mirrors AdyenCheckoutApiClient with identical method names, and every endpoint method is a coroutine. It takes the same arguments, with some differences — for example, the transport argument is custom_async_http_client.
from asyncio import run
from adyen_checkout_api import AsyncAdyenCheckoutApiClient
from adyen_checkout_api.core import BasicAuthCredentials
async def main() -> None:
client = AsyncAdyenCheckoutApiClient(
api_key_auth="YOUR_API_KEY", basic_auth=BasicAuthCredentials(username="YOUR_USERNAME", password="YOUR_PASSWORD")
)
await client.aclose()
run(main())Alternatively, scope it — async with AsyncAdyenCheckoutApiClient(...) as client: closes the pool on exit.
