REST API v1

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

GET /api/v1/generate

Generate test credit card numbers with full cardholder details including name, address, expiry, and CVV.

Parameters

NameTypeRequiredDescription
typestringNoCard type: visa, mastercard, amex, discover, diners, jcb, unionpay, maestro, rupay, mir. Comma-separated for multiple types.
countintegerNoNumber of cards to generate (1-1000). Default: 1
countrystringNoCountry code (US, GB, CA, etc.) or name for address generation
formatstringNoOutput format: json, xml, csv, pipe. Default: json

Example

Request
GET /api/v1/generate?type=visa&count=2&country=US
Response
{
  "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"
    },
    ...
  ]
}
GET /api/v1/validate

Validate a credit card number using the Luhn algorithm and detect the card type.

Parameters

NameTypeRequiredDescription
numberstringYesCard number to validate (spaces and dashes allowed)

Example

Request
GET /api/v1/validate?number=4532015112830366
Response
{
  "success": true,
  "validation": {
    "isValid": true,
    "cardType": "VISA",
    "miiCategory": "Banking and Financial",
    "issuerInfo": "VISA Card",
    "errors": []
  }
}
GET /api/v1/bin

Look up BIN/IIN information including issuing bank, country, and card type.

Parameters

NameTypeRequiredDescription
binstringYesFirst 6-8 digits of the card number

Example

Request
GET /api/v1/bin?bin=453201
Response
{
  "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"
    }
  }
}
GET /api/v1/types

List all available card types that can be generated.

Example

Request
GET /api/v1/types
Response
{
  "success": true,
  "count": 10,
  "types": [
    { "key": "visa", "name": "VISA" },
    { "key": "mastercard", "name": "MasterCard" },
    { "key": "amex", "name": "American Express" },
    { "key": "discover", "name": "Discover" },
    ...
  ]
}
GET /api/v1/countries

List all available countries for address generation.

Example

Request
GET /api/v1/countries
Response
{
  "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

Request URL https://cardgenr.com/api/v1/generate?type=visa&count=1

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!