Skip to content

商户评估用户分层

请求参数类型描述
jsonobject声明请求的JSON数据结构
service_idstring服务ID
appidstring公众号ID
authorization_codestring授权协议号
openidstring用户标识
shopping_infoobject先用后付商品信息
goodsobject[]商品列表
namestring商品名称
picturestring商品图片链接
amountnumber商品单价金额
countnumber商品数量
category_idstring[]
php
$instance->v3->payscore->permissions->assessUserRiskLevel->postAsync([
  'json' => [
    'service_id' => '500001',
    'appid' => 'wxd678efh567hg6787',
    'authorization_code' => '1234323JKHDFE1243252',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'shopping_info' => [
      'goods' => [[
        'name' => '森海塞尔 MOMENTUM 4 无线耳机大馒头4 头戴式蓝牙音乐耳机自适应降噪',
        'picture' => 'http://mmbiz.qpic.cn/mmbiz_png/ldTw9dg46zkjOrzyTkbQAvQkysliaiblZhdthZWewgQMyqLZwStaNEsJrYmjwh2MlK7G4wibAFOEuISQKplSnxMWA/640?wx_fmt=png&wxfrom=200',
        'amount' => 550,
        'count' => 1,
        'category_id' => ['string'],
      ],],
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/payscore/permissions/assess-user-risk-level')->postAsync([
  'json' => [
    'service_id' => '500001',
    'appid' => 'wxd678efh567hg6787',
    'authorization_code' => '1234323JKHDFE1243252',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'shopping_info' => [
      'goods' => [[
        'name' => '森海塞尔 MOMENTUM 4 无线耳机大馒头4 头戴式蓝牙音乐耳机自适应降噪',
        'picture' => 'http://mmbiz.qpic.cn/mmbiz_png/ldTw9dg46zkjOrzyTkbQAvQkysliaiblZhdthZWewgQMyqLZwStaNEsJrYmjwh2MlK7G4wibAFOEuISQKplSnxMWA/640?wx_fmt=png&wxfrom=200',
        'amount' => 550,
        'count' => 1,
        'category_id' => ['string'],
      ],],
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/payscore/permissions/assess-user-risk-level']->postAsync([
  'json' => [
    'service_id' => '500001',
    'appid' => 'wxd678efh567hg6787',
    'authorization_code' => '1234323JKHDFE1243252',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'shopping_info' => [
      'goods' => [[
        'name' => '森海塞尔 MOMENTUM 4 无线耳机大馒头4 头戴式蓝牙音乐耳机自适应降噪',
        'picture' => 'http://mmbiz.qpic.cn/mmbiz_png/ldTw9dg46zkjOrzyTkbQAvQkysliaiblZhdthZWewgQMyqLZwStaNEsJrYmjwh2MlK7G4wibAFOEuISQKplSnxMWA/640?wx_fmt=png&wxfrom=200',
        'amount' => 550,
        'count' => 1,
        'category_id' => ['string'],
      ],],
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->payscore->permissions->assessUserRiskLevel->post([
  'json' => [
    'service_id' => '500001',
    'appid' => 'wxd678efh567hg6787',
    'authorization_code' => '1234323JKHDFE1243252',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'shopping_info' => [
      'goods' => [[
        'name' => '森海塞尔 MOMENTUM 4 无线耳机大馒头4 头戴式蓝牙音乐耳机自适应降噪',
        'picture' => 'http://mmbiz.qpic.cn/mmbiz_png/ldTw9dg46zkjOrzyTkbQAvQkysliaiblZhdthZWewgQMyqLZwStaNEsJrYmjwh2MlK7G4wibAFOEuISQKplSnxMWA/640?wx_fmt=png&wxfrom=200',
        'amount' => 550,
        'count' => 1,
        'category_id' => ['string'],
      ],],
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/payscore/permissions/assess-user-risk-level')->post([
  'json' => [
    'service_id' => '500001',
    'appid' => 'wxd678efh567hg6787',
    'authorization_code' => '1234323JKHDFE1243252',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'shopping_info' => [
      'goods' => [[
        'name' => '森海塞尔 MOMENTUM 4 无线耳机大馒头4 头戴式蓝牙音乐耳机自适应降噪',
        'picture' => 'http://mmbiz.qpic.cn/mmbiz_png/ldTw9dg46zkjOrzyTkbQAvQkysliaiblZhdthZWewgQMyqLZwStaNEsJrYmjwh2MlK7G4wibAFOEuISQKplSnxMWA/640?wx_fmt=png&wxfrom=200',
        'amount' => 550,
        'count' => 1,
        'category_id' => ['string'],
      ],],
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/payscore/permissions/assess-user-risk-level']->post([
  'json' => [
    'service_id' => '500001',
    'appid' => 'wxd678efh567hg6787',
    'authorization_code' => '1234323JKHDFE1243252',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'shopping_info' => [
      'goods' => [[
        'name' => '森海塞尔 MOMENTUM 4 无线耳机大馒头4 头戴式蓝牙音乐耳机自适应降噪',
        'picture' => 'http://mmbiz.qpic.cn/mmbiz_png/ldTw9dg46zkjOrzyTkbQAvQkysliaiblZhdthZWewgQMyqLZwStaNEsJrYmjwh2MlK7G4wibAFOEuISQKplSnxMWA/640?wx_fmt=png&wxfrom=200',
        'amount' => 550,
        'count' => 1,
        'category_id' => ['string'],
      ],],
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
service_idstring服务ID
appidstring公众号ID
mchidstring商户号
openidstring用户标识
authorization_codestring授权协议号
authorization_statestring授权状态
notify_urlstring授权通知地址
cancel_authorization_timestring最近一次解除授权时间
authorization_success_timestring最近一次授权成功时间
sub_mchidstring子商户商户号
sub_appidstring子商户的公众号ID
sub_openidstring子商户的用户标识
user_labelstring用户标签
channel_idstring渠道商商户号
user_risk_levelnumber用户分层
risk_level_versionnumber分层版本

参阅 官方文档

Published on the GitHub by TheNorthMemory