Pre PIX Transaction
当付款人有意发起付款时,交易数据可以事先由我们的服务器进行评估。这样,可以根据该数据集对交易所涉及的风险进行预先分析。
Pre Pix Transactions 对象定义
Request Body
{
"id": "082373263",
"transaction_direction": "received",
"client": {
"id": "123456",
"document_number": "056.966.649-03",
"name": "Francisco Oliveira Benedetti",
"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": "16",
"number": "981610077",
"type": "mobile"
},
"sales_channel": "inbound_sales",
"segment": "Personalité"
},
"amount": 13725,
"dict_key": {
"key_type": "cpf",
"key_value": "09991222669",
"assignment_date": "2020-01-15T18:00:00-03:00"
},
"face_recognition_key": "ef39e206-13d5-48de-b368-6c3bbc6f0222",
"source_account": {
"participant": "17315359",
"branch": "0000",
"account_number": "10442",
"account_digit": "6",
"owner": {
"type": "legal_person",
"document_number": "07.487.735/0001-69",
"name": "Gioconda Pizzaria e Rotisseria LTDA."
},
"account_type": "CACC",
"opening_date": "2020-01-15T18:00:00-03:00"
},
"destination_account": {
"participant": "60701190",
"branch": "3675",
"account_number": "10442",
"account_digit": "6",
"owner": {
"type": "natural_person",
"document_number": "056.966.649-03",
"name": "Francisco Oliveira Benedetti"
},
"account_type": "SLRY",
"opening_date": "2020-01-15T18:00:00-03:00"
},
"destination_statistics": {
"person":{
"settlements":{
"d90":4,
"m12":67,
"m60":618
},
"application_frauds":{
"d90":0,
"m12":4,
"m60":9
},
"mule_accounts":{
"d90":0,
"m12":0,
"m60":0
},
"scammer_accounts":{
"d90":0,
"m12":0,
"m60":0
},
"other_frauds":{
"d90":0,
"m12":0,
"m60":0
},
"unknown_frauds":{
"d90":0,
"m12":0,
"m60":0
},
"total_frauds_transaction_amount":{
"d90":0,
"m12":0,
"m60":0
},
"distinct_fraud_reporters":{
"d90":0,
"m12":0,
"m60":0
},
"open_reports":0,
"open_reports_distinct_reporters":0,
"rejected_reports":{
"d90":0,
"m12":0,
"m60":0
},
"registered_accounts":0
},
"owner":{
"settlements":{
"d90":0,
"m12":0,
"m60":0
},
"application_frauds":{
"d90":0,
"m12":0,
"m60":0
},
"mule_accounts":{
"d90":0,
"m12":0,
"m60":0
},
"scammer_accounts":{
"d90":0,
"m12":0,
"m60":0
},
"other_frauds":{
"d90":0,
"m12":0,
"m60":0
},
"unknown_frauds":{
"d90":0,
"m12":0,
"m60":0
},
"total_frauds_transaction_amount":{
"d90":0,
"m12":0,
"m60":0
},
"distinct_fraud_reporters":{
"d90":0,
"m12":0,
"m60":0
},
"open_reports":0,
"open_reports_distinct_reporters":0,
"registered_accounts":0
},
"key":{
"settlements":{
"d90":0,
"m12":0,
"m60":0
},
"application_frauds":{
"d90":0,
"m12":0,
"m60":0
},
"mule_accounts":{
"d90":0,
"m12":0,
"m60":0
},
"scammer_accounts":{
"d90":0,
"m12":0,
"m60":0
},
"other_frauds":{
"d90":0,
"m12":0,
"m60":0
},
"unknown_frauds":{
"d90":0,
"m12":0,
"m60":0
},
"total_frauds_transaction_amount":{
"d90":0,
"m12":0,
"m60":0
},
"distinct_fraud_reporters":{
"d90":0,
"m12":0,
"m60":0
},
"open_reports":0,
"open_reports_distinct_reporters":0,
"rejected_reports":{
"d90":0,
"m12":0,
"m60":0
},
"distinct_accounts":{
"d90":0,
"m12":0,
"m60":0
}
}
},
"source": {
"channel": "internet_banking",
"platform": "android",
"ip": "198.185.065.098",
"session_id": "7839jdqd9a8wd9"
},
"event_date": "2019-12-11T11:37:15.12-03:00"
}
交易必须在转发到处理系统之前发送到 API,以便进行预先欺诈验证。
交易状态表示模型对该交易返回的决策。以下状态用于 analysis_status 标志:
automatically_approvedautomatically_reprovedautomatically_challengedpending
以下是 analysis_status 标志中返回的每个决策的含义:
| 状态 | 描述 |
|---|---|
| automatically_approved | 建议批准此交易。 |
| automatically_reproved | 建议拒绝此交易。 |
| automatically_challenged | QI Tech 算法建议对此交易发起挑战。 |
| pending | 交易正在处理中。 |
| 名称 | 类型 | 描述 |
|---|---|---|
| id | string | 客户系统中支付的标识符。 此编号对每个支付流程必须唯一 (必填) |
| transaction_direction | 枚举 | 注册交易的类型。定义客户是收款还是付款。(必填) |
| client | client | 表示客户数据的对象,无论是付款人还是收款人。(必填) |
| amount | 整数 | 支付金额,以分为单位——如"标准"部分所述。(必填) |
| pix_modality | string | 注册交易的类型。指示是否表示转账、找零或取款。 |
| dict_key | dict_key | 表示客户在交易中使用的 DICT 绑定密钥数据的对象。 |
| face_recognition_key | string | 面部识别密钥,如果已通过我们的面部识别 API 进行面部识别。 |
| source_account | source_account | 表示被扣款账户数据的对象。(必填) |
| destination_account | destination_account | 表示被入账账户数据的对象。(必填) |
| destination_statistics | destination_statistics | 表示来自 BACEN DICT API 的被入账账户交易和欺诈历史的对象。 |
| source | source | Source 类型的对象,描述用于发送支付的应用程序信息 |
| event_date | datetime | 交易开始的日期和时间,含时区。(必填) |
transaction_direction 的枚举值为:sent 和 received。
pix_modality 的枚举值为:transacation、change 和 withdraw。
发送预交易
Request Body
{
"id": "12345",
...
}
Response Body
{
"id": "12345",
"analysis_status": "automatically_approved",
"reason": "rule_decision_enum",
"reason_desciption": "Descrição da regra"
}
要评估预交易,只需将 Transaction 类型的对象发送到以下端点:
POST https://api.caas.qitech.app/account_event/event_type/pre_pix_transaction
挑战流程
在执行分析后,可能会决定对用户发起挑战,要求其在您的平台上执行新操作。例如,此流程可用于要求用户进行 2FA(例如面部分析)。
流程执行步骤
1. 事件提交分析后,将返回 automatically_challenged 状态。
Request Body
{
"id": "082373263",
...
"event_date": "2019-12-11T11:37:15.12-03:00"
}
Response Body
{
"id": "082373263",
"analysis_status": "automatically_challenge"
...
}
2. 在第一次分析请求返回挑战 analysis_status 后,如果客户流程已完成,可以发送新请求附带结果。此请求必须使用与前一请求相同的 event_id,且当前状态必须为 automatically_challenged。此更新的可能状态为:
approved_by_clientreproved_by_client
PATCH https://api.caas.qitech.app/account_event/event_type/pre_pix_transaction/{event_id}
Request Body:附加信息的发送
{
"analysis_status": "approved_by_client"
}
Response Body
{
"id": "082373263",
"analysis_status": "approved_by_client"
...
}