Skip to content

查询风险订单

商户可调用该接口,查询风险订单,从而进行之后的风险管控&生态建设。

请求参数类型描述
jsonobject声明请求的JSON数据结构
sp_mchidstring服务商商户号
sub_mchidstring子商户号
mchidstring商户号
start_timestring开始时间
end_timestring结束时间
page_indexnumber查询页码
page_sizenumber查询页大小
php
$instance->v3->merchantRiskManage->ecTradeRisk->queryRiskTrades->postAsync([
  'json' => [
    'sp_mchid'   => '1900000109',
    'sub_mchid'  => '1900009231',
    'mchid'      => '1900009231',
    'start_time' => '2025-05-20T13:29:35+08:00',
    'end_time'   => '2025-05-20T13:29:35+08:00',
    'page_index' => 1,
    'page_size'  => 10,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/merchant-risk-manage/ec-trade-risk/query-risk-trades')->postAsync([
  'json' => [
    'sp_mchid'   => '1900000109',
    'sub_mchid'  => '1900009231',
    'mchid'      => '1900009231',
    'start_time' => '2025-05-20T13:29:35+08:00',
    'end_time'   => '2025-05-20T13:29:35+08:00',
    'page_index' => 1,
    'page_size'  => 10,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/merchant-risk-manage/ec-trade-risk/query-risk-trades']->postAsync([
  'json' => [
    'sp_mchid'   => '1900000109',
    'sub_mchid'  => '1900009231',
    'mchid'      => '1900009231',
    'start_time' => '2025-05-20T13:29:35+08:00',
    'end_time'   => '2025-05-20T13:29:35+08:00',
    'page_index' => 1,
    'page_size'  => 10,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->merchantRiskManage->ecTradeRisk->queryRiskTrades->post([
  'json' => [
    'sp_mchid'   => '1900000109',
    'sub_mchid'  => '1900009231',
    'mchid'      => '1900009231',
    'start_time' => '2025-05-20T13:29:35+08:00',
    'end_time'   => '2025-05-20T13:29:35+08:00',
    'page_index' => 1,
    'page_size'  => 10,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/merchant-risk-manage/ec-trade-risk/query-risk-trades')->post([
  'json' => [
    'sp_mchid'   => '1900000109',
    'sub_mchid'  => '1900009231',
    'mchid'      => '1900009231',
    'start_time' => '2025-05-20T13:29:35+08:00',
    'end_time'   => '2025-05-20T13:29:35+08:00',
    'page_index' => 1,
    'page_size'  => 10,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/merchant-risk-manage/ec-trade-risk/query-risk-trades']->post([
  'json' => [
    'sp_mchid'   => '1900000109',
    'sub_mchid'  => '1900009231',
    'mchid'      => '1900009231',
    'start_time' => '2025-05-20T13:29:35+08:00',
    'end_time'   => '2025-05-20T13:29:35+08:00',
    'page_index' => 1,
    'page_size'  => 10,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
total_numnumber总风险订单数
risk_trade_listobject[]风险订单列表
mchidstring商户号
out_trade_nostring商户订单号
risk_typenumber风险类型
1 | 2 | 3 | 4 枚举值之一
risk_levelnumber风险等级
1 | 2 | 3 枚举值之一
risk_discove_timestring投诉单状态

参阅 官方文档 官方文档

Published on the GitHub by TheNorthMemory