Skip to content

查询代金券信息

🚫

本接口服务已于 2020.MM.dd (北京时间)下线,文档仅做留存参考。

请求参数类型描述
xmlobject声明请求的XML数据结构
coupon_stock_idstring代金券批次id
appidstring公众账号ID
mch_idstring商户号
op_user_idstring操作员
device_infostring设备号
versionstring协议版本
1.0 枚举值
typestring协议类型
XML 枚举值
php
$instance->v2->mmpaymkttransfers->querycouponsinfo->postAsync([
  'xml' => [
    'coupon_stock_id' => '1757',
    'appid'           => 'wx5edab3bdfba3dc1c',
    'mch_id'          => '10000098',
    'op_user_id'      => '10000098',
    'device_info'     => '',
    'version'         => '1.0',
    'type'            => 'XML',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/mmpaymkttransfers/querycouponsinfo')->postAsync([
  'xml' => [
    'coupon_stock_id' => '1757',
    'appid'           => 'wx5edab3bdfba3dc1c',
    'mch_id'          => '10000098',
    'op_user_id'      => '10000098',
    'device_info'     => '',
    'version'         => '1.0',
    'type'            => 'XML',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/mmpaymkttransfers/querycouponsinfo']->postAsync([
  'xml' => [
    'coupon_stock_id' => '1757',
    'appid'           => 'wx5edab3bdfba3dc1c',
    'mch_id'          => '10000098',
    'op_user_id'      => '10000098',
    'device_info'     => '',
    'version'         => '1.0',
    'type'            => 'XML',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->mmpaymkttransfers->querycouponsinfo->post([
  'xml' => [
    'coupon_stock_id' => '1757',
    'appid'           => 'wx5edab3bdfba3dc1c',
    'mch_id'          => '10000098',
    'op_user_id'      => '10000098',
    'device_info'     => '',
    'version'         => '1.0',
    'type'            => 'XML',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/mmpaymkttransfers/querycouponsinfo')->post([
  'xml' => [
    'coupon_stock_id' => '1757',
    'appid'           => 'wx5edab3bdfba3dc1c',
    'mch_id'          => '10000098',
    'op_user_id'      => '10000098',
    'device_info'     => '',
    'version'         => '1.0',
    'type'            => 'XML',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/mmpaymkttransfers/querycouponsinfo']->post([
  'xml' => [
    'coupon_stock_id' => '1757',
    'appid'           => 'wx5edab3bdfba3dc1c',
    'mch_id'          => '10000098',
    'op_user_id'      => '10000098',
    'device_info'     => '',
    'version'         => '1.0',
    'type'            => 'XML',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典类型描述
return_codestring返回状态码
SUCCESS | FAIL 枚举值之一
return_msgstring返回信息
appidstring公众账号ID
mch_idstring商户号
device_infostring设备号
nonce_strstring随机字符串
result_codestring业务结果
SUCCESS | FAIL 枚举值之一
err_codestring错误代码
err_code_desstring错误代码描述
coupon_stock_idstring代金券批次ID
coupon_namestring代金券名称
coupon_valueinteger代金券面额
coupon_mininumninteger代金券使用最低限额
coupon_stock_statusinteger代金券批次状态
coupon_totalinteger代金券数量
max_quotainteger代金券最大领取数量
is_send_numinteger代金券已经发送的数量
begin_timestring生效开始时间
end_timestring生效结束时间
create_timestring创建时间
coupon_budgetinteger代金券预算额度
begin_time_tstring生效开始时间
end_time_tstring生效结束时间
create_time_tstring创建时间

参阅 官方文档

Published on the GitHub by TheNorthMemory