added payment history
Some checks failed
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled
CI/CD / Deploy binary to server (push) Has been cancelled

This commit is contained in:
2026-09-21 18:12:08 +05:00
parent 23d208769c
commit 99788a853f
9 changed files with 768 additions and 0 deletions

View File

@@ -4897,6 +4897,89 @@ const docTemplate = `{
}
}
},
"/payment-history": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a paginated, branch-scoped audit trail of visa/master/sber payout attempts (paid, failed, or pending), across orders",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "List payment history",
"parameters": [
{
"type": "integer",
"description": "Filter by order ID",
"name": "order_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by branch ID",
"name": "branch_id",
"in": "query"
},
{
"type": "integer",
"description": "Filter by order owner (client) user ID",
"name": "user_id",
"in": "query"
},
{
"type": "string",
"description": "Filter by gateway status (pending, success, failed)",
"name": "status",
"in": "query"
},
{
"type": "string",
"description": "Filter by passport name/surname or order unique ID",
"name": "search",
"in": "query"
},
{
"type": "integer",
"default": 1,
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"default": 10,
"description": "Items per page",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/paymenthistory.ListPaymentHistoryDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/payment-settings": {
"get": {
"security": [
@@ -9289,6 +9372,100 @@ const docTemplate = `{
}
}
},
"paymenthistory.ListPaymentHistoryDTO": {
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/paymenthistory.PaymentHistoryItemDTO"
}
}
}
},
"paymenthistory.PaymentHistoryItemDTO": {
"type": "object",
"properties": {
"amountTmt": {
"type": "number"
},
"bankFeeTmt": {
"type": "number"
},
"branchId": {
"type": "integer"
},
"branchName": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"createdById": {
"type": "integer"
},
"createdByName": {
"type": "string"
},
"exchangeRateRub": {
"type": "number"
},
"exchangeRateUsd": {
"type": "number"
},
"gatewayReference": {
"type": "string"
},
"gatewayStatus": {
"type": "string"
},
"gbusFeeTmt": {
"type": "number"
},
"id": {
"type": "integer"
},
"orderId": {
"type": "integer"
},
"orderUniqueId": {
"type": "string"
},
"paid": {
"type": "boolean"
},
"passportName": {
"type": "string"
},
"passportSurname": {
"type": "string"
},
"paymentPeriod": {
"type": "string"
},
"totalAmountTmt": {
"type": "number"
},
"tvebFeeTmt": {
"type": "number"
},
"tvebFeeUsd": {
"type": "number"
},
"type": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"userId": {
"type": "integer"
}
}
},
"paymentsettings.PaymentSettingsDTO": {
"type": "object",
"properties": {