跳到主要内容

取款

当用户执行取款时,取款数据应发送给 QI Tech。这样,可以根据该数据集对操作所涉及的风险进行分析。

取款对象定义

Request Body
{
"id": "082373263",
"amount": 12979,
"withdrawal_date": "2020-10-07T15:06:25-03:00",
"service_description": "SAQUE EM CAIXA 24H",
"source_account": {
"participant": "17315359",
"branch": "0000",
"account_number": "10442",
"account_digit": "6",
"account_type": "CACC",
"opening_date": "2020-01-15T18:00:00-03:00"
},
"client": {
"id": "182373263",
"type": "natural_person",
"document_number": "023.456.789-01",
"name": "John Payer",
"email": "john@payer.com",
"address": {
"street": "Av. Eng. Luis Carlos Berrini",
"number": "105",
"neighbourhood": "Brooklin",
"city": "São Paulo",
"uf": "SP",
"complement": "Cj 303",
"postal_code": "04501-140"
},
"phone": {
"international_dial_code": "55",
"area_code": "11",
"number": "998861708",
"type": "mobile"
},
"sales_channel": "inbound_sales",
"segment": "Personalité"
},
"terminal": {
"id": "1234566",
"latitude": -45.2753548,
"longitude": -15.24587,
"address": {
"street": "Av. Eng. Luis Carlos Berrini",
"number": "105",
"neighbourhood": "Brooklin",
"city": "São Paulo",
"uf": "SP",
"complement": "Cj 303",
"postal_code": "04501-140"
},
"type": "atm"
},
"authentication": {
"used_password": true,
"used_card": true,
"used_fingerprint": true,
"typed_account_number": false
}
}

取款必须在转发到处理系统之前发送到 API,以便进行预先欺诈验证。

取款状态表示模型对该账户返回的决策。以下状态用于 analysis_status 标志:

  • automatically_approved
  • automatically_reproved

以下是 analysis_status 标志中返回的每个决策的含义:

状态描述
automatically_approved建议批准此取款。
automatically_reproved建议拒绝此取款。
名称类型描述
idstring客户系统中取款的标识符。
此编号对每笔取款必须唯一
amount整数取款金额(分)——如"标准"部分所述。
withdrawal_datedatetime取款执行的日期和时间——如"标准"部分所述
source_accountaccount确定待取款资金来源账户的对象
clientclient包含来源账户持有人数据的对象
terminalterminal包含执行取款的终端数据的对象
authenticationauthentication包含认证信息的对象

取款相关对象

Terminal 对象

Request Body
{
"id": "1234566",
"latitude": -45.2753548,
"longitude": -15.24587,
"address": {
"street": "Av. Eng. Luis Carlos Berrini",
"number": "105",
"neighbourhood": "Brooklin",
"city": "São Paulo",
"uf": "SP",
"complement": "Cj 303",
"postal_code": "04501-140"
},
"type": "atm"
}

表示用于取款的终端的对象。

名称类型描述
idstring客户系统中终端的标识符
latitudenumber终端位置的纬度(度)
longitudenumber终端位置的经度(度)
addressaddress终端地址
type枚举终端类型,可能值:"atm"、"counter"

Authentication 对象

Request Body
{
"used_password": true,
"used_card": true,
"used_fingerprint": true,
"typed_account_number": false
}

定义取款时使用的认证参数的对象。

名称类型描述
used_passwordboolean确定用户是否使用了密码
used_cardboolean确定用户在认证时是否携带卡片
used_card_chip_and_pinboolean确定用户是否使用了芯片和密码
used_card_magnetic_stripeboolean确定用户是否使用了磁条
used_fingerprintboolean确定用户是否使用了指纹
typed_account_numberboolean确定用户是否输入了账户数据

发送取款

Request Body
  {
"id": "12345",
...
}
Response Body
  {
"withdrawal_key": "13d680ef-4b72-4cb2-a63d-cf3d790abaaf",
"status": "automatically_approved",
"reason": "rule_decision_enum"
}

要评估账单支付,只需将 withdrawal 类型的对象发送到以下端点:

POST https://api.caas.qitech.app/withdrawal/withdrawal

查询取款

Request Body
  {
"id": "082373263",
"amount": 12979,
...
}

要检索取款数据,只需向以下端点发送请求:

GET https://api.caas.qitech.app/withdrawal/withdrawal/{withdrawal_id}

其中 withdrawal_id 是发送取款时在客户系统中使用的交易标识符。

更新取款

Request Body
  {
"withdrawal_status": "completed",
"event_date": "2020-10-07T15:06:25-03:00"
}
Response Body
  {
"withdrawal_key": "13d680ef-4b72-4cb2-a63d-cf3d790abaaf",
"withdrawal_status": "completed"
}

取款创建并分析后,资金将提供给用户。此流程可能因其他业务规则而中断。因此,需要在取款完成时通过以下端点通知取款状态更新:

PUT https://api.caas.qitech.app/withdrawal/withdrawal/{withdrawal_id}

这样可以确保我们的数据库保持更新,并能够识别真正易受欺诈影响的取款。