Skip to content

特殊减额

接口限频:单特殊减额目标商户号100qps。接口幂等可重入时间:31天。余额不足处理:余额不足时,本接口会关单,关单成功后返回403-NOT_ENOUGH;因单据已关闭,重入接口时返回400-ALREADY_EXISTS

请求参数类型描述
jsonobject声明请求的JSON数据结构
mchidstring微信支付商户号
bal_account_nostring额度台账号
out_request_nostring特殊减额单号
reduction_typestring特殊减额类型
FINANCIAL_PENALTY | JUDICIAL_DEDUCTION 枚举值之一
amountinteger减额金额
reasonstring特殊减额原因
headersobject声明请求的头参数
Wechatpay-Serialstring微信支付公钥ID/平台证书序列号
php
$instance->v3->aggracctBc->wbChannel->specialReduction->postAsync([
  'json' => [
    'mchid'          => '1900016681',
    'bal_account_no' => '8609cb22e1774a50a930e414cc71eca06121bc',
    'out_request_no' => 'htozr8denqegbt6tk6u10iymo7yww5pn',
    'reduction_type' => 'JUDICIAL_DEDUCTION',
    'amount'         => 1,
    'reason'         => '司法案件号:202508080009',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/aggracct-bc/wb-channel/special-reduction')->postAsync([
  'json' => [
    'mchid'          => '1900016681',
    'bal_account_no' => '8609cb22e1774a50a930e414cc71eca06121bc',
    'out_request_no' => 'htozr8denqegbt6tk6u10iymo7yww5pn',
    'reduction_type' => 'JUDICIAL_DEDUCTION',
    'amount'         => 1,
    'reason'         => '司法案件号:202508080009',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/aggracct-bc/wb-channel/special-reduction']->postAsync([
  'json' => [
    'mchid'          => '1900016681',
    'bal_account_no' => '8609cb22e1774a50a930e414cc71eca06121bc',
    'out_request_no' => 'htozr8denqegbt6tk6u10iymo7yww5pn',
    'reduction_type' => 'JUDICIAL_DEDUCTION',
    'amount'         => 1,
    'reason'         => '司法案件号:202508080009',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->aggracctBc->wbChannel->specialReduction->post([
  'json' => [
    'mchid'          => '1900016681',
    'bal_account_no' => '8609cb22e1774a50a930e414cc71eca06121bc',
    'out_request_no' => 'htozr8denqegbt6tk6u10iymo7yww5pn',
    'reduction_type' => 'JUDICIAL_DEDUCTION',
    'amount'         => 1,
    'reason'         => '司法案件号:202508080009',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/aggracct-bc/wb-channel/special-reduction')->post([
  'json' => [
    'mchid'          => '1900016681',
    'bal_account_no' => '8609cb22e1774a50a930e414cc71eca06121bc',
    'out_request_no' => 'htozr8denqegbt6tk6u10iymo7yww5pn',
    'reduction_type' => 'JUDICIAL_DEDUCTION',
    'amount'         => 1,
    'reason'         => '司法案件号:202508080009',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/aggracct-bc/wb-channel/special-reduction']->post([
  'json' => [
    'mchid'          => '1900016681',
    'bal_account_no' => '8609cb22e1774a50a930e414cc71eca06121bc',
    'out_request_no' => 'htozr8denqegbt6tk6u10iymo7yww5pn',
    'reduction_type' => 'JUDICIAL_DEDUCTION',
    'amount'         => 1,
    'reason'         => '司法案件号:202508080009',
  ],
  'headers' => [
    'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
mchidstring微信支付商户号
bal_account_nostring额度台账号
out_request_nostring特殊减额单号
reduction_typestring特殊减额类型
FINANCIAL_PENALTY | JUDICIAL_DEDUCTION 枚举值之一
amountinteger减额金额
statestring处理结果
PROCESSING | SUCCESS | FAILED 枚举值之一
reasonstring特殊减额原因
quota_change_nostring微信支付额度变更单号
success_timestring成功时间
fail_timestring失败时间
fail_reasonstring失败原因
BALANCE_NOT_ENOUGH | RECEIPT_NOT_EXIST_CLOSED | TIME_OUT_CLOSED 枚举值之一

Published on the GitHub by TheNorthMemory