Skip to content

营销补差回退

商户通过该接口可回退补差款

请求参数类型描述
jsonobject声明请求的JSON数据结构
stock_idstring商家券批次号
coupon_codestring商家券Code
transaction_idstring微信支付订单号
refund_idstring微信支付退款单号
payer_merchantstring原营销补差扣款商户号
payee_merchantstring原营销补差入账商户号
amountinteger补差回退金额
descriptionstring补差回退描述
out_subsidy_return_nostring业务请求唯一单号
php
$instance->v3->marketing->busifavor->subsidy->returnReceipts->postAsync([
  'json' => [
    'stock_id'              => '128888000000001',
    'coupon_code'           => 'ABCD12345678',
    'transaction_id'        => '4200000913202101152566792388',
    'refund_id'             => '50100506732021010105138718375',
    'payer_merchant'        => '1900000001',
    'payee_merchant'        => '1900000002',
    'amount'                => 100,
    'description'           => '20210115DESCRIPTION',
    'out_subsidy_return_no' => 'subsidy-abcd-12345678',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/busifavor/subsidy/return-receipts')->postAsync([
  'json' => [
    'stock_id'              => '128888000000001',
    'coupon_code'           => 'ABCD12345678',
    'transaction_id'        => '4200000913202101152566792388',
    'refund_id'             => '50100506732021010105138718375',
    'payer_merchant'        => '1900000001',
    'payee_merchant'        => '1900000002',
    'amount'                => 100,
    'description'           => '20210115DESCRIPTION',
    'out_subsidy_return_no' => 'subsidy-abcd-12345678',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/busifavor/subsidy/return-receipts']->postAsync([
  'json' => [
    'stock_id'              => '128888000000001',
    'coupon_code'           => 'ABCD12345678',
    'transaction_id'        => '4200000913202101152566792388',
    'refund_id'             => '50100506732021010105138718375',
    'payer_merchant'        => '1900000001',
    'payee_merchant'        => '1900000002',
    'amount'                => 100,
    'description'           => '20210115DESCRIPTION',
    'out_subsidy_return_no' => 'subsidy-abcd-12345678',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->busifavor->subsidy->returnReceipts->post([
  'json' => [
    'stock_id'              => '128888000000001',
    'coupon_code'           => 'ABCD12345678',
    'transaction_id'        => '4200000913202101152566792388',
    'refund_id'             => '50100506732021010105138718375',
    'payer_merchant'        => '1900000001',
    'payee_merchant'        => '1900000002',
    'amount'                => 100,
    'description'           => '20210115DESCRIPTION',
    'out_subsidy_return_no' => 'subsidy-abcd-12345678',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/busifavor/subsidy/return-receipts')->post([
  'json' => [
    'stock_id'              => '128888000000001',
    'coupon_code'           => 'ABCD12345678',
    'transaction_id'        => '4200000913202101152566792388',
    'refund_id'             => '50100506732021010105138718375',
    'payer_merchant'        => '1900000001',
    'payee_merchant'        => '1900000002',
    'amount'                => 100,
    'description'           => '20210115DESCRIPTION',
    'out_subsidy_return_no' => 'subsidy-abcd-12345678',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/busifavor/subsidy/return-receipts']->post([
  'json' => [
    'stock_id'              => '128888000000001',
    'coupon_code'           => 'ABCD12345678',
    'transaction_id'        => '4200000913202101152566792388',
    'refund_id'             => '50100506732021010105138718375',
    'payer_merchant'        => '1900000001',
    'payee_merchant'        => '1900000002',
    'amount'                => 100,
    'description'           => '20210115DESCRIPTION',
    'out_subsidy_return_no' => 'subsidy-abcd-12345678',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
subsidy_return_receipt_idstring补差回退单号
stock_idstring商家券批次号
coupon_codestring商家券Code
transaction_idstring微信支付订单号
refund_idstring微信支付退款单号
payer_merchantstring原营销补差扣款商户号
payee_merchantstring原营销补差入账商户号
amountinteger补差回退金额
descriptionstring补差回退描述
statusstring补差回退单据状态
fail_reasonstring补差回退失败原因
return_done_timestring补差回退完成时间
subsidy_receipt_idstring补差付款单号
out_subsidy_return_nostring业务请求唯一单号
return_create_timestring补差回退发起时间

参阅 官方文档

Published on the GitHub by TheNorthMemory