# Adyen API keys: find, store, rotate, and use them safely with AI agents

Source: https://botpassword.com/keys/adyen
Last checked: 2026-10-25

Adyen API keys are generated in the Customer Area under **Developers → API credentials**, per credential and per environment. The key is shown once, and generating a new one keeps the old key valid for 24 hours.

## Key types

| Type | Prefix | Secret | Scope | Expiry |
|---|---|---|---|---|
| API key | — | Yes | Determined by the roles enabled on the API credential | Old keys stay active 24 hours after a new one is generated, unless expired sooner |

## How to create a Adyen key

1. In the Customer Area select your company account and go to **Developers → API credentials**.
2. Open the credential on the Payments or Platforms tab.
3. Under **Server settings → Authentication** select **API key** and click **Generate API key**.
4. Copy the key before leaving the page, then **Save changes**.

## Limiting what the key can do

Roles on the credential (under **Permissions**) define what it can do; at least one must be enabled. Under **Server settings → Allowed IP range** you can limit requests to listed IP ranges.

## How to rotate a Adyen key

1. Generate a new API key on the credential; it becomes active immediately.
2. Deploy the new key.
3. Under **Expiring keys** expire the old key immediately, or let the 24-hour window end.

## How to revoke a Adyen key

1. Credentials cannot be deleted. Set the credential to **Inactive** to block its keys immediately.

## If the key leaked

1. Generate a new API key and expire the old one immediately under Expiring keys.
2. Set the credential Inactive if you cannot rotate right away.
3. Add an allowed IP range to the credential.

## Gotchas

- The key cannot be copied again after you leave the page.
- Authenticate with the `x-API-key` header (header names are case-insensitive); Basic auth with a web service user is the alternative.
- Credentials cannot be deleted, only set Inactive.

## Using this key with AI agents (BotPassword)

- `run_with`: Runs a command with the key injected as an environment variable or a 0600 temporary file, never on the command line, and redacts the key from the output.
- `http_request`: Makes an authenticated API call after checking the destination against the hosts this key may be sent to. The response comes back with credential-shaped values redacted, and one that holds the key itself is refused.
- `rotate`: Partly built: creates a new key, stores it as pending, verifies it, promotes it, then revokes the old key after a grace period. Today it works for Cloudflare tokens and AWS IAM keys you have set up, and an agent can start it only under a grant with autopilot; other providers cannot be rotated through their API yet.
- `store_secret`: Saves a value the agent already holds as a new vault item.

## FAQ

### Where do I find my Adyen API key?

In the Customer Area under Developers → API credentials; generate it under Server settings → Authentication. It cannot be viewed again later.

### How do I send an Adyen API key?

In the `x-API-key` HTTP request header.

### What happens to the old Adyen key when I generate a new one?

It stays active for 24 hours unless you expire it immediately under Expiring keys.

### Can an AI agent use my Adyen key without seeing it?

Yes, if the key never enters the agent's context. Instead of pasting the key into a chat or leaving it in a `.env` file the agent can read, keep it in a credential broker that injects it into the command or request on the agent's behalf. BotPassword does this with `run_with`, `http_request`, `store_secret`, so the agent gets the result and never the value.

## Sources

- https://docs.adyen.com/development-resources/api-credentials/
- https://docs.adyen.com/development-resources/api-authentication/
