canonical: https://jentic.com/apis/adyen.com/adyen-test-cards

# Adyen Test Cards API

The Adyen Test Cards API generates custom test card number ranges for use in development and QA against Adyen's test environment. The single endpoint, POST /createTestCardRanges, returns synthetic PANs that approve, decline, or simulate specific behaviours such as 3D Secure challenges and fraud blocks. It exists so integrators can exercise edge cases that the standard Adyen test cards do not cover, such as a particular issuer country, fundingSource, or risk outcome.

## For AI agents

Generate custom Adyen test card number ranges for QA scenarios that the standard test cards do not cover.

## Scope

Does not authorise live payments, generate real card credentials, or simulate end-to-end checkouts - use only for generating custom Adyen test card PAN ranges for QA scenarios.

## Capabilities

- Generate one or more custom test card ranges via POST /createTestCardRanges with brand, issuerCountry, and outcome
- Cover specific 3D Secure 1 and 3DS2 outcomes for QA - Authorised, ChallengeShopper, IdentifyShopper, Refused
- Simulate fundingSource (credit, debit, prepaid) and issuer country combinations not present in the standard test deck
- Produce ranges suitable for automated regression suites that run against Adyen test endpoints
- Use API-key or basic-auth credentials to scope range creation per merchant account

## Use cases

### QA Regression Coverage for Edge Cases

Standard Adyen test cards cover the main happy paths. To reproduce a specific issuer country, fundingSource, or 3DS2 outcome, QA teams call POST /createTestCardRanges with the desired brand, issuerCountry, and resultCode, and receive a fresh PAN range. The new PANs are then used in regression suites to exercise that exact path against Adyen's test endpoint, ensuring future code changes do not regress the handling of that case.

Example prompt: Call POST /createTestCardRanges with brand=visa, issuerCountry=NL, fundingSource=debit, and the desired authorisationResultCode for the QA scenario

### Developer Sandbox Setup

When a new developer joins the team, they need a deterministic set of test cards to exercise the integration in their local sandbox. POST /createTestCardRanges produces a deck tailored to the team's coverage matrix: one card per brand, one card per fundingSource, one card for every refusal reason the integration handles. The same call can be re-run any time to refresh the deck after Adyen's test environment is rotated.

Example prompt: Call POST /createTestCardRanges once per scenario in the team coverage matrix and store the resulting PANs in the team's secrets manager for use in sandbox runs

### Refusal-Reason Simulation

Integrations need to handle every refusal reason Adyen can return - fraud block, expired card, do-not-honour, declined, suspected fraud, and more. POST /createTestCardRanges generates a card range for each refusal scenario by setting the appropriate refusalReason on the request. Tests then call POST /authorise on the Payment API or POST /payments on Checkout with the generated PAN to confirm the integration handles each refusal cleanly.

Example prompt: Call POST /createTestCardRanges with refusalReason=FRAUD to obtain a PAN that always returns Refused with a fraud reason, then exercise the full refusal-handling path

### AI Agent Test Data Provisioning via Jentic

An automated test orchestration agent that prepares ephemeral test data per CI run searches Jentic for 'create Adyen custom test card range', loads the schema for /createTestCardRanges, and executes once per scenario in the test plan. Jentic injects X-API-Key from the encrypted vault and the resulting PANs are written to the CI run's secret store, never to disk.

Example prompt: Search Jentic for 'create Adyen custom test card range', load the createTestCardRanges schema, then execute once per scenario in the CI run's test plan

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /createTestCardRanges | Create one or more custom test card ranges |

## Key resources

- **Test Card Ranges** — Generate custom test card PAN ranges for QA scenarios with specific brand, issuerCountry, fundingSource, and authorisation outcome

## Why Jentic

- **Setup:** Wiring the Adyen Test Cards API by hand means handling its X-API-Key or basic auth and targeting the classic PAL host to generate test PAN ranges for QA. Through Jentic you install once, import the Test Cards API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** The Test Cards API takes the range parameters in the request body rather than a resource id in the URL path, so you limit the agent to the single operation it needs, creating test card ranges. Because you pick the operations, this surface exposes nothing beyond that test-data generator.
- **Credential handling:** Your Adyen X-API-Key and basic auth credentials are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a test card that returns a 3DS2 challenge', and Jentic returns the createTestCardRanges operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Adyen Payment API** — Authorise the test cards generated by this API in classic server-to-server flows
- **Adyen Checkout API** — Use generated test cards in modern Checkout sessions and Drop-in
- **Adyen BIN Lookup API** — Inspect the BIN attributes of a generated test card range
- **Adyen Disputes API** — Test dispute and chargeback handling against generated test PANs

## FAQ

### What authentication does the Adyen Test Cards API use?

The API supports an API key in the X-API-Key header (ApiKeyAuth) and HTTP Basic auth (BasicAuth) using web-service user credentials, the same auth model as the rest of Adyen's classic-platform APIs. Through Jentic, the credential is held encrypted in the vault and only a scoped execution token is exposed to the agent.

### What outcomes can I simulate with custom test cards?

POST /createTestCardRanges accepts parameters that set the brand, issuerCountry, fundingSource, authorisationResultCode, and refusalReason on the generated PAN range. This lets you generate test cards that always Approve, always Refuse with a specific reason, or trigger ChallengeShopper or IdentifyShopper for 3DS2 testing.

### Can I use these test cards against the live Adyen environment?

No. Custom test card ranges generated by this API are valid only against Adyen's test endpoints, such as pal-test.adyen.com and checkout-test.adyen.com. They will not authorise on the live endpoints; the production environment uses real card credentials only.

### How do I generate a custom test card with the Test Cards API through Jentic?

Search Jentic for 'create Adyen custom test card range', load the createTestCardRanges schema, then execute with brand, issuerCountry, fundingSource, and the desired authorisationResultCode. Jentic injects X-API-Key from the encrypted vault. Get an account through Jentic One, the self-hosted execution layer.

### What are the rate limits for the Adyen Test Cards API?

Adyen does not publish a fixed numeric rate limit for the Test Cards API in the spec; usage is administrative and intended for occasional QA setup rather than per-transaction calls. If 429 responses appear, contact Adyen support to review the merchant account's quota.

### How is this different from the standard Adyen test cards?

Adyen publishes a fixed list of standard test card PANs that cover the main approval and refusal paths. The Test Cards API generates custom ranges that fill specific gaps - a particular issuer country, a specific refusalReason, a 3DS2 step-up scenario - that the standard list does not include. Use it when the standard cards cannot reproduce a case your integration must handle.

### Can I limit what my agent is allowed to do with the Adyen Test Cards API?

Yes. Because you run Jentic One yourself and your own rules decide which operations and credentials the agent may use, you can restrict it to the single operation this API exposes, POST /createTestCardRanges. That endpoint takes the brand, issuerCountry, fundingSource, and outcome parameters in the request body rather than a resource id in the URL, so the agent can only generate custom test card ranges and nothing beyond that test-data generator. Your Adyen X-API-Key or basic-auth credentials stay stored and encrypted in your own instance and are injected only at execution time, never reaching the agent's prompt or logs.
