代充下单
<h5>简要描述</h5>
<ul>
<li>代充商品ID请参考</li>
<li>下单后超过7天,无人充值,则会自动下架订单退款到余额</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>网关地址 + /dcapi/pay</code></li>
</ul>
<h5>请求方式</h5>
<ul>
<li>POST</li>
</ul>
<h5>参数</h5>
<table>
<thead>
<tr>
<th>参数名</th>
<th>必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>appid</td>
<td>是</td>
<td>string</td>
<td>用户id</td>
</tr>
<tr>
<td>card_id</td>
<td>是</td>
<td>string</td>
<td>产品ID</td>
</tr>
<tr>
<td>account</td>
<td>是</td>
<td>string</td>
<td>充值账号</td>
</tr>
<tr>
<td>number</td>
<td>是</td>
<td>string</td>
<td>数量默认传 1</td>
</tr>
<tr>
<td>money_type</td>
<td>否</td>
<td>string</td>
<td>可选值 [1, 2],值说明:money_type = 1 是以分为计量单位, money_type = 2 是以元计量单位(整数或者最多两位小数),若不传,则默认以分为计量单位,如果不传money_type,则此字段不参与签名,若money_type传值,则会参与签名</td>
</tr>
<tr>
<td>money</td>
<td>否</td>
<td>string</td>
<td>合作商订单金额,计量单位以money_type区分,如果合作商价格小于本平台的价格,则会下单失败,合作商请注意 , 如果不传金额,则此字段不参与签名, 有值则参与签名</td>
</tr>
<tr>
<td>out_order_id</td>
<td>是</td>
<td>string</td>
<td>合作商订单ID</td>
</tr>
<tr>
<td>check</td>
<td>否</td>
<td>number</td>
<td>是否校验库存,默认0 不校验 1 校验 。比如:check = 1, 校验库存,如果当前下单卡密类型,无库存,则不允许下单。有库存则进行正常下单。不传或者check为0,则不做任何库存校验限制<code>2023-09-07新增改版</code> <code>此字段不参与签名</code></td>
</tr>
<tr>
<td>datetime</td>
<td>是</td>
<td>string</td>
<td>下单时间戳</td>
</tr>
<tr>
<td>notify_url</td>
<td>否</td>
<td>string</td>
<td>回调通知url,有值则进行通知,不传则不进行回调通知,传参则参与签名,不传不参与签名<code>2023-07-14新增改版</code></td>
</tr>
<tr>
<td>sign</td>
<td>是</td>
<td>string</td>
<td>签名(不参与签名)</td>
</tr>
</tbody>
</table>
<h5>返回正确示例</h5>
<pre><code> {
&quot;code&quot;: 1,
&quot;msg&quot;:&quot;下单成功&quot;,
&quot;result&quot;: &quot;API2022040622185551647&quot;,
&quot;other&quot;: {
&quot;price&quot;: &quot;12.0&quot;
}
}</code></pre>
<h5>返回参数说明</h5>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>result</td>
<td>string</td>
<td>下单成功返回平台订单号</td>
</tr>
<tr>
<td>other</td>
<td>object</td>
<td>订单其他附加信息,如下说明 <code>2023-08-30新增</code></td>
</tr>
</tbody>
</table>
<h5>other参数说明 <code>2023-08-30新增</code></h5>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>price</td>
<td>string</td>
<td>下单金额</td>
</tr>
<tr>
<td>…</td>
<td>…</td>
<td>…</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<ul>
<li>返回错误码: code: 0</li>
<li>返回错误时可根据返回的msg信息,进行调整错误</li>
</ul>