Taypay v1
关闭订单接口
Taypay v1 关闭订单接口说明与示例。
关闭订单接口
POST /api/payment/open/v1/order/close
Content-Type: application/json
请求参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| app_id | string | 是 | 商户应用 ID。 |
| merchant_order_no | string | 是 | 商户订单号。 |
| close_reason | string | 否 | 关闭原因。 |
| close_message | string | 否 | 关闭原因说明。 |
| timestamp | integer | 是 | 秒级时间戳。 |
| nonce | string | 是 | 请求随机串。 |
| sign_type | string | 是 | 固定为 HMAC-SHA256。 |
| sign | string | 是 | 签名值。 |
请求示例:
{
"app_id": "your_app_id",
"merchant_order_no": "M202605220001",
"close_reason": "merchant_close",
"close_message": "用户取消支付",
"timestamp": 1779465680,
"nonce": "random_close_nonce",
"sign_type": "HMAC-SHA256",
"sign": "generate_by_app_secret"
}
响应参数
| 字段 | 类型 | 说明 |
|---|---|---|
| code | integer | 业务响应码, 0 表示成功。 |
| message | string | 响应说明。 |
| data | object | 关闭结果。 |
| data.platform_order_no | string | 平台订单号。 |
| data.status | integer | 订单状态码。 |
| data.lifecycle_status | string | 订单生命周期状态。 |
响应示例:
{
"code": 0,
"message": "success",
"data": {
"merchant_order_no": "M202605220001",
"platform_order_no": "EP202605220001",
"status": -1,
"lifecycle_status": "closed"
}
}
