Skip to content

冲红电子发票

商户对已开具的电子发票进行冲红(开具红票),并将其从微信用户的卡包中删除。

请求参数类型描述
fapiao_apply_idstring发票申请单号
jsonobject声明请求的JSON数据结构
sub_mchidstring子商户号
reverse_reasonstring冲红原因
fapiao_informationobject[]需要冲红的发票信息
fapiao_idstring商户发票单号
fapiao_codestring发票代码
fapiao_numberstring发票号码
php
$instance->v3->newTaxControlFapiao->fapiaoApplications->_fapiao_apply_id_->reverse->postAsync([
  'fapiao_apply_id' => '4200000444201910177461284488',
  'json' => [
    'sub_mchid'          => '1900000109',
    'reverse_reason'     => '退款',
    'fapiao_information' => [[
      'fapiao_id'     => '20200701123456',
      'fapiao_code'   => '044001911211',
      'fapiao_number' => '12897794',
    ],],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 202);
})
->wait();
php
$instance->chain('v3/new-tax-control-fapiao/fapiao-applications/{fapiao_apply_id}/reverse')->postAsync([
  'fapiao_apply_id' => '4200000444201910177461284488',
  'json' => [
    'sub_mchid'          => '1900000109',
    'reverse_reason'     => '退款',
    'fapiao_information' => [[
      'fapiao_id'     => '20200701123456',
      'fapiao_code'   => '044001911211',
      'fapiao_number' => '12897794',
    ],],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 202);
})
->wait();
php
$instance['v3/new-tax-control-fapiao/fapiao-applications/{fapiao_apply_id}/reverse']->postAsync([
  'fapiao_apply_id' => '4200000444201910177461284488',
  'json' => [
    'sub_mchid'          => '1900000109',
    'reverse_reason'     => '退款',
    'fapiao_information' => [[
      'fapiao_id'     => '20200701123456',
      'fapiao_code'   => '044001911211',
      'fapiao_number' => '12897794',
    ],],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 202);
})
->wait();
php
$response = $instance->v3->newTaxControlFapiao->fapiaoApplications->_fapiao_apply_id_->reverse->post([
  'fapiao_apply_id' => '4200000444201910177461284488',
  'json' => [
    'sub_mchid'          => '1900000109',
    'reverse_reason'     => '退款',
    'fapiao_information' => [[
      'fapiao_id'     => '20200701123456',
      'fapiao_code'   => '044001911211',
      'fapiao_number' => '12897794',
    ],],
  ],
]);
print_r($response->getStatusCode() === 202);
php
$response = $instance->chain('v3/new-tax-control-fapiao/fapiao-applications/{fapiao_apply_id}/reverse')->post([
  'fapiao_apply_id' => '4200000444201910177461284488',
  'json' => [
    'sub_mchid'          => '1900000109',
    'reverse_reason'     => '退款',
    'fapiao_information' => [[
      'fapiao_id'     => '20200701123456',
      'fapiao_code'   => '044001911211',
      'fapiao_number' => '12897794',
    ],],
  ],
]);
print_r($response->getStatusCode() === 202);
php
$response = $instance['v3/new-tax-control-fapiao/fapiao-applications/{fapiao_apply_id}/reverse']->post([
  'fapiao_apply_id' => '4200000444201910177461284488',
  'json' => [
    'sub_mchid'          => '1900000109',
    'reverse_reason'     => '退款',
    'fapiao_information' => [[
      'fapiao_id'     => '20200701123456',
      'fapiao_code'   => '044001911211',
      'fapiao_number' => '12897794',
    ],],
  ],
]);
print_r($response->getStatusCode() === 202);
返回字典类型描述

参阅 官方文档

Published on the GitHub by TheNorthMemory