validate_credit_card
Validate a credit card number using Luhn checksum and identify its network (Visa, Mastercard, etc.). Returns a masked version to protect the full number.
Instructions
Validate a credit card number.
Performs Luhn checksum verification and detects the card network (Visa, Mastercard, Amex, Discover, UnionPay, etc.). The full card number is never logged or stored — only a masked version is returned.
Args: number: Card number with optional spaces or dashes (e.g. "4111 1111 1111 1111")
Returns: dict with keys: valid, luhn_valid, length_valid, network, length, masked, cost_usd
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| number | Yes |