Skip to content

申请二级商户商家转账授权

申请二级商户商家转账授权。

请求参数类型描述
jsonobject声明请求的JSON数据结构
sub_mchidstring二级商户号
agreement_listobject[]签约协议列表
agreement_codestring协议编号
agreement_versionstring协议版本号
sign_organizationstring签约主体
sign_timestring签约时间
php
$instance->v3->ecommerce->mchTransfer->authorizations->postAsync([
  'json' => [
    'sub_mchid' => '1900001109',
    'agreement_list' => [[
      'agreement_code' => '1',
      'agreement_version' => '20230101',
      'sign_organization' => '示例有限责任公司',
      'sign_time' => '2015-05-20T13:29:35.120+08:00',
    ],],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/ecommerce/mch-transfer/authorizations')->postAsync([
  'json' => [
    'sub_mchid' => '1900001109',
    'agreement_list' => [[
      'agreement_code' => '1',
      'agreement_version' => '20230101',
      'sign_organization' => '示例有限责任公司',
      'sign_time' => '2015-05-20T13:29:35.120+08:00',
    ],],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/ecommerce/mch-transfer/authorizations']->postAsync([
  'json' => [
    'sub_mchid' => '1900001109',
    'agreement_list' => [[
      'agreement_code' => '1',
      'agreement_version' => '20230101',
      'sign_organization' => '示例有限责任公司',
      'sign_time' => '2015-05-20T13:29:35.120+08:00',
    ],],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->ecommerce->mchTransfer->authorizations->post([
  'json' => [
    'sub_mchid' => '1900001109',
    'agreement_list' => [[
      'agreement_code' => '1',
      'agreement_version' => '20230101',
      'sign_organization' => '示例有限责任公司',
      'sign_time' => '2015-05-20T13:29:35.120+08:00',
    ],],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/ecommerce/mch-transfer/authorizations')->post([
  'json' => [
    'sub_mchid' => '1900001109',
    'agreement_list' => [[
      'agreement_code' => '1',
      'agreement_version' => '20230101',
      'sign_organization' => '示例有限责任公司',
      'sign_time' => '2015-05-20T13:29:35.120+08:00',
    ],],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/ecommerce/mch-transfer/authorizations']->post([
  'json' => [
    'sub_mchid' => '1900001109',
    'agreement_list' => [[
      'agreement_code' => '1',
      'agreement_version' => '20230101',
      'sign_organization' => '示例有限责任公司',
      'sign_time' => '2015-05-20T13:29:35.120+08:00',
    ],],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
sub_mchidstring二级商户号
authorization_statestring授权状态
accept_timestring授权申请受理时间
authorize_timestring授权时间

参阅 官方文档

Published on the GitHub by TheNorthMemory