# Payment Card Structural Validation (Luhn + Brand + BIN)

> Payment Card Structural Validation (Luhn + Brand + BIN) is a paid API for AI agents from api.aventtech.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-10).

Validates a payment card number's structure via Luhn checksum, detects card brand (Visa/Mastercard/Amex/Discover/Diners/JCB), and extracts BIN and last4 digits — without verifying the card actually exists.

## Facts

- Endpoint: GET https://api.aventtech.com/validate/card?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/payment-card-structural-validation-luhn-brand-bin-5d475874
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GDPlnqkNUoGqBK1abUbJ2

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability payment-card-structural-validation-luhn-brand-bin-5d475874
```

Example prompt: Can you check if the card number 4532 0151 1283 0366 is structurally valid — run the Luhn check, tell me what brand it is (Visa, Mastercard, Amex, etc.), and give me the BIN and last 4 digits?

## When to prefer this

Use this endpoint when you need a fast, cheap, stateless structural check of a card number before a payment attempt — catching typos, invalid Luhn checksums, and identifying card brand without making a live authorization. Ideal for form validation, pre-screening card inputs, or fraud triage pipelines where you want zero side effects.

## Known failure modes

- Missing 'number' query parameter returns a 400 bad request
- Non-numeric or too-short input may fail Luhn and return invalid with no brand detected
- Unrecognized card prefixes return no brand but still report Luhn result
- Network timeout or service unavailability returns 5xx
- Card number with invalid length for its detected brand may return structurally invalid

## How this service works

Validate a credit card or payment card number and detect its brand. Checks the Luhn checksum and identifies Visa, Mastercard, Amex, Discover, Diners or JCB, returning the BIN and last four digits. Structural card number validation for checkout forms and fraud pre-checks (does not verify the card exists or has funds).

## Output

Returns whether the card number passes the Luhn checksum, the detected card brand (Visa/Mastercard/Amex/Discover/Diners/JCB), the BIN (first 6 digits), and the last 4 digits of the card number. Does not confirm card existence or available balance.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "number"
     ],
     "properties": {
      "number": {
       "type": "string",
       "description": "Card number, spaces/dashes allowed"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "bin": "424242",
  "brand": "visa",
  "last4": "4242",
  "valid": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/payment-card-structural-validation-luhn-brand-bin-5d475874/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.aventtech.com](https://www.zero.xyz/host/api.aventtech.com/llms.txt)
