Adyen Test Cards API
The Test Cards API provides endpoints for generating custom test card numbers
COMMUNITYAPI KEY0 INSTALLS
OpenAPI Specificationv3.1
{
"openapi": "3.1.0",
"servers": [
{
"url": "https://pal-test.adyen.com/pal/services/TestCard/v1"
}
],
"info": {
"contact": {
"email": "developer-experience@adyen.com",
"name": "Adyen Developer Experience team",
"url": "https://www.adyen.help/hc/en-us/community/topics",
"x-twitter": "Adyen"
},
"description": "The Test Cards API provides endpoints for generating custom test card numbers. For more information, refer to [Custom test cards](https://docs.adyen.com/development-resources/testing/create-test-cards) documentation.",
"termsOfService": "https://www.adyen.com/legal/terms-and-conditions",
"title": "Adyen Test Cards API",
"version": "1",
"x-apisguru-categories": [
"payment"
],
"x-logo": {
"url": "https://api.apis.guru/v2/cache/logo/https_twitter_com_Adyen_profile_image.svg"
},
"x-origin": [
{
"format": "openapi",
"url": "https://raw.githubusercontent.com/Adyen/adyen-openapi/main/json/TestCardService-v1.json",
"version": "3.1"
}
],
"x-providerName": "adyen.com",
"x-publicVersion": true,
"x-serviceName": "TestCardService",
"x-timestamp": "2022-05-03T09:24:07Z"
},
"tags": [
{
"name": "General"
}
],
"paths": {
"/createTestCardRanges": {
"post": {
"description": "Creates one or more test card ranges.",
"operationId": "post-createTestCardRanges",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateTestCardRangesRequest"
}
}
}
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateTestCardRangesResult"
}
}
},
"description": "OK - the request has succeeded."
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceError"
}
}
},
"description": "Bad Request - a problem reading or understanding the request."
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceError"
}
}
},
"description": "Unauthorized - authentication required."
},
"403": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceError"
}
}
},
"description": "Forbidden - insufficient permissions to process the request."
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceError"
}
}
},
"description": "Unprocessable Entity - a request validation error."
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServiceError"
}
}
},
"description": "Internal Server Error - the server could not process the request."
}
},
"security": [
{
"BasicAuth": []
},
{
"ApiKeyAuth": []
}
],
"summary": "Creates one or more test card ranges.",
"tags": [
"General"
],
"x-groupName": "General",
"x-sortIndex": 0
}
}
},
"components": {
"examples": {},
"schemas": {
"AvsAddress": {
"properties": {
"streetAddress": {
"description": "The street and house number of the address.\n\nExample: 1 Infinite Loop, Cupertino.",
"type": "string"
},
"zip": {
"description": "The zip or post code of the address.\n\nExample: CA 95014",
"type": "string"
}
},
"required": [
"streetAddress"
]
},
"CreateTestCardRangesRequest": {
"properties": {
"accountCode": {
"description": "The code of the account, for which the test card ranges should be created.",
"type": "string"
},
"accountTypeCode": {
"description": "The type of the account, for which the test card ranges should be created.\n\nPermitted values:\n* Company\n* MerchantAccount\n> These values are case-sensitive.",
"type": "string"
},
"testCardRanges": {
"description": "A list of test card ranges to create.",
"items": {
"$ref": "#/components/schemas/TestCardRange"
},
"type": "array"
}
},
"required": [
"accountTypeCode",
"accountCode",
"testCardRanges"
]
},
"CreateTestCardRangesResult": {
"properties": {
"rangeCreationResults": {
"description": "The results of the test card creation.",
"items": {
"$ref": "#/components/schemas/TestCardRangeCreationResult"
},
"type": "array"
}
},
"required": [
"rangeCreationResults"
]
},
"ServiceError": {
"properties": {
"errorCode": {
"description": "The error code mapped to the error message.",
"type": "string"
},
"errorType": {
"description": "The category of the error.",
"type": "string"
},
"message": {
"description": "A short explanation of the issue.",
"type": "string"
},
"pspReference": {
"description": "The PSP reference of the payment.",
"type": "string"
},
"status": {
"description": "The HTTP response status.",
"format": "int32",
"type": "integer"
}
}
},
"TestCardRange": {
"properties": {
"address": {
"$ref": "#/components/schemas/AvsAddress",
"description": "Contains the billing address of the card holder. The address details need to be AVS-compliant, which means that you need to provide at least street address."
},
"cardHolderName": {
"description": "The name of the card holder, as it appears on the card, for the test card range.",
"type": "string"
},
"cvc": {
"description": "The test card range security code.\n\nExample: 123",
"type": "string"
},
"expiryMonth": {
"description": "Expiry month for the test card range.\n\nAllowed values:\n* JANUARY\n* FEBRUARY\n* MARCH\n* APRIL\n* MAY\n* JUNE\n* JULY\n* AUGUST\n* SEPTEMBER\n* OCTOBER\n* NOVEMBER\n* DECEMBER",
"enum": [
"APRIL",
"AUGUST",
"DECEMBER",
"FEBRUARY",
"JANUARY",
"JULY",
"JUNE",
"MARCH",
"MAY",
"NOVEMBER",
"OCTOBER",
"SEPTEMBER"
],
"type": "string"
},
"expiryYear": {
"description": "Expiry year for the test card range.\n\nExample: 2020",
"format": "int32",
"type": "integer"
},
"rangeEnd": {
"description": "The last test card number in the test card range (inclusive):\n\n* Min 6, max 19 digits\n* BIN compliant\nExample: 5432 1234 1234 4321",
"type": "string"
},
"rangeStart": {
"description": "The first test card number in the test card range (inclusive):\n\n* Min 6, max 19 digits\n* BIN compliant\nExample: 5432 1234 1234 1234",
"type": "string"
},
"threeDDirectoryServerResponse": {
"description": "3D Secure server response. It notifies whether the specified card holder is enrolled in a 3D Secure service. Possible values:\n\n* Y (Authentication available)\n* N (Card holder not enrolled/not participating)\n* U (Unable to authenticate)",
"enum": [
"N",
"U",
"Y"
],
"type": "string"
},
"threeDPassword": {
"description": "The password used for 3D Secure authentication.",
"type": "string"
},
"threeDUsername": {
"description": "The username used for 3D Secure authentication.",
"type": "string"
}
},
"required": [
"rangeStart",
"rangeEnd",
"expiryMonth",
"expiryYear",
"cardHolderName"
]
},
"TestCardRangeCreationResult": {
"properties": {
"cardNumberRangeEnd": {
"description": "The last test card number in the generated test card range.\n\nExample: 5432 1234 1234 4321",
"type": "string"
},
"cardNumberRangeStart": {
"description": "The first test card number in the generated test card range.\n\nExample: 5432 1234 1234 1234",
"type": "string"
},
"creationResultCode": {
"description": "Notification message. It informs about the outcome of the operation. Possible values:\n* CREATED\n* ALREADY_EXISTS\n* ERROR",
"enum": [
"ALREADY_EXISTS",
"CREATED",
"ERROR"
],
"type": "string"
},
"message": {
"description": "An optional information message about the result.",
"type": "string"
}
},
"required": [
"cardNumberRangeStart",
"cardNumberRangeEnd",
"creationResultCode"
]
}
},
"securitySchemes": {
"ApiKeyAuth": {
"in": "header",
"name": "X-API-Key",
"type": "apiKey"
},
"BasicAuth": {
"scheme": "basic",
"type": "http"
}
}
},
"x-groups": [
"General"
]
}