{"digits_count":16,"brand":"visa","luhn_valid":true,"length_valid_for_brand":true,"valid":true,"masked":"411111******1111","note":"Validacao por algoritmo de Luhn e bandeira pelo prefixo. Nao consulta banco emissor. Nada e armazenado."}
curl --location --request GET 'https://zylalabs.com/api/13157/credit+card+number+validator+api/26703/validate+card+number' --header 'Authorization: Bearer YOUR_API_KEY'
注册后,每个开发者都会被分配一个个人 API 访问密钥,这是一个唯一的字母和数字组合,用于访问我们的 API 端点。要使用 Credit Card Number Validator API 进行身份验证,只需在 Authorization 标头中包含您的 bearer token。
| 标头 | 描述 |
|---|---|
授权
|
必需
应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。
|
无长期承诺。随时升级、降级或取消。 免费试用包括最多 50 个请求。
(年度计费可节省 2 个月 🎉)
Catch invalid card numbers at the form, before a costly gateway round trip. One call verifies the checksum, detects the brand by prefix and checks the number length for that brand.
Useful for checkout form validation in online stores and subscription billing, pre-validation before tokenization, cleaning card data in customer systems, and showing the right brand logo at checkout. The verdict means the number is well formed; it does not query the issuing bank.
验证卡号接口返回的数据包括卡号的有效性 检测到的品牌 数字计数 品牌的长度有效性和卡号的掩码版本
Key fields in the response include "valid" (indicating overall validity), "brand" (the detected card brand), "digits_count" (total digits), "length_valid_for_brand" (length check result), "luhn_valid" (checksum validation), and "masked" (masked card number).
The response data is structured in JSON format, with key-value pairs for each field. For example, a typical response might look like: {"valid": true, "brand": "visa", "masked": "411111******1111"}.
The endpoint provides information on card validity, brand detection, checksum verification, and length validation specific to the card brand, ensuring comprehensive pre-validation before processing.
Users can customize their requests by providing different card numbers to the Validate Card Number endpoint. Each request will return validation results specific to the submitted card number.
典型的使用案例包括在在线结账时验证卡号 在令牌化之前预验证卡片 在客户系统中清理卡数据 以及在结账时显示正确的品牌徽标
Data accuracy is maintained through the use of the Luhn algorithm for checksum verification and brand detection based on established prefix rules, ensuring reliable validation without querying issuing banks.
标准数据模式包括一个布尔“有效”字段表示整体有效性,一个包含认可卡品牌的“品牌”字段,以及一个显示卡号且敏感数字被遮蔽的“掩码”字段