取消外部订单接口


描述
  • 仅能取消积分已支付或者未支付的订单
接口地址:/api/checkout/cancel-out-trade/
Http请求方式:POST
内容格式:application/json
权限:point_pay
参数:
参数 参数名 类型 是否必须 描述
out trade no out_trade_no string 外部订单号
client pay id client_pay_id string 支付流水号
timestamp timestamp string 时间戳
sign sign string 签名

out_trade_no 和 client_pay_id 不可以同时为空,两个都传时,优先使用out_trade_no

返回值:
  • status: 订单状态

    • cancelled: 订单已被取消,并且积分已退回(如果需要)
    • amount_refund: 退款金额
请求示例:
{
      "client_pay_id":"20180611016"
}
返回示例:
{
  "result_message": "cancel out trade successfully",
  "result_code": "cancel_out_trade",
  "result": {
      "status": "cancelled",
      "amount_refund": 0
  },
  "success": true
}