取消支付分订单
<h3>接口说明</h3>
<ul>
<li>
<p>适用对象:直连商户</p>
</li>
<li>
<p>请求URL:<a href="https://open.yushuokj.cn/mini/v3/payscore/cancelorder">https://open.yushuokj.cn/mini/v3/payscore/cancelorder</a></p>
</li>
<li>请求方式:POST</li>
</ul>
<p><strong>请求头部:</strong></p>
<table>
<thead>
<tr>
<th>标签</th>
<th>必填</th>
<th>内容</th>
</tr>
</thead>
<tbody>
<tr>
<td>Content-Type</td>
<td>是</td>
<td>application/x-www-form-urlencoded</td>
</tr>
</tbody>
</table>
<h3>请求参数</h3>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>必填</th>
<th>说明</th>
<th>参数示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>out_trade_no</td>
<td>string</td>
<td>是</td>
<td>商户订单号</td>
<td>20007000G5551087890</td>
</tr>
<tr>
<td>reason</td>
<td>string</td>
<td>是</td>
<td>取消原因</td>
<td>用户投诉</td>
</tr>
</tbody>
</table>
<h3>请求示例</h3>
<h3>返回参数</h3>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th style="text-align: left;">必含</th>
<th style="text-align: left;">说明</th>
<th>参数示例</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">int</td>
<td style="text-align: left;">M</td>
<td style="text-align: left;">响应码:200 成功,500 失败</td>
<td>200</td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">string</td>
<td style="text-align: left;">M</td>
<td style="text-align: left;">响应内容,JSON等数据</td>
<td>1234</td>
</tr>
<tr>
<td style="text-align: left;">message</td>
<td style="text-align: left;">string</td>
<td style="text-align: left;">M</td>
<td style="text-align: left;">消息提未</td>
<td>操作成功</td>
</tr>
</tbody>
</table>
<p><strong>返data参数说明:</strong> </p>
<table>
<thead>
<tr>
<th>参数名</th>
<th>变量</th>
<th>类型[长度限制]</th>
<th>必填</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>terminal_no</td>
<td>string</td>
<td>M</td>
<td>终端号</td>
<td>70000001</td>
</tr>
<tr>
<td>out_trade_no</td>
<td>string</td>
<td>M</td>
<td>商户订单号</td>
<td>200000001PS25011318493300010</td>
</tr>
<tr>
<td>pay_trace_no</td>
<td>string</td>
<td>M</td>
<td>开门流水号</td>
<td>200000001PS25011318493300010</td>
</tr>
<tr>
<td>pay_status_code</td>
<td>int</td>
<td>M</td>
<td>订单状态</td>
<td>1 订单完成 2订单失败 3订单进行中</td>
</tr>
<tr>
<td>pay_status_msg</td>
<td>string</td>
<td>M</td>
<td>订单状态说明</td>
<td>订单失败</td>
</tr>
<tr>
<td>channel_result_code</td>
<td>string</td>
<td>M</td>
<td>辅助状态</td>
<td>REVOKED</td>
</tr>
<tr>
<td>channel_result_msg</td>
<td>string</td>
<td>M</td>
<td>辅助状态说明</td>
<td>商户取消服务订单</td>
</tr>
<tr>
<td>open_id</td>
<td>string</td>
<td>M</td>
<td>用户标识</td>
<td>om-nw63iodehWHuhAj9wEK6LD6lM</td>
</tr>
<tr>
<td>desc</td>
<td>string</td>
<td>M</td>
<td>订单描述</td>
<td>JSON信息</td>
</tr>
</tbody>
</table>
<h4>返回示例</h4>
<ul>
<li><a href="javascript:;">正常示例</a></li>
</ul>
<pre><code class="language-json">{
&quot;code&quot;: 200,
&quot;data&quot;: {
&quot;terminal_no&quot;: &quot;70000001&quot;,
&quot;out_trade_no&quot;: &quot;200000001PS25011318493300010&quot;,
&quot;pay_trace_no&quot;: &quot;200000001PS25011318493300010&quot;,
&quot;channel_trade_no&quot;: &quot;1000000000202501131389524892589&quot;,
&quot;pay_status_code&quot;: 2,
&quot;pay_status_msg&quot;: &quot;支付失败&quot;,
&quot;channel_result_code&quot;: &quot;REVOKED&quot;,
&quot;channel_result_msg&quot;: &quot;商户取消服务订单&quot;,
&quot;open_id&quot;: &quot;om-nw63iodehWHuhAj9wEK6LD6lM&quot;,
&quot;desc&quot;: &quot;{\&quot;appid\&quot;:\&quot;wx70e92e136a965256\&quot;,\&quot;attach\&quot;:\&quot;\&quot;,\&quot;location\&quot;:{},\&quot;mchid\&quot;:\&quot;1699693975\&quot;,\&quot;need_collection\&quot;:true,\&quot;notify_url\&quot;:\&quot;https://open.yushuokj.cn/mini/v3/payscore/notify\&quot;,\&quot;order_id\&quot;:\&quot;1000000000202501131389524892589\&quot;,\&quot;out_order_no\&quot;:\&quot;200000001PS25011318493300010\&quot;,\&quot;post_discounts\&quot;:[],\&quot;post_payments\&quot;:[],\&quot;risk_fund\&quot;:{\&quot;amount\&quot;:2000,\&quot;description\&quot;:\&quot;无人货柜零售\&quot;,\&quot;name\&quot;:\&quot;ESTIMATE_ORDER_COST\&quot;},\&quot;service_id\&quot;:\&quot;00004000000000173623044456037302\&quot;,\&quot;service_introduction\&quot;:\&quot;榆烁24H便利购\&quot;,\&quot;state\&quot;:\&quot;REVOKED\&quot;,\&quot;time_range\&quot;:{},\&quot;total_amount\&quot;:0}&quot;
},
&quot;message&quot;: &quot;操作成功&quot;
}</code></pre>