validate_card
Verify a payment card number's structural validity: validate the Luhn checksum, detect the brand from the BIN, and check the correct length before using the number.
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. |