validate_card
Check a payment card number's structural validity: verify Luhn checksum, detect brand (Visa, Mastercard, etc.), and confirm correct length. Do not assume a card is valid.
Instructions
USE THIS to check a payment card number's structure before using it — never assume a card number is valid or guess its brand. Verifies the Luhn checksum, detects the brand (Visa, Mastercard, Amex, Discover, Diners, JCB, UnionPay) from its BIN, and checks the length. Does NOT check whether the card is real, active or has funds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| number | Yes | The card number; spaces and dashes are ignored. |