Skip to content

激活代金券批次

制券成功后,通过调用此接口激活批次,如果是预充值代金券,激活时会从商户账户余额中锁定本批次的营销资金。

请求参数类型描述
stock_idstring批次号
jsonobject声明请求的JSON数据结构
stock_creator_mchidstring创建批次的商户号
php
$instance->v3->marketing->favor->stocks->_stock_id_->start->postAsync([
  'stock_id' => '',
  'json' => [
    'stock_creator_mchid' => '8956000',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/favor/stocks/{stock_id}/start')->postAsync([
  'stock_id' => '',
  'json' => [
    'stock_creator_mchid' => '8956000',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/favor/stocks/{stock_id}/start']->postAsync([
  'stock_id' => '',
  'json' => [
    'stock_creator_mchid' => '8956000',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->favor->stocks->_stock_id_->start->post([
  'stock_id' => '',
  'json' => [
    'stock_creator_mchid' => '8956000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/favor/stocks/{stock_id}/start')->post([
  'stock_id' => '',
  'json' => [
    'stock_creator_mchid' => '8956000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/favor/stocks/{stock_id}/start']->post([
  'stock_id' => '',
  'json' => [
    'stock_creator_mchid' => '8956000',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
start_timestring生效时间
stock_idstring批次号

参阅 官方文档

Published on the GitHub by TheNorthMemory