微信红包
<h3>微信红包</h3>
<p><strong>URL:</strong> /v1/openapi/order/redPacket</p>
<p><strong>Type:</strong> POST</p>
<p><strong>Content-Type:</strong> application/json; charset=utf-8</p>
<p><strong>Description:</strong> 发放微信红包,以微信红包的形式发放,发放成功后用户需要在微信内领取,需要将openId对应的APPID(公众号或小程序)与我司商户号做授权</p>
<p><strong>Request-headers:</strong></p>
<table>
<thead>
<tr>
<th>Header</th>
<th>Type</th>
<th>Description</th>
<th>Required</th>
<th>Since</th>
</tr>
</thead>
<tbody>
<tr>
<td>businessId</td>
<td>string</td>
<td>业务ID,由平台提供</td>
<td>true</td>
<td>-</td>
</tr>
<tr>
<td>nonce</td>
<td>string</td>
<td>随机字符串,需保证每次请求不同</td>
<td>true</td>
<td>-</td>
</tr>
<tr>
<td>timestamp</td>
<td>string</td>
<td>时间戳,毫秒值</td>
<td>true</td>
<td>-</td>
</tr>
<tr>
<td>sign</td>
<td>string</td>
<td>签名值</td>
<td>true</td>
<td>-</td>
</tr>
<tr>
<td>signType</td>
<td>string</td>
<td>签名方式:SHA256-RSA、MD5。默认:SHA256-RSA</td>
<td>false</td>
</tr>
</tbody>
</table>
<p><strong>Body-parameters:</strong></p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Description</th>
<th>Required</th>
<th>Since</th>
</tr>
</thead>
<tbody>
<tr>
<td>merchantId</td>
<td>string</td>
<td>商家ID</td>
<td>true</td>
<td>-</td>
</tr>
<tr>
<td>businessId</td>
<td>string</td>
<td>业务ID</td>
<td>true</td>
<td>-</td>
</tr>
<tr>
<td>templateId</td>
<td>string</td>
<td>红包模板ID</td>
<td>true</td>
<td>-</td>
</tr>
<tr>
<td>mobile</td>
<td>string</td>
<td>手机号</td>
<td>false</td>
<td>-</td>
</tr>
<tr>
<td>appId</td>
<td>string</td>
<td>微信appId(有值以此为准,不传则以系统配置为准)</td>
<td>false</td>
<td>-</td>
</tr>
<tr>
<td>openId</td>
<td>string</td>
<td>微信openId,openId所属appId(公众号ID或小程序ID)需要与我司商户号授权关联</td>
<td>true</td>
<td>-</td>
</tr>
<tr>
<td>spec</td>
<td>number</td>
<td>红包面额(单位元)</td>
<td>true</td>
<td>-</td>
</tr>
<tr>
<td>bizCode</td>
<td>string</td>
<td>商家订单号</td>
<td>true</td>
<td>-</td>
</tr>
<tr>
<td>callbackUrl</td>
<td>string</td>
<td>充值的状态报告推送地址<br>为空则使用开户时设置的地址</td>
<td>false</td>
<td>-</td>
</tr>
</tbody>
</table>
<p><strong>Request-example:</strong></p>
<pre><code>curl -X POST -H &#039;Content-Type: application/json; charset=utf-8&#039; -H &#039;businessId:55&#039; -H &#039;nonce:55&#039; -H &#039;timestamp:1628757969177&#039; -H &#039;sign:55&#039; -i /v1/openapi/order/redPacket? --data &#039;{
&quot;merchantId&quot;: &quot;194&quot;,
&quot;businessId&quot;: &quot;194&quot;,
&quot;templateId&quot;: &quot;194&quot;,
&quot;mobile&quot;: &quot;15804103217&quot;,
&quot;openId&quot;: &quot;194&quot;,
&quot;spec&quot;: 175,
&quot;bizCode&quot;: &quot;92463&quot;,
&quot;callbackUrl&quot;: &quot;www.xn---xn--sov-u12y899a.info&quot;
}&#039;</code></pre>
<p><strong>Response-fields:</strong></p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
<th>Since</th>
</tr>
</thead>
<tbody>
<tr>
<td>status</td>
<td>int32</td>
<td>状态码</td>
<td>-</td>
</tr>
<tr>
<td>message</td>
<td>string</td>
<td>返回消息</td>
<td>-</td>
</tr>
<tr>
<td>data</td>
<td>object</td>
<td>数据对象</td>
<td>-</td>
</tr>
<tr>
<td>└─orderCode</td>
<td>string</td>
<td>平台订单号</td>
<td>-</td>
</tr>
<tr>
<td>└─bizCode</td>
<td>string</td>
<td>商家订单号</td>
<td>-</td>
</tr>
<tr>
<td>└─settlementPrice</td>
<td>number</td>
<td>结算金额</td>
<td>-</td>
</tr>
</tbody>
</table>
<p><strong>Response-example:</strong></p>
<pre><code>{
&quot;status&quot;: 383,
&quot;message&quot;: &quot;success&quot;,
&quot;data&quot;: {
&quot;orderCode&quot;: &quot;92463&quot;,
&quot;bizCode&quot;: &quot;92463&quot;,
&quot;settlementPrice&quot;: 637
}
}</code></pre>