CardGenr API
Programmatic access to credit card generation and validation tools. Free, no authentication required.
Base URL
All API requests should be made to:
https://cardgenr.com/api/v1 Free to Use
No API key required
Fast Response
Edge-deployed globally
Bulk Support
Up to 1000 cards/request
Multiple Formats
JSON, XML, CSV, Pipe
API Endpoints
/api/v1/generateGenerate test credit card numbers with full cardholder details including name, address, expiry, and CVV.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
type | string | No | Card type: visa, mastercard, amex, discover, diners, jcb, unionpay, maestro, rupay, mir. Comma-separated for multiple types. |
count | integer | No | Number of cards to generate (1-1000). Default: 1 |
country | string | No | Country code (US, GB, CA, etc.) or name for address generation |
format | string | No | Output format: json, xml, csv, pipe. Default: json |
Example
GET /api/v1/generate?type=visa&count=2&country=US{
"success": true,
"count": 2,
"cards": [
{
"number": "4532015112830366",
"type": "VISA",
"expiry": "09/2028",
"expiryMonth": "09",
"expiryYear": "2028",
"name": "JOHN SMITH",
"cvv": "123",
"address": "1234 Main St",
"city": "New York",
"state": "NY",
"zipcode": "10001",
"country": "United States"
},
...
]
}/api/v1/validateValidate a credit card number using the Luhn algorithm and detect the card type.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
number | string | Yes | Card number to validate (spaces and dashes allowed) |
Example
GET /api/v1/validate?number=4532015112830366{
"success": true,
"validation": {
"isValid": true,
"cardType": "VISA",
"miiCategory": "Banking and Financial",
"issuerInfo": "VISA Card",
"errors": []
}
}/api/v1/binLook up BIN/IIN information including issuing bank, country, and card type.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
bin | string | Yes | First 6-8 digits of the card number |
Example
GET /api/v1/bin?bin=453201{
"success": true,
"bin": "453201",
"data": {
"scheme": "visa",
"type": "debit",
"brand": "Visa/Dankort",
"prepaid": false,
"country": {
"name": "Denmark",
"alpha2": "DK",
"emoji": "🇩🇰"
},
"bank": {
"name": "Jyske Bank",
"url": "www.jyskebank.dk",
"phone": "+4589893300"
}
}
}/api/v1/typesList all available card types that can be generated.
Example
GET /api/v1/types{
"success": true,
"count": 10,
"types": [
{ "key": "visa", "name": "VISA" },
{ "key": "mastercard", "name": "MasterCard" },
{ "key": "amex", "name": "American Express" },
{ "key": "discover", "name": "Discover" },
...
]
}/api/v1/countriesList all available countries for address generation.
Example
GET /api/v1/countries{
"success": true,
"count": 50,
"countries": [
{ "code": "US", "name": "United States" },
{ "code": "GB", "name": "United Kingdom" },
{ "code": "CA", "name": "Canada" },
...
]
}Try It Live
Test the API directly from your browser
https://cardgenr.com/api/v1/generate?type=visa&count=1 OpenAPI spec and MCP server
The full API is described in an OpenAPI 3.1 document at /openapi.json, so you can import it into Postman, Insomnia or a client generator.
Use CardGenr from your AI coding assistant
CardGenr also runs a remote Model Context Protocol server at https://cardgenr.com/mcp. Connect it to Claude Code, Cursor, VS Code or any MCP client, and the assistant can generate test cards, validate numbers, look up BINs and fetch a gateway's official sandbox cards while it writes your payment code. No API key is needed.
Claude Code:
claude mcp add --transport http cardgenr https://cardgenr.com/mcpCursor and other clients that read an mcpServers config:
{
"mcpServers": {
"cardgenr": {
"url": "https://cardgenr.com/mcp"
}
}
}generate_test_cardsLuhn-valid test cards with expiry, CVV, name and address.
get_gateway_test_cardsOfficial sandbox cards for Stripe, PayPal, Adyen and 13 more gateways.
validate_card_numberLuhn check plus network, length and MII detection.
lookup_binBrand, type, issuing bank and country for a BIN.
luhn_check_digitCompute the check digit that completes a number.
Use Cases
Development Testing
Generate test card data for your e-commerce checkout flows, payment form validation, and integration testing.
QA Automation
Integrate with your CI/CD pipeline to automatically generate test data for end-to-end payment testing.
Form Validation
Validate card numbers using the Luhn algorithm and identify card types for proper formatting in your forms.
Ready to Get Started?
Start using the CardGenr API today. No registration required, just make a request!