hl-api-changelog/api-docs/hl-payment-service.json
2026-03-17 09:21:07 +08:00

825 行
22 KiB
JSON

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

{
"swagger": "2.0",
"info": {
"title": "支付服务",
"version": "1.0.0"
},
"basePath": "/",
"paths": {
"/admin/payment/list": {
"get": {
"tags": [
"支付管理"
],
"summary": "支付交易列表",
"description": "分页查询支付交易记录,支持按订单号、交易状态、交易类型筛选\n\n**关联字典**\n- payment_mode支付模式列表筛选+显示)",
"operationId": "listTransactionsUsingGET",
"produces": [
"*/*"
],
"parameters": [
{
"name": "endDate",
"in": "query",
"description": "结束日期",
"required": false,
"type": "string",
"x-example": "2026-12-31"
},
{
"name": "mchId",
"in": "query",
"description": "商户号",
"required": false,
"type": "string",
"x-example": "1246532201"
},
{
"name": "orderNo",
"in": "query",
"description": "订单编号",
"required": false,
"type": "string",
"x-example": "HL20260301120000001234"
},
{
"name": "page",
"in": "query",
"description": "页码",
"required": false,
"type": "integer",
"format": "int32",
"x-example": 1
},
{
"name": "pageSize",
"in": "query",
"description": "每页条数",
"required": false,
"type": "integer",
"format": "int32",
"x-example": 20
},
{
"name": "startDate",
"in": "query",
"description": "开始日期",
"required": false,
"type": "string",
"x-example": "2026-01-01"
},
{
"name": "status",
"in": "query",
"description": "支付状态",
"required": false,
"type": "string",
"x-example": "SUCCESS"
},
{
"name": "tradeType",
"in": "query",
"description": "交易类型: JSAPI/H5",
"required": false,
"type": "string",
"x-example": "JSAPI"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"originalRef": "统一响应结果«分页结果«支付交易信息»»",
"$ref": "#/definitions/统一响应结果«分页结果«支付交易信息»»"
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"responsesObject": {
"200": {
"description": "OK",
"schema": {
"originalRef": "统一响应结果«分页结果«支付交易信息»»",
"$ref": "#/definitions/统一响应结果«分页结果«支付交易信息»»"
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"deprecated": false,
"x-order": "2147483647"
}
},
"/admin/payment/order/{orderId}": {
"get": {
"tags": [
"支付管理"
],
"summary": "按订单查询交易",
"description": "查询指定订单的所有支付交易记录",
"operationId": "listByOrderUsingGET",
"produces": [
"*/*"
],
"parameters": [
{
"name": "orderId",
"in": "path",
"description": "订单ID",
"required": false,
"type": "integer",
"format": "int64"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"originalRef": "统一响应结果«List«支付交易信息»»",
"$ref": "#/definitions/统一响应结果«List«支付交易信息»»"
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"responsesObject": {
"200": {
"description": "OK",
"schema": {
"originalRef": "统一响应结果«List«支付交易信息»»",
"$ref": "#/definitions/统一响应结果«List«支付交易信息»»"
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"deprecated": false,
"x-order": "2147483647"
}
},
"/admin/payment/refund/order/{orderId}": {
"get": {
"tags": [
"支付管理"
],
"summary": "按订单查询退款",
"description": "查询指定订单的所有退款记录",
"operationId": "listRefundsByOrderUsingGET",
"produces": [
"*/*"
],
"parameters": [
{
"name": "orderId",
"in": "path",
"description": "订单ID",
"required": false,
"type": "integer",
"format": "int64"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"originalRef": "统一响应结果«List«退款记录信息»»",
"$ref": "#/definitions/统一响应结果«List«退款记录信息»»"
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"responsesObject": {
"200": {
"description": "OK",
"schema": {
"originalRef": "统一响应结果«List«退款记录信息»»",
"$ref": "#/definitions/统一响应结果«List«退款记录信息»»"
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"deprecated": false,
"x-order": "2147483647"
}
},
"/admin/payment/refund/{refundId}": {
"get": {
"tags": [
"支付管理"
],
"summary": "退款详情",
"description": "获取单笔退款记录的完整信息,包含微信退款单号和退款状态",
"operationId": "getRefundDetailUsingGET",
"produces": [
"*/*"
],
"parameters": [
{
"name": "refundId",
"in": "path",
"description": "退款ID",
"required": false,
"type": "integer",
"format": "int64"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"originalRef": "统一响应结果«退款记录信息»",
"$ref": "#/definitions/统一响应结果«退款记录信息»"
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"responsesObject": {
"200": {
"description": "OK",
"schema": {
"originalRef": "统一响应结果«退款记录信息»",
"$ref": "#/definitions/统一响应结果«退款记录信息»"
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"deprecated": false,
"x-order": "2147483647"
}
},
"/admin/payment/{orderId}/refund": {
"post": {
"tags": [
"支付管理"
],
"summary": "发起退款",
"description": "退款流程:验证订单 → 查找原支付交易 → 调用微信退款API → 记录退款单 → 等待微信回调更新状态",
"operationId": "refundUsingPOST",
"consumes": [
"application/json"
],
"produces": [
"*/*"
],
"parameters": [
{
"name": "orderId",
"in": "path",
"description": "订单ID",
"required": false,
"type": "integer",
"format": "int64"
},
{
"in": "body",
"name": "request",
"description": "退款请求",
"required": false,
"schema": {
"originalRef": "退款请求",
"$ref": "#/definitions/退款请求"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"originalRef": "统一响应结果«退款记录信息»",
"$ref": "#/definitions/统一响应结果«退款记录信息»"
}
},
"201": {
"description": "Created"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"responsesObject": {
"200": {
"description": "OK",
"schema": {
"originalRef": "统一响应结果«退款记录信息»",
"$ref": "#/definitions/统一响应结果«退款记录信息»"
}
},
"201": {
"description": "Created"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"deprecated": false,
"x-order": "2147483647"
}
},
"/admin/payment/{transactionId}": {
"get": {
"tags": [
"支付管理"
],
"summary": "交易详情",
"description": "获取单笔交易的完整信息,包含微信支付流水号\n\n**关联字典**\n- payment_mode支付模式显示",
"operationId": "getDetailUsingGET",
"produces": [
"*/*"
],
"parameters": [
{
"name": "transactionId",
"in": "path",
"description": "交易ID",
"required": false,
"type": "integer",
"format": "int64"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"originalRef": "统一响应结果«支付交易信息»",
"$ref": "#/definitions/统一响应结果«支付交易信息»"
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"responsesObject": {
"200": {
"description": "OK",
"schema": {
"originalRef": "统一响应结果«支付交易信息»",
"$ref": "#/definitions/统一响应结果«支付交易信息»"
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"deprecated": false,
"x-order": "2147483647"
}
},
"/admin/payment/{transactionId}/sync": {
"post": {
"tags": [
"支付管理"
],
"summary": "同步支付状态",
"description": "主动查询微信支付状态并同步本地数据,适用于回调未到达的场景",
"operationId": "syncPaymentStatusUsingPOST",
"consumes": [
"application/json"
],
"produces": [
"*/*"
],
"parameters": [
{
"name": "transactionId",
"in": "path",
"description": "交易ID",
"required": false,
"type": "integer",
"format": "int64"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"originalRef": "统一响应结果«支付交易信息»",
"$ref": "#/definitions/统一响应结果«支付交易信息»"
}
},
"201": {
"description": "Created"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"responsesObject": {
"200": {
"description": "OK",
"schema": {
"originalRef": "统一响应结果«支付交易信息»",
"$ref": "#/definitions/统一响应结果«支付交易信息»"
}
},
"201": {
"description": "Created"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
},
"deprecated": false,
"x-order": "2147483647"
}
}
},
"definitions": {
"分页结果«支付交易信息»": {
"type": "object",
"properties": {
"page": {
"type": "integer",
"format": "int32",
"example": 1,
"description": "当前页码"
},
"pageSize": {
"type": "integer",
"format": "int32",
"example": 20,
"description": "每页条数"
},
"records": {
"type": "array",
"description": "数据列表",
"items": {
"originalRef": "支付交易信息",
"$ref": "#/definitions/支付交易信息"
}
},
"total": {
"type": "integer",
"format": "int32",
"example": 100,
"description": "总记录数"
}
},
"title": "分页结果«支付交易信息»"
},
"支付交易信息": {
"type": "object",
"properties": {
"createTime": {
"type": "string",
"format": "date-time",
"description": "创建时间"
},
"mchId": {
"type": "string",
"description": "商户号"
},
"orderId": {
"type": "integer",
"format": "int64",
"description": "订单ID"
},
"orderNo": {
"type": "string",
"description": "订单编号"
},
"outTradeNo": {
"type": "string",
"description": "商户订单号"
},
"payTime": {
"type": "string",
"format": "date-time",
"description": "支付时间"
},
"payType": {
"type": "string",
"description": "支付类型: FULL/DEPOSIT/BALANCE"
},
"status": {
"type": "string",
"description": "交易状态"
},
"totalAmount": {
"type": "number",
"description": "交易金额"
},
"tradeType": {
"type": "string",
"description": "交易类型: JSAPI/H5"
},
"transactionId": {
"type": "integer",
"format": "int64",
"description": "交易ID"
},
"transactionIdWx": {
"type": "string",
"description": "微信支付交易号"
},
"userId": {
"type": "integer",
"format": "int64",
"description": "用户ID"
}
},
"title": "支付交易信息"
},
"统一响应结果«List«支付交易信息»»": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"example": 200,
"description": "状态码"
},
"data": {
"type": "array",
"description": "响应数据",
"items": {
"originalRef": "支付交易信息",
"$ref": "#/definitions/支付交易信息"
}
},
"message": {
"type": "string",
"example": "成功",
"description": "响应消息"
}
},
"title": "统一响应结果«List«支付交易信息»»"
},
"统一响应结果«List«退款记录信息»»": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"example": 200,
"description": "状态码"
},
"data": {
"type": "array",
"description": "响应数据",
"items": {
"originalRef": "退款记录信息",
"$ref": "#/definitions/退款记录信息"
}
},
"message": {
"type": "string",
"example": "成功",
"description": "响应消息"
}
},
"title": "统一响应结果«List«退款记录信息»»"
},
"统一响应结果«分页结果«支付交易信息»»": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"example": 200,
"description": "状态码"
},
"data": {
"description": "响应数据",
"originalRef": "分页结果«支付交易信息»",
"$ref": "#/definitions/分页结果«支付交易信息»"
},
"message": {
"type": "string",
"example": "成功",
"description": "响应消息"
}
},
"title": "统一响应结果«分页结果«支付交易信息»»"
},
"统一响应结果«支付交易信息»": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"example": 200,
"description": "状态码"
},
"data": {
"description": "响应数据",
"originalRef": "支付交易信息",
"$ref": "#/definitions/支付交易信息"
},
"message": {
"type": "string",
"example": "成功",
"description": "响应消息"
}
},
"title": "统一响应结果«支付交易信息»"
},
"统一响应结果«退款记录信息»": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32",
"example": 200,
"description": "状态码"
},
"data": {
"description": "响应数据",
"originalRef": "退款记录信息",
"$ref": "#/definitions/退款记录信息"
},
"message": {
"type": "string",
"example": "成功",
"description": "响应消息"
}
},
"title": "统一响应结果«退款记录信息»"
},
"退款记录信息": {
"type": "object",
"properties": {
"createTime": {
"type": "string",
"format": "date-time",
"description": "创建时间"
},
"mchId": {
"type": "string",
"description": "商户号"
},
"orderId": {
"type": "integer",
"format": "int64",
"description": "订单ID"
},
"orderNo": {
"type": "string",
"description": "订单编号"
},
"outRefundNo": {
"type": "string",
"description": "商户退款单号"
},
"reason": {
"type": "string",
"description": "退款原因"
},
"refundAmount": {
"type": "number",
"description": "退款金额"
},
"refundId": {
"type": "integer",
"format": "int64",
"description": "退款ID"
},
"refundIdWx": {
"type": "string",
"description": "微信退款单号"
},
"status": {
"type": "string",
"description": "退款状态"
},
"successTime": {
"type": "string",
"format": "date-time",
"description": "退款成功时间"
},
"totalAmount": {
"type": "number",
"description": "订单总金额"
},
"transactionId": {
"type": "integer",
"format": "int64",
"description": "交易ID"
}
},
"title": "退款记录信息"
},
"退款请求": {
"type": "object",
"required": [
"amount",
"orderId"
],
"properties": {
"amount": {
"type": "number",
"example": 100.0,
"description": "退款金额"
},
"orderId": {
"type": "integer",
"format": "int64",
"example": 1001,
"description": "订单ID"
},
"reason": {
"type": "string",
"example": "行程取消",
"description": "退款原因"
}
},
"title": "退款请求"
}
}
}