PIX Dict Operation
当用户发起 DICT 变更时,数据应发送到我们的服务器,以便我们对该数据集所涉及的风险进行分析。
Dict Operation 对象定义
Request Body
{
"id": "f58e8a19-429d-4e36-a010-ed00a323c2c5",
"dict_key": {
"key_type": "phone",
"key_value": "16981610077",
"assignment_date": "2020-01-15T18:00:00-03:00"
},
"dict_operation_direction": "claimer",
"dict_operation_reason": "user_requested",
"dict_operation_creation_date": "2020-10-14T18:00:00-03:00",
"dict_operation_type": "claim_portability",
"client": {
"id": "123456",
"document_number": "099.912.226-69",
"name": "João Jorge da Silva",
"type": "natural_person",
"address": {
"street": "Avenida 13",
"number": "704",
"neighbourhood": "Centro",
"city": "Ituiutaba",
"uf": "MG",
"complement": "Apt 1101",
"postal_code": "38300-140"
},
"phone": {
"international_dial_code": "55",
"area_code": "65",
"number": "988961210",
"type": "mobile"
},
"sales_channel": "inbound_sales",
"segment": "Personalité"
},
"source_account": {
"participant": "04184779",
"branch": "0001",
"account_number": "1122",
"account_digit": "6",
"owner": {
"type": "legal_person",
"document_number": "94.948.708/0001-12",
"name": "Irmão Soares Ferragista LTDA."
},
"account_type": "CACC",
"opening_date": "2020-01-15T18:00:00-03:00"
},
"destination_account": {
"participant": "00000000",
"branch": "3675",
"account_number": "10442",
"account_digit": "6",
"owner": {
"type": "natural_person",
"document_number": "099.912.226-69",
"name": "João Jorge da Silva"
},
"account_type": "SLRY",
"opening_date": "2020-01-15T18:00:00-03:00"
},
"destination_statistics": {
"account":{
"settlements":{
"d3":12,
"d30":65,
"m6":344
},
"rejected":{
"d3":4,
"d30":67,
"m6":618
},
"reported_frauds":{
"d3":0,
"d30":0,
"m6":0
},
"reported_aml_cft":{
"d3":0,
"d30":0,
"m6":0
},
"confirmed_frauds":{
"d3":0,
"d30":0,
"m6":0
},
"confirmed_aml_cft":{
"d3":0,
"d30":0,
"m6":0
}
},
"owner":{
"settlements":{
"d3":4,
"d30":12,
"m6":88
},
"rejected":{
"d3":4,
"d30":67,
"m6":618
},
"reported_frauds":{
"d3":0,
"d30":0,
"m6":0
},
"reported_aml_cft":{
"d3":0,
"d30":0,
"m6":0
},
"confirmed_frauds":{
"d3":0,
"d30":0,
"m6":0
},
"confirmed_aml_cft":{
"d3":0,
"d30":0,
"m6":0
}
},
"key":{
"settlements":{
"d3":1,
"d30":6,
"m6":12
},
"rejected":{
"d3":4,
"d30":67,
"m6":618
},
"reported_frauds":{
"d3":0,
"d30":0,
"m6":0
},
"reported_aml_cft":{
"d3":0,
"d30":0,
"m6":0
},
"confirmed_frauds":{
"d3":0,
"d30":0,
"m6":0
},
"confirmed_aml_cft":{
"d3":0,
"d30":0,
"m6":0
}
}
},
"source": {
"channel": "internet_banking",
"platform": "android",
"ip": "198.185.065-98",
"session_id": "7839jdqd9a8wd9"
}
}
Dict Operation 必须在转发到 BCB 处理系统之前发送到 API,以便进行注册预先欺诈验证。
Dict Operation 分析状态表示模型对该操作返回的决策。以下状态用于 analysis_status 标志:
automatically_approvedautomatically_reprovedin_manual_analysispending
以下是 analysis_status 标志中返回的每个决策的含义:
| 状态 | 描述 |
|---|---|
| automatically_approved | 建议批准此操作。 |
| automatically_reproved | 建议拒绝此操作。 |
| in_manual_analysis | 建议由分析师对该操作进行人工分析。 |
| pending | 操作正在处理中。 |
| 名称 | 类型 | 描述 |
|---|---|---|
| id | string | 客户系统中操作的标识符。 此编号对每个授权流程必须唯一 |
| client | client | 表示客户数据的对象,无论是捐赠方还是接收方。 |
| transaction_date | datetime | 交易开始的日期和时间,含时区。 |
| dict_key | dict_key | 表示客户在交易中使用的 DICT 绑定密钥数据的对象。 |
| dict_key_type | 枚举 | DICT 绑定密钥类型。 |
| dict_operation_direction | 枚举 | DICT 中的操作方向,即密钥是被转让还是被获取。 |
| dict_operation_reason | 枚举 | 执行 Dict 操作的原因。 |
| dict_operation_creation_date | datetime | DICT 中操作的日期。 |
| dict_operation_type | 枚举 | DICT 中操作的类型。 |
| source_account | source_account | 表示正在转让绑定密钥的账户数据的对象。 |
| destination_account | destination_account | 表示正在接收绑定密钥的账户数据的对象。 |
| destination_statistics | destination_statistics | 表示正在接收绑定密钥的账户的交易和欺诈历史的对象。 |
| source | source | Source 类型的对象,描述用于发送注册的应用程序信息 |
dict_key_type 字段接受与 DICT API 中定义的相同枚举值:cpf、cnpj、email、phone 和 evp。
dict_operation_direction 字段接受枚举值:donor 和 claimer。
dict_operation_type 字段接受枚举值 registration、claim_ownership 和 claim_portability。
这些是 BCB 定义的 DICT 中所有操作类型。
发送 Dict Operation
Request Body
{
"id": "f58e8a19-429d-4e36-a010-ed00a323c2c5",
...
}
Response Body
{
"dict_operation_key": "7f85e162-5a7d-41fa-a578-69df6f3df958",
"status": "automatically_approved"
}
要评估支付,只需将 Payment 类型的对象发送到以下端点:
POST https://api.caas.qitech.app/pix/dict_operation
查询 Dict Operation
Response Body
{
"id": "f58e8a19-429d-4e36-a010-ed00a323c2c5",
...
}
要查询 Dict Operation,只需向以下端点发送请求:
GET https://api.caas.qitech.app/pix/dict_operation/{dict_operation_id}
其中 dict_operation_id 是在注册时发送给我们的操作标识符,位于 "id" 字段中。
随后将返回与提供的密钥关联的 Dict Operation 对象。
更新 Dict Operation
Request Body
{
"dict_operation_status": "cancelled_by_client",
"reason": "user_requested",
"event_date": "2020-10-07T15:06:25-03:00"
}
Dict Operation 在 BCB 完成前有多个阶段。因此,需要通过以下端点通知操作的所有状态更新:
PUT https://api.caas.qitech.app/pix/dict_operation/{dict_operation_id}
这样可以确保我们的数据库保持更新,与 BCB 数据库始终保持一致。
某些 DICT 操作要求随数据一起提交操作原因。对于这些情况,需要在发送对象中填写 reason 字段,包含向 BCB 系统提供的相同枚举值。 这些枚举值为:
| 枚举值 | 描述 |
|---|---|
| user_requested | 操作由客户请求。 |
| account_closure | 操作因客户账户关闭而发起。 |
| branch_transfer | 操作因客户支行变更而请求。 |
| entry_inactivity | 操作因客户账户不活跃而请求。 |
| reconciliation | 操作在对账流程后请求。 |
| default_operation | 操作由参与方的默认操作请求。 |
| fraud | 操作因与客户账户相关的欺诈而请求。 |
dict_operation_status 字段接受的操作 阶段如下:
| 枚举值 | 描述 |
|---|---|
| created | dict_operation 已创建但尚未分析。 |
| reproved | dict_operation 在分析中被拒绝,不会发送给 BCB。 |
| waiting_resolution | dict_operation 已发送给 BCB,等待解决。 |
| cancelled_by_client | dict_operation 被客户取消。 |
| cancelled_by_counterpart | dict_operation 被操作对方取消。 |
| confirmed | dict_operation 已被操作对方确认。 |
| completed | dict_operation 已完成并添加到 BCB 数据库。 |