BIN 查询
GET
/api/v1/bank/wallet/bin/{card_bin}/Bearer Token请求头
| 请求头 | 值 | 必填 |
|---|---|---|
Authorization | Bearer {A55_ACCESS_TOKEN} | 是 |
路径参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
card_bin | string | 是 | 卡号前 6 到 8 位数字(例如 402400) |
响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
bin | string | 查询的 BIN(银行识别码)数字 |
brand | string | 卡品牌:visa、mastercard、amex、elo、hipercard、diners |
type | string | credit、debit、prepaid |
category | string | classic、gold、platinum、black、infinite、business、corporate |
issuer | string | 发卡银行名称 |
country | string | ISO 3166-1 alpha-2 国家代码 |
country_name | string | 国家全称 |
HTTP 状态码
| 状态码 | 说明 |
|---|---|
| 200 | 找到 BIN |
| 400 | BIN 格式无效(必须为 6-8 位数字) |
| 401 | Bearer Token(持有者令牌)无效或已过期 |
| 404 | 数据库中未找到该 BIN |
| 429 | 超出速率限制 |
| 500 | 服务器内部错误 |
代码示例
- cURL
- Python
- Node.js
curl -s -X GET "https://core-manager.a55.tech/api/v1/bank/wallet/bin/402400/" \
-H "Authorization: Bearer $A55_ACCESS_TOKEN"
import requests
import os
token = os.environ["A55_ACCESS_TOKEN"]
base = os.environ.get("A55_API_URL", "https://core-manager.a55.tech")
card_bin = "402400"
try:
response = requests.get(
f"{base}/api/v1/bank/wallet/bin/{card_bin}/",
headers={"Authorization": f"Bearer {token}"},
)
response.raise_for_status()
info = response.json()
print(f"卡组织:{info['brand']} | 类型:{info['type']} | 发卡行:{info['issuer']}")
print(f"类别:{info['category']} | 国家:{info['country_name']}")
except requests.exceptions.HTTPError as e:
print(f"HTTP {e.response.status_code}: {e.response.json()}")
except requests.exceptions.RequestException as e:
print(f"请求失败:{e}")
const token = process.env.A55_ACCESS_TOKEN;
const base = process.env.A55_API_URL || "https://core-manager.a55.tech";
const cardBin = "402400";
try {
const response = await fetch(`${base}/api/v1/bank/wallet/bin/${cardBin}/`, {
headers: { Authorization: `Bearer ${token}` },
});
if (!response.ok) throw new Error(`请求失败(HTTP ${response.status}):${await response.text()}`);
const info = await response.json();
console.log(`卡组织:${info.brand} | 类型:${info.type} | 发卡行:${info.issuer}`);
console.log(`类别:${info.category} | 国家:${info.country_name}`);
} catch (error) {
console.error("BIN 查询失败:", error.message);
}
错误响应示例
{
"status": "error",
"message": [
{
"code": "BIN_NOT_FOUND",
"source": "bin_lookup",
"description": "No data found for BIN 999999"
}
]
}