企业商户为员工下发企业支付额度卡
企业商户为员工下发企业支付额度卡。该接口允许服务商为已授权的员工下发企业支付额度卡,设置卡片名称、额度、备注等信息,员工可使用该额度卡进行企业支付。企业可根据不同业务场景(如差旅报销、日常办公等)为员工发放不同类型的额度卡,便于费用管理和控制。
请求参数 | 类型 | 描述 |
---|---|---|
employee_id | string | 微信授权关系ID |
json | object | 声明请求的JSON 数据结构 |
sp_mchid | string | 服务商商户号 |
sub_mchid | string | 出资子商户号 |
card_template_id | string | 企业支付卡模板ID |
amount | number | 卡片总金额 |
card_name | string | 卡片名称 |
out_card_no | string | 商户卡号 |
effective_end_time | string | 卡片有效期 |
card_remark | string | 卡片备注 |
php
$instance->v3->webizpay->employees->_employee_id_->quotaCards->postAsync([
'employee_id' => 'WeBizPay_a968402a-73bb-43e2-9e1a-8371b0ca3d7c',
'json' => [
'sp_mchid' => '12341234',
'sub_mchid' => '43214321',
'card_template_id' => 'template_123',
'amount' => 10000,
'card_name' => '报销额度卡',
'out_card_no' => 'mch_card_123456',
'effective_end_time' => '2023-12-31T23:59:59+08:00',
'card_remark' => '2023年1月差旅报销',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/webizpay/employees/{employee_id}/quota-cards')->postAsync([
'employee_id' => 'WeBizPay_a968402a-73bb-43e2-9e1a-8371b0ca3d7c',
'json' => [
'sp_mchid' => '12341234',
'sub_mchid' => '43214321',
'card_template_id' => 'template_123',
'amount' => 10000,
'card_name' => '报销额度卡',
'out_card_no' => 'mch_card_123456',
'effective_end_time' => '2023-12-31T23:59:59+08:00',
'card_remark' => '2023年1月差旅报销',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/webizpay/employees/{employee_id}/quota-cards']->postAsync([
'employee_id' => 'WeBizPay_a968402a-73bb-43e2-9e1a-8371b0ca3d7c',
'json' => [
'sp_mchid' => '12341234',
'sub_mchid' => '43214321',
'card_template_id' => 'template_123',
'amount' => 10000,
'card_name' => '报销额度卡',
'out_card_no' => 'mch_card_123456',
'effective_end_time' => '2023-12-31T23:59:59+08:00',
'card_remark' => '2023年1月差旅报销',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->webizpay->employees->_employee_id_->quotaCards->post([
'employee_id' => 'WeBizPay_a968402a-73bb-43e2-9e1a-8371b0ca3d7c',
'json' => [
'sp_mchid' => '12341234',
'sub_mchid' => '43214321',
'card_template_id' => 'template_123',
'amount' => 10000,
'card_name' => '报销额度卡',
'out_card_no' => 'mch_card_123456',
'effective_end_time' => '2023-12-31T23:59:59+08:00',
'card_remark' => '2023年1月差旅报销',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/webizpay/employees/{employee_id}/quota-cards')->post([
'employee_id' => 'WeBizPay_a968402a-73bb-43e2-9e1a-8371b0ca3d7c',
'json' => [
'sp_mchid' => '12341234',
'sub_mchid' => '43214321',
'card_template_id' => 'template_123',
'amount' => 10000,
'card_name' => '报销额度卡',
'out_card_no' => 'mch_card_123456',
'effective_end_time' => '2023-12-31T23:59:59+08:00',
'card_remark' => '2023年1月差旅报销',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/webizpay/employees/{employee_id}/quota-cards']->post([
'employee_id' => 'WeBizPay_a968402a-73bb-43e2-9e1a-8371b0ca3d7c',
'json' => [
'sp_mchid' => '12341234',
'sub_mchid' => '43214321',
'card_template_id' => 'template_123',
'amount' => 10000,
'card_name' => '报销额度卡',
'out_card_no' => 'mch_card_123456',
'effective_end_time' => '2023-12-31T23:59:59+08:00',
'card_remark' => '2023年1月差旅报销',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
sp_mchid | string | 服务商商户号 |
sub_mchid | string | 出资子商户号 |
out_card_no | string | 商户卡号 |
employee_id | string | 微信授权关系ID |
card_no | string | 企业支付额度卡卡号 |
effective_begin_time | string | 卡片生效时间 |
effective_end_time | string | 卡片有效期 |
参阅 官方文档