Skip to content

企业付款到银行卡

企业付款业务是基于微信支付商户平台的资金管理能力,为了协助商户方便地实现企业向银行卡付款,针对部分有开发能力的商户,提供通过API完成企业付款到银行卡的功能。

请求参数类型描述
xmlobject声明请求的XML数据结构
mch_idstring商户号
partner_trade_nostring商户企业付款单号
enc_bank_nostring收款方银行卡号
enc_true_namestring收款方用户名
bank_codestring收款方开户行
amountinteger付款金额
descstring付款说明
securityboolean声明加载商户API证书
固定值true
php
$instance->v2->mmpaysptrans->pay_bank->postAsync([
  'xml' => [
    'mch_id' => '1900000109',
    'partner_trade_no' => '1212121221227',
    'enc_bank_no' => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
    'enc_true_name' => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'bank_code' => '1001',
    'amount' => '100000',
    'desc' => '理财',
  ],
  'security' => true,
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/mmpaysptrans/pay_bank')->postAsync([
  'xml' => [
    'mch_id' => '1900000109',
    'partner_trade_no' => '1212121221227',
    'enc_bank_no' => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
    'enc_true_name' => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'bank_code' => '1001',
    'amount' => '100000',
    'desc' => '理财',
  ],
  'security' => true,
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/mmpaysptrans/pay_bank']->postAsync([
  'xml' => [
    'mch_id' => '1900000109',
    'partner_trade_no' => '1212121221227',
    'enc_bank_no' => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
    'enc_true_name' => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'bank_code' => '1001',
    'amount' => '100000',
    'desc' => '理财',
  ],
  'security' => true,
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->mmpaysptrans->pay_bank->post([
  'xml' => [
    'mch_id' => '1900000109',
    'partner_trade_no' => '1212121221227',
    'enc_bank_no' => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
    'enc_true_name' => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'bank_code' => '1001',
    'amount' => '100000',
    'desc' => '理财',
  ],
  'security' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/mmpaysptrans/pay_bank')->post([
  'xml' => [
    'mch_id' => '1900000109',
    'partner_trade_no' => '1212121221227',
    'enc_bank_no' => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
    'enc_true_name' => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'bank_code' => '1001',
    'amount' => '100000',
    'desc' => '理财',
  ],
  'security' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/mmpaysptrans/pay_bank']->post([
  'xml' => [
    'mch_id' => '1900000109',
    'partner_trade_no' => '1212121221227',
    'enc_bank_no' => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
    'enc_true_name' => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'bank_code' => '1001',
    'amount' => '100000',
    'desc' => '理财',
  ],
  'security' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典类型描述
return_codestring返回状态码
return_msgstring返回信息
result_codestring业务结果
err_codestring错误代码
err_code_desstring错误代码描述
mch_idstring商户号
partner_trade_nostring商户企业付款单号
amountinteger代付金额
nonce_strstring随机字符串
signstring签名
payment_nostring微信企业付款单号
cmms_amtinteger手续费金额

参阅 官方文档

Published on the GitHub by TheNorthMemory