Skip to content

商户贴息-获取微信分付曝光建议

获取微信分付曝光建议

请求参数类型描述
jsonobject声明请求的JSON数据结构
sp_mchidstring服务商户号
sp_appidstring服务商应用ID
sub_appidstring子商户/二级商户应用ID
sub_mchidstring子商户号/二级商户号
user_idobject用户ID
user_id_typestring用户ID的类型
UNKNOWN_USER_ID_TYPE | OPENID | PHONE_NO | SP_OPENID | SUB_OPENID 枚举值之一
sp_openidstring用户服务标识
sub_openidstring用户子标识
phone_number_hashstring用户手机号的哈希值
php
$instance->v3->pay->instal->partner->exposure->postAsync([
  'json' => [
    'sp_mchid'  => '1230000109',
    'sp_appid'  => 'wx8888888888888888',
    'sub_appid' => 'wxd678efh567hg6999',
    'sub_mchid' => '1900000109',
    'user_id'   => [
      'user_id_type'      => 'OPENID',
      'sp_openid'         => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
      'sub_openid'        => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
      'phone_number_hash' => 'ABDEF3445546456B',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/pay/instal/partner/exposure')->postAsync([
  'json' => [
    'sp_mchid'  => '1230000109',
    'sp_appid'  => 'wx8888888888888888',
    'sub_appid' => 'wxd678efh567hg6999',
    'sub_mchid' => '1900000109',
    'user_id'   => [
      'user_id_type'      => 'OPENID',
      'sp_openid'         => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
      'sub_openid'        => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
      'phone_number_hash' => 'ABDEF3445546456B',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/pay/instal/partner/exposure']->postAsync([
  'json' => [
    'sp_mchid'  => '1230000109',
    'sp_appid'  => 'wx8888888888888888',
    'sub_appid' => 'wxd678efh567hg6999',
    'sub_mchid' => '1900000109',
    'user_id'   => [
      'user_id_type'      => 'OPENID',
      'sp_openid'         => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
      'sub_openid'        => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
      'phone_number_hash' => 'ABDEF3445546456B',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->pay->instal->partner->exposure->post([
  'json' => [
    'sp_mchid'  => '1230000109',
    'sp_appid'  => 'wx8888888888888888',
    'sub_appid' => 'wxd678efh567hg6999',
    'sub_mchid' => '1900000109',
    'user_id'   => [
      'user_id_type'      => 'OPENID',
      'sp_openid'         => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
      'sub_openid'        => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
      'phone_number_hash' => 'ABDEF3445546456B',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/pay/instal/partner/exposure')->post([
  'json' => [
    'sp_mchid'  => '1230000109',
    'sp_appid'  => 'wx8888888888888888',
    'sub_appid' => 'wxd678efh567hg6999',
    'sub_mchid' => '1900000109',
    'user_id'   => [
      'user_id_type'      => 'OPENID',
      'sp_openid'         => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
      'sub_openid'        => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
      'phone_number_hash' => 'ABDEF3445546456B',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/pay/instal/partner/exposure']->post([
  'json' => [
    'sp_mchid'  => '1230000109',
    'sp_appid'  => 'wx8888888888888888',
    'sub_appid' => 'wxd678efh567hg6999',
    'sub_mchid' => '1900000109',
    'user_id'   => [
      'user_id_type'      => 'OPENID',
      'sp_openid'         => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
      'sub_openid'        => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
      'phone_number_hash' => 'ABDEF3445546456B',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
recommend_exposureboolean是否建议曝光微信分付

参阅 官方文档

Published on the GitHub by TheNorthMemory