Adyen APIs SDK
The Adyen APIs SDK for Python provides access to the Adyen APIs REST APIs from Python applications.
Adyen Checkout API Configure and manage your Adyen company and merchant accounts, stores, and payment terminals.
Authentication
Each request to the Management API must be signed with an API key. Generate your API key in the Customer Area and then set this key to the X-API-Key header value.
To access the live endpoints, you need to generate a new API key in your live Customer Area.
Versioning
Management API handles versioning as part of the endpoint URL. For example, to send a request to this version of the /companies/{companyId}/webhooks endpoint, use:
https://management-test.adyen.com/v3/companies/{companyId}/webhooks
Going live
To access the live endpoints, you need an API key from your live Customer Area. Use this API key to make requests to:
https://management-live.adyen.com/v3
Release notes
Have a look at the release notes to find out what changed in this version!
Installation
To install the Python SDK from PyPI, with whichever package manager your project uses:
pip install adyen-apimatic-sdk
uv add adyen-apimatic-sdk
poetry add adyen-apimatic-sdk
To install from the SDK source instead, give the tool a path containing a slash — a bare folder name is looked up on PyPI, and resolves to whatever project holds that name there:
pip install <path-to-sdk>
Quick Start
Synchronous client
Construct AdyenApisClient with keyword arguments, and call close() when you are done. Every argument is optional; the full list is in the SDK map.
from adyen_apis import AdyenApisClient
from adyen_apis.core import BasicAuthCredentials
client = AdyenApisClient(
api_key_auth="YOUR_API_KEY", basic_auth=BasicAuthCredentials(username="YOUR_USERNAME", password="YOUR_PASSWORD")
)
# TODO: call endpoints here -- see api-reference.md
client.close()
Alternatively, scope it -- with AdyenApisClient(...) as client: closes the pool on exit; see Best Practices.
Client is exported as an alias of AdyenApisClient, so from adyen_apis import Client also works.
The SDK accepts every model-typed input in two interchangeable spellings, both type-checked: the typed model, or a plain dict with the same keys -- the OrDict and Model | ModelDict unions in the SDK map. Pick whichever suits the call site: the dict form needs no import, while the model form adds a keyword-checked constructor and editor completion.
Asynchronous client
AsyncAdyenApisClient mirrors AdyenApisClient 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_apis import AsyncAdyenApisClient
from adyen_apis.core import BasicAuthCredentials
async def main() -> None:
client = AsyncAdyenApisClient(
api_key_auth="YOUR_API_KEY", basic_auth=BasicAuthCredentials(username="YOUR_USERNAME", password="YOUR_PASSWORD")
)
# TODO: call endpoints here, awaiting each -- see api-reference.md
await client.aclose()
run(main())
Alternatively, scope it -- async with AsyncAdyenApisClient(...) as client: closes the pool on exit. Only the async spelling is aclose, matching httpx2; see Best Practices.
AsyncClient is the exported alias. Each client accepts only its own transport argument; passing the other's is a TypeError at runtime and an error under mypy.
Usage
Two generated references cover the SDK; each answers a different question:
| Reference | For |
|---|---|
| API Reference | Usage guidance for a single parsed operation: client.<group>.<operation>(...) returns the typed payload and raises ApiError on any non-2xx, with .error the typed error body, or RawError for a status the operation does not document. |
| Raw API Reference | The same for the raw variant: client.<group>.with_raw_response.<operation>(...) returns ApiResult[T, E] and never raises for an API error. |
Both API references carry every one of the 162 operations, with a sync and an async sample and a parameter table each.
SDK map
This SDK ships a generated SDK map -- sdk-map.md -- a deterministic, lookup-oriented table of contents of the SDK's Python surface, generated by APIMatic alongside this SDK.
Consult the map before scanning or grepping the source: it answers call-level contract questions by lookup, and for anything it does not carry -- model shapes, enum values, an endpoint's route or behavioural prose -- it names the one source file to read. How to read the map itself, including the SDK-wide defaults its rows rely on, is stated at the top of sdk-map.md.
Logging
The SDK logs every HTTP exchange through Python's standard logging module, under the adyen_apis logger, and configures nothing itself: with no logging set up, nothing is printed unless ADYEN_APIS_LOG is set. Turn it on as for any library:
import logging
logging.basicConfig() # your application's handler; the root stays at WARNING
logging.getLogger("adyen_apis").setLevel(logging.INFO) # the SDK's lines; DEBUG adds the dumps that logging_options turns on
Or set one environment variable before the process starts, for a run you cannot edit: ADYEN_APIS_LOG=info writes the request and response lines, ADYEN_APIS_LOG=debug adds the request headers, the request body and the response headers. If your application has configured logging, its handlers and format are used; otherwise the SDK writes to stderr.
Choose the detail with logging_options, a LoggingOptions from adyen_apis.core:
from adyen_apis import AdyenApisClient
from adyen_apis.core import LoggingOptions
client = AdyenApisClient(
logging_options=LoggingOptions(log_request_headers=True, log_response_headers=True, log_request_body=True)
)
A plain dict with the same keys is accepted too, as for every model-typed argument (see Quick Start): logging_options={"log_request_headers": True}.
| Option | Default | Effect |
|---|---|---|
log_request_headers |
False |
Log the sent headers at DEBUG, masked. |
log_response_headers |
False |
Log the received headers at DEBUG, masked. |
log_request_body |
False |
Log the request body at DEBUG: its text when in memory, a description when streamed. |
body_size_limit |
32768 |
Bytes of a logged body kept before it is cut. |
redaction_placeholder |
"REDACTED" |
What a hidden value prints as. |
unmask_headers |
none | Header names to show although they are not on the safe list. |
mask_headers |
none | Header names to hide although they are on the safe list. |
mask_keys |
11 credential names | Query and form keys whose values are always hidden; naming a set replaces the default. |
A single call can be quietened with request_options={"log_level": logging.WARNING}: records below that level are not written for that call. It never turns on a record the client's options leave off. Header, query and form values print REDACTED unless known safe; a JSON body is printed as sent, so enable log_request_body only where its content may be logged; a response body is never logged. The levels and every field are under Logging in the SDK map.
Best Practices
Match the disposal to the client's lifetime: an application-lifetime client is closed once at shutdown with close() / aclose(); where the lifetime fits a block, with AdyenApisClient() as client: / async with AsyncAdyenApisClient() as client: releases it automatically. Both are idempotent, but a closed client is not reusable: the next call raises. The client closes whatever transport it holds, including one you supplied via custom_http_client / custom_async_http_client; if you intend to reuse your own transport across clients, don't hand its lifetime to a with block.
Retries are on by default: a failed idempotent request — a retryable status or no response at all — is sent again up to three times before the call gives up. Pass retry_options=0 to turn it off, for instance in a test that stubs an error response; the policy and its defaults are under Retries in the SDK map.
License
This SDK is distributed under the MIT License.
Support
Refer to the API reference for detailed information on available operations with code samples.
Metadata
Release files for adyen-apimatic-sdk 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| adyen_apimatic_sdk-1.1.1.tar.gz | 455.1 kB | Without provenance | Details for adyen_apimatic_sdk-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| adyen_apimatic_sdk-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for adyen_apimatic_sdk-1.1.1-py3-none-any.whl |
Total release size: 1.6 MB
Release files / adyen_apimatic_sdk-1.1.1.tar.gz
| Download URL | adyen_apimatic_sdk-1.1.1.tar.gz |
|---|---|
| Size | 455.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8741bdd9a92b844d157d26ad1427b98711b3876c5f63950952af5d3426756536
|
|
BLAKE2b-256 checksum How to use checksums |
759080b2b3547164ca82d652f68eded6e649b135fd68027dddb0ed5ebd6fc077
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.13.15 Linux/6.1.158.2-microsoft-standard
|
Release files / adyen_apimatic_sdk-1.1.1-py3-none-any.whl
| Download URL | adyen_apimatic_sdk-1.1.1-py3-none-any.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7af1017c49a4b626b2456cdf0417292179670fde3125516378bee011d2d96b42
|
|
BLAKE2b-256 checksum How to use checksums |
596111ed37352a476a557c0b1979e57a88d40f8894fbcf62d00d44ae9f72aa11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.13.15 Linux/6.1.158.2-microsoft-standard
|
Security for adyen-apimatic-sdk 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.