Skip to content

申请资金出境

商户发起资金出境请求,需要传微信支付单号,商户出境单号,出境金额等信息成功,接口请求成功仅代表受理,如需知晓业务执行情况请通过查询接口获取。

请求参数类型描述
jsonobject声明请求的JSON数据结构
out_order_idstring商户出境单号
sub_mchidstring二级商户号
transaction_idstring微信订单号
amountinteger出境金额
foreign_currencystring境外收款币种
goods_infoobject[]商品信息
goods_namestring商品名称
goods_categorystring商品类目
goods_unit_priceinteger商品单价
goods_quantityinteger商品数量
seller_infoobject卖家信息
oversea_business_namestring境外卖家经营主体名称
oversea_shop_namestring境外卖家店铺名称
seller_idstring卖家ID
express_infoobject物流信息
courier_numberstring物流单号
express_company_namestring物流商名称
payee_infoobject收款人信息
payee_idstring收款人识别号
php
$instance->v3->fundsToOversea->orders->postAsync([
  'json' => [
    'out_order_id' => 'merchant_1123123',
    'sub_mchid' => '123456',
    'transaction_id' => '420000000000000010',
    'amount' => 10,
    'foreign_currency' => 'USD',
    'goods_info' => [[
      'goods_name' => '橘子',
      'goods_category' => '家用电器',
      'goods_unit_price' => 1,
      'goods_quantity' => 1,
    ],],
    'seller_info' => [
      'oversea_business_name' => '香港xxxx公司',
      'oversea_shop_name' => '香港xxx公司xxx店铺',
      'seller_id' => 'id2123123123',
    ],
    'express_info' => [
      'courier_number' => 'curier_number_1231',
      'express_company_name' => '国际xxx物流',
    ],
    'payee_info' => [
      'payee_id' => 'ID123112312',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/funds-to-oversea/orders')->postAsync([
  'json' => [
    'out_order_id' => 'merchant_1123123',
    'sub_mchid' => '123456',
    'transaction_id' => '420000000000000010',
    'amount' => 10,
    'foreign_currency' => 'USD',
    'goods_info' => [[
      'goods_name' => '橘子',
      'goods_category' => '家用电器',
      'goods_unit_price' => 1,
      'goods_quantity' => 1,
    ],],
    'seller_info' => [
      'oversea_business_name' => '香港xxxx公司',
      'oversea_shop_name' => '香港xxx公司xxx店铺',
      'seller_id' => 'id2123123123',
    ],
    'express_info' => [
      'courier_number' => 'curier_number_1231',
      'express_company_name' => '国际xxx物流',
    ],
    'payee_info' => [
      'payee_id' => 'ID123112312',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/funds-to-oversea/orders']->postAsync([
  'json' => [
    'out_order_id' => 'merchant_1123123',
    'sub_mchid' => '123456',
    'transaction_id' => '420000000000000010',
    'amount' => 10,
    'foreign_currency' => 'USD',
    'goods_info' => [[
      'goods_name' => '橘子',
      'goods_category' => '家用电器',
      'goods_unit_price' => 1,
      'goods_quantity' => 1,
    ],],
    'seller_info' => [
      'oversea_business_name' => '香港xxxx公司',
      'oversea_shop_name' => '香港xxx公司xxx店铺',
      'seller_id' => 'id2123123123',
    ],
    'express_info' => [
      'courier_number' => 'curier_number_1231',
      'express_company_name' => '国际xxx物流',
    ],
    'payee_info' => [
      'payee_id' => 'ID123112312',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->fundsToOversea->orders->post([
  'json' => [
    'out_order_id' => 'merchant_1123123',
    'sub_mchid' => '123456',
    'transaction_id' => '420000000000000010',
    'amount' => 10,
    'foreign_currency' => 'USD',
    'goods_info' => [[
      'goods_name' => '橘子',
      'goods_category' => '家用电器',
      'goods_unit_price' => 1,
      'goods_quantity' => 1,
    ],],
    'seller_info' => [
      'oversea_business_name' => '香港xxxx公司',
      'oversea_shop_name' => '香港xxx公司xxx店铺',
      'seller_id' => 'id2123123123',
    ],
    'express_info' => [
      'courier_number' => 'curier_number_1231',
      'express_company_name' => '国际xxx物流',
    ],
    'payee_info' => [
      'payee_id' => 'ID123112312',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/funds-to-oversea/orders')->post([
  'json' => [
    'out_order_id' => 'merchant_1123123',
    'sub_mchid' => '123456',
    'transaction_id' => '420000000000000010',
    'amount' => 10,
    'foreign_currency' => 'USD',
    'goods_info' => [[
      'goods_name' => '橘子',
      'goods_category' => '家用电器',
      'goods_unit_price' => 1,
      'goods_quantity' => 1,
    ],],
    'seller_info' => [
      'oversea_business_name' => '香港xxxx公司',
      'oversea_shop_name' => '香港xxx公司xxx店铺',
      'seller_id' => 'id2123123123',
    ],
    'express_info' => [
      'courier_number' => 'curier_number_1231',
      'express_company_name' => '国际xxx物流',
    ],
    'payee_info' => [
      'payee_id' => 'ID123112312',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/funds-to-oversea/orders']->post([
  'json' => [
    'out_order_id' => 'merchant_1123123',
    'sub_mchid' => '123456',
    'transaction_id' => '420000000000000010',
    'amount' => 10,
    'foreign_currency' => 'USD',
    'goods_info' => [[
      'goods_name' => '橘子',
      'goods_category' => '家用电器',
      'goods_unit_price' => 1,
      'goods_quantity' => 1,
    ],],
    'seller_info' => [
      'oversea_business_name' => '香港xxxx公司',
      'oversea_shop_name' => '香港xxx公司xxx店铺',
      'seller_id' => 'id2123123123',
    ],
    'express_info' => [
      'courier_number' => 'curier_number_1231',
      'express_company_name' => '国际xxx物流',
    ],
    'payee_info' => [
      'payee_id' => 'ID123112312',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
out_order_idstring商户出境单号
sub_mchidstring二级商户号
order_idstring微信出境单号
resultstring出境结果
fail_reasonstring出境失败的原因
amountinteger请求出境人民币金额
foreign_amountinteger真实出境外币金额
foreign_currencystring外币币种
rateinteger汇率
exchange_rate_timestring购汇时间
estimate_exchange_rate_timestring预计购汇时间
departure_amountinteger真实出境人民币金额
feeinteger手续费人民币金额
charge_mchidstring手续费承担商户号
charge_account_typestring手续费承担账户

参阅 官方文档

Published on the GitHub by TheNorthMemory