VCC · 开卡流程
从产品选择到卡片创建
读取产品要求、准备客户资料、提交开卡申请,并通过 Webhook 和查询接口确认当前结果。
sequenceDiagram
autonumber
participant M as 商户系统
participant E as EasyCards API
Note over M,E: 阶段一:读取开卡要求
M->>E: 查询可用产品及开卡要求 · GET /payment/vcc/products
E->>M: [同步响应] product_code、card_mode、费用、限额、required_customer_fields
opt 产品字段要求上传文件
M->>E: 上传客户文件并取得文件标识 · POST /payment/vcc/files
E->>M: [同步响应] file_id
end
Note over M,E: 阶段二:创建客户并提交开卡申请
M->>E: 创建持卡人资料 · POST /payment/vcc/customers
E->>M: [同步响应] customer_id、customer_status
M->>E: 为客户提交开卡申请 · POST /payment/vcc/card-applications
E->>M: [同步受理响应] application_id、application_status
Note over M,E: 阶段三:接收状态通知并查询最终结果
opt application_status = PENDING
E-->>M: [异步通知] vcc.application.updated · 状态或 next_action 变化
end
M->>E: 查询开卡申请当前结果 · GET /payment/vcc/card-applications/{application_id}
E->>M: [同步响应] application_status;成功时包含 card_id
opt application_status = SUCCESS
M->>E: 查询卡片状态与基本信息 · GET /payment/vcc/cards/{card_id}
E->>M: [同步响应] card_status、卡片基本信息
end
同步受理开卡接口在当前 HTTP 请求内返回 application_id 和 application_status。
异步变化申请状态后续变化时,由 vcc.application.updated Webhook 通知。
主动查询使用申请详情和卡片详情接口读取资源的当前状态。