Skip to content

上传商家电子小票跳转信息

接口介绍:可通过该接口给对应的微信支付订单上传商家电子小票跳转信息。上传成功后,用户可以在账单详情页看到对应的跳转入口。

请求参数类型描述
jsonobject声明请求的JSON数据结构
transaction_idstring微信支付订单号
transaction_mchidstring商户号
transaction_sub_mchidstring子商户号
openidstring下单用户OpenID
merchant_upload_timestring商户上传时间
jump_infoobject跳转信息
merchant_appidstring商户电子小票跳转信息小程序AppID
merchant_pathstring商户电子小票跳转信息小程序路径
php
$instance->v3->marketing->shoppingReceipt->merchantshoppingreceiptjumpinfos->postAsync([
  'json' => [
    'transaction_id' => '4200000008202209139188072801',
    'transaction_mchid' => '1230000109',
    'transaction_sub_mchid' => '1230000109',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'merchant_upload_time' => '2021-05-20T13:29:35.120+08:00',
    'jump_info' => [
      'merchant_appid' => 'example_merchant_appid',
      'merchant_path' => 'example_merchant_path',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/shopping-receipt/merchantshoppingreceiptjumpinfos')->postAsync([
  'json' => [
    'transaction_id' => '4200000008202209139188072801',
    'transaction_mchid' => '1230000109',
    'transaction_sub_mchid' => '1230000109',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'merchant_upload_time' => '2021-05-20T13:29:35.120+08:00',
    'jump_info' => [
      'merchant_appid' => 'example_merchant_appid',
      'merchant_path' => 'example_merchant_path',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/shopping-receipt/merchantshoppingreceiptjumpinfos']->postAsync([
  'json' => [
    'transaction_id' => '4200000008202209139188072801',
    'transaction_mchid' => '1230000109',
    'transaction_sub_mchid' => '1230000109',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'merchant_upload_time' => '2021-05-20T13:29:35.120+08:00',
    'jump_info' => [
      'merchant_appid' => 'example_merchant_appid',
      'merchant_path' => 'example_merchant_path',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->shoppingReceipt->merchantshoppingreceiptjumpinfos->post([
  'json' => [
    'transaction_id' => '4200000008202209139188072801',
    'transaction_mchid' => '1230000109',
    'transaction_sub_mchid' => '1230000109',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'merchant_upload_time' => '2021-05-20T13:29:35.120+08:00',
    'jump_info' => [
      'merchant_appid' => 'example_merchant_appid',
      'merchant_path' => 'example_merchant_path',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/shopping-receipt/merchantshoppingreceiptjumpinfos')->post([
  'json' => [
    'transaction_id' => '4200000008202209139188072801',
    'transaction_mchid' => '1230000109',
    'transaction_sub_mchid' => '1230000109',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'merchant_upload_time' => '2021-05-20T13:29:35.120+08:00',
    'jump_info' => [
      'merchant_appid' => 'example_merchant_appid',
      'merchant_path' => 'example_merchant_path',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/shopping-receipt/merchantshoppingreceiptjumpinfos']->post([
  'json' => [
    'transaction_id' => '4200000008202209139188072801',
    'transaction_mchid' => '1230000109',
    'transaction_sub_mchid' => '1230000109',
    'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
    'merchant_upload_time' => '2021-05-20T13:29:35.120+08:00',
    'jump_info' => [
      'merchant_appid' => 'example_merchant_appid',
      'merchant_path' => 'example_merchant_path',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
merchant_jump_infoobject商家电子小票跳转信息
transaction_idstring微信支付订单号
transaction_mchidstring商户号
transaction_sub_mchidstring子商户号
openidstring下单用户OpenID
merchant_upload_timestring商户上传时间
jump_infoobject跳转信息
merchant_appidstring商户电子小票跳转信息小程序AppID
merchant_pathstring商户电子小票跳转信息小程序路径
create_timestring创建时间
modify_timestring修改时间
brand_idinteger归属品牌ID

参阅 官方文档

Published on the GitHub by TheNorthMemory