5. API代付余额查询
<p><strong>简要描述:</strong> </p>
<ul>
<li>API代付余额查询接口</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>/go/withdraw/balance.go</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST</li>
<li>GET </li>
</ul>
<p><strong>参数说明:</strong> </p>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">pid</td>
<td>商户编号</td>
</tr>
<tr>
<td style="text-align: left;">sign</td>
<td>签名</td>
</tr>
</tbody>
</table>
<p><strong>签名示例:</strong> </p>
<p><code>MD5(“pid=商户编号&key=密钥”)</code></p>
<p><strong>签名规则:</strong> </p>
<pre><code>1、参数列表中,除去sign外,其他所有非空的参数都要参与签名,值为空的参数不用参与签名
2、签名顺序按照参数名a到z的顺序排序,若遇到相同的首字母,则看第二个字母,以此类推,组成规则如下:
` 参数名1=参数值1&参数名2=参数值2…….参数名n=参数值n&key=秘钥(由系统提供)`
3、然后使用MD5对其进行UTF-8的编码方式加密即可,签名结果统一转成小写</code></pre>
<p><strong>返回示例</strong></p>
<pre><code>{
"code":101,
"data":{
"pid":"商户编号",
"amount":"商户余额",
},
"msg":"成功"
}</code></pre>
<p><strong>返回参数说明</strong> </p>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">pid</td>
<td>商户编号</td>
</tr>
<tr>
<td style="text-align: left;">amount</td>
<td>商户余额(单位:元)</td>
</tr>
</tbody>
</table>
<p><strong>备注</strong></p>
<ul>
<li>更多返回错误代码请看错误代码说明</li>
</ul>