Skip to content

请求售后服务分账

请求参数类型描述
jsonobject声明请求的JSON数据结构
sub_mchidstring二级商户号
transaction_idstring微信订单号
amountinteger回退金额
typestring类型
SERVICE_FEE_INCOME 枚举值
scenestring场景
REFUND_TICKET | CHANGE_TICKET | RETURN_GOODS 枚举值之一
refund_idstring微信退款单号
php
$instance->v3->ecommerce->profitsharing->afterSalesOrders->postAsync([
  'json' => [
    'sub_mchid' => '1900000109',
    'transaction_id' => '3008450740201411110007820472',
    'amount' => 10,
    'type' => 'SERVICE_FEE_INCOME',
    'scene' => 'REFUND_TICKET',
    'refund_id' => '',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/ecommerce/profitsharing/after-sales-orders')->postAsync([
  'json' => [
    'sub_mchid' => '1900000109',
    'transaction_id' => '3008450740201411110007820472',
    'amount' => 10,
    'type' => 'SERVICE_FEE_INCOME',
    'scene' => 'REFUND_TICKET',
    'refund_id' => '',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/ecommerce/profitsharing/after-sales-orders']->postAsync([
  'json' => [
    'sub_mchid' => '1900000109',
    'transaction_id' => '3008450740201411110007820472',
    'amount' => 10,
    'type' => 'SERVICE_FEE_INCOME',
    'scene' => 'REFUND_TICKET',
    'refund_id' => '',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->ecommerce->profitsharing->afterSalesOrders->post([
  'json' => [
    'sub_mchid' => '1900000109',
    'transaction_id' => '3008450740201411110007820472',
    'amount' => 10,
    'type' => 'SERVICE_FEE_INCOME',
    'scene' => 'REFUND_TICKET',
    'refund_id' => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/ecommerce/profitsharing/after-sales-orders')->post([
  'json' => [
    'sub_mchid' => '1900000109',
    'transaction_id' => '3008450740201411110007820472',
    'amount' => 10,
    'type' => 'SERVICE_FEE_INCOME',
    'scene' => 'REFUND_TICKET',
    'refund_id' => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/ecommerce/profitsharing/after-sales-orders']->post([
  'json' => [
    'sub_mchid' => '1900000109',
    'transaction_id' => '3008450740201411110007820472',
    'amount' => 10,
    'type' => 'SERVICE_FEE_INCOME',
    'scene' => 'REFUND_TICKET',
    'refund_id' => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
sub_mchidstring二级商户号
transaction_idstring微信订单号
amountinteger分账金额

参阅 官方文档

查询售后服务分账结果

请求参数类型描述
queryobject声明请求的查询参数
sub_mchidstring二级商户号
transaction_idstring微信订单号
php
$instance->v3->ecommerce->profitsharing->afterSalesOrders->getAsync([
  'query' => [
    'sub_mchid' => '',
    'transaction_id' => '',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/ecommerce/profitsharing/after-sales-orders')->getAsync([
  'query' => [
    'sub_mchid' => '',
    'transaction_id' => '',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/ecommerce/profitsharing/after-sales-orders']->getAsync([
  'query' => [
    'sub_mchid' => '',
    'transaction_id' => '',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->ecommerce->profitsharing->afterSalesOrders->get([
  'query' => [
    'sub_mchid' => '',
    'transaction_id' => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/ecommerce/profitsharing/after-sales-orders')->get([
  'query' => [
    'sub_mchid' => '',
    'transaction_id' => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/ecommerce/profitsharing/after-sales-orders']->get([
  'query' => [
    'sub_mchid' => '',
    'transaction_id' => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
sub_mchidstring二级商户号
transaction_idstring微信分账单号
amountinteger分账金额
resultstring分账结果
PROCESSING | SUCCESS | FAILED 枚举值之一
fail_reasonstring分账失败原因
ACCOUNT_ABNORMAL | NO_RELATION | RECEIVER_HIGH_RISK 枚举值之一
finish_timestring分账完成时间

参阅 官方文档

Published on the GitHub by TheNorthMemory