最近更新时间:2022.06.13 14:24:20
首次发布时间:2021.12.16 13:59:15
请先查看接入指引了解具体接入方式,再参考此文档完成接入。
名称 | 内容 |
---|---|
请求方式 | POST |
Content-Type | application/x-www-form-urlencoded |
图片要求 | 1. 图片格式:JPG、JPEG、PNG、BMP等常见格式,建议使用JPG格式。 2. 图片像素尺寸:最小 256 x 256 像素,最大 2048 x 2048 像素。为了保证文字识别效果,推荐图片中银行卡最短边长不低于256像素。 3. 图片文件大小:最大 5 MB。银行卡主体尽量占据图片主要区域,不支持黑白图片。 4. 注意图片质量:保证银行卡图片足够清晰,不应该有因为压缩导致的噪声,避免对银行卡的遮挡、不当的光照(强光、暗光、逆光)等,否则会降低结果准确度。 5. 图片需要有版权,有肖像权,没有法律或者政策风险的。相关风险请注意评估。 6. 银行卡图片不可以是复印件、翻拍件、PS件等。 |
Query参数:
参数 | 可选/必选 | 类型 | 说明 |
---|---|---|---|
Action | 必选 | String | 接口名,取值:BankCard |
Version | 必选 | String | 版本号,取值:2020-08-26 |
Body参数:
参数 | 可选/必选 | 类型 | 说明 |
---|---|---|---|
image_base64 | 必选 | String | 银行卡图片文件,base64编码 |
version | 可选 | String | 解析服务版本:"v1"/"v2", 默认为v1,版本区别见接口返回部分 |
字段 | 类型 | 说明 | 备注 |
---|---|---|---|
card_number | string | 银行卡号 | |
card_corners | corner_info | 卡号位置信息 | 卡号在图片中的位置 |
字段 | 类型 | 说明 | 备注 |
---|---|---|---|
left_top | Array of Int | 左上坐标 | |
right_top | Array of Int | 右上坐标 | |
right_bottom | Array of Int | 右下坐标 | |
left_bottom | Array of Int | 左下坐标 |
字段 | 类型 | 说明 | 备注 |
---|---|---|---|
expired_date | String | 过期时间 | |
expired_date_corners | Corner | 过期时间在图片中的4个顶点坐标 | 字段说明见下方 |
number | String | 卡号 | |
number_corners | Corner | 卡号在图片中的4个顶点坐标 | 字段说明见下方 |
bank_id | String | 银行编号 | 识别失败返回空字符串 |
bank_name | String | 银行名称 | 识别失败返回空字符串 |
card_name | String | 卡类型 | 识别失败返回空字符串 |
字段 | 类型 | 说明 | 备注 |
---|---|---|---|
left_top | list | 顶点坐标 | [x, y] |
right_top | list | 顶点坐标 | [x, y] |
right_bottom | list | 顶点坐标 | [x, y] |
left_bottom | list | 顶点坐标 | [x, y] |
HttpCode | 错误码 | 错误消息 | 描述 |
---|---|---|---|
200 | 10000 | 无 | 请求成功 |
400 | 60103 | "Missing Input Parameters: empty input image" | 输入图片为空 |
400 | 61201 | "Invalid Input Parameters: get input image error" | 获取图片错误 |
400 | 61202 | "Bank Card OCR Error" | 银行卡OCR识别错误 |
400 | 61203 | "Invalid Input Parameters: No bank card detected in input image" | 未检测到银行卡 |
{ "code":10000, "data":{ "card_number": "5309 9999 0000 8000" "card_corners":{ "left_top": 520, "right_top":71, "right_bottom":706, "left_bottom":283m }, }, "message":"Success", "request_id":"6838889517957515275", "time_elapsed":"41.897331ms" }