Skip to content

申请公益捐赠预算

申请公益捐赠预算 注:单个商户的接口频率限制为50次/s

请求参数类型描述
jsonobject声明请求的JSON数据结构
out_budget_nostring商户预算单号
sponsor_mchidstring出资商户号
sponsor_subject_namestring出资企业主体名称
activity_namestring活动名称
activity_remarkstring活动说明
amountnumber预算总金额
notify_urlstring回调地址
php
$instance->v3->fundApp->mchTransfer->partner->charityBudget->postAsync([
  'json' => [
    'out_budget_no'        => 'budget202506300102',
    'sponsor_mchid'        => '1900001109',
    'sponsor_subject_name' => '腾讯控股有限公司',
    'activity_name'        => '公益企业配捐活动',
    'activity_remark'      => '公益活动开始于9月1日,帮助困难儿童筹款活动',
    'amount'               => 20000000,
    'notify_url'           => 'https://www.weixin.qq.com/wxpay/pay.php',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/fund-app/mch-transfer/partner/charity-budget')->postAsync([
  'json' => [
    'out_budget_no'        => 'budget202506300102',
    'sponsor_mchid'        => '1900001109',
    'sponsor_subject_name' => '腾讯控股有限公司',
    'activity_name'        => '公益企业配捐活动',
    'activity_remark'      => '公益活动开始于9月1日,帮助困难儿童筹款活动',
    'amount'               => 20000000,
    'notify_url'           => 'https://www.weixin.qq.com/wxpay/pay.php',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/fund-app/mch-transfer/partner/charity-budget']->postAsync([
  'json' => [
    'out_budget_no'        => 'budget202506300102',
    'sponsor_mchid'        => '1900001109',
    'sponsor_subject_name' => '腾讯控股有限公司',
    'activity_name'        => '公益企业配捐活动',
    'activity_remark'      => '公益活动开始于9月1日,帮助困难儿童筹款活动',
    'amount'               => 20000000,
    'notify_url'           => 'https://www.weixin.qq.com/wxpay/pay.php',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->fundApp->mchTransfer->partner->charityBudget->post([
  'json' => [
    'out_budget_no'        => 'budget202506300102',
    'sponsor_mchid'        => '1900001109',
    'sponsor_subject_name' => '腾讯控股有限公司',
    'activity_name'        => '公益企业配捐活动',
    'activity_remark'      => '公益活动开始于9月1日,帮助困难儿童筹款活动',
    'amount'               => 20000000,
    'notify_url'           => 'https://www.weixin.qq.com/wxpay/pay.php',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/fund-app/mch-transfer/partner/charity-budget')->post([
  'json' => [
    'out_budget_no'        => 'budget202506300102',
    'sponsor_mchid'        => '1900001109',
    'sponsor_subject_name' => '腾讯控股有限公司',
    'activity_name'        => '公益企业配捐活动',
    'activity_remark'      => '公益活动开始于9月1日,帮助困难儿童筹款活动',
    'amount'               => 20000000,
    'notify_url'           => 'https://www.weixin.qq.com/wxpay/pay.php',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/fund-app/mch-transfer/partner/charity-budget']->post([
  'json' => [
    'out_budget_no'        => 'budget202506300102',
    'sponsor_mchid'        => '1900001109',
    'sponsor_subject_name' => '腾讯控股有限公司',
    'activity_name'        => '公益企业配捐活动',
    'activity_remark'      => '公益活动开始于9月1日,帮助困难儿童筹款活动',
    'amount'               => 20000000,
    'notify_url'           => 'https://www.weixin.qq.com/wxpay/pay.php',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
sp_mchidstring服务商商户号
out_budget_nostring商户预算单号
budget_idstring微信支付预算单号
amountnumber预算总金额
sponsor_mchidstring出资商户号
activity_namestring活动名称
activity_remarkstring活动说明
statestring预算单状态
PENDING | LOCKED | FINISHED | CLOSED 枚举值之一
confirm_urlstring确认出资页面地址
super_admin_wxid_maskstring商户号超管微信号掩码
remain_amountnumber剩余预算金额
unlock_remarkstring撤销说明
locked_timestring资金锁定时间
finished_timestring完成时间
closed_timestring关闭时间

参阅 官方文档

Published on the GitHub by TheNorthMemory