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": {

View File

@@ -4891,6 +4891,89 @@
}
}
},
"/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": [
@@ -9283,6 +9366,100 @@
}
}
},
"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": {

View File

@@ -1295,6 +1295,68 @@ definitions:
- price
- title
type: object
paymenthistory.ListPaymentHistoryDTO:
properties:
count:
type: integer
items:
items:
$ref: '#/definitions/paymenthistory.PaymentHistoryItemDTO'
type: array
type: object
paymenthistory.PaymentHistoryItemDTO:
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
type: object
paymentsettings.PaymentSettingsDTO:
properties:
bankFeeTmt:
@@ -4869,6 +4931,61 @@ paths:
summary: Update payment card active
tags:
- payment-card
/payment-history:
get:
description: Returns a paginated, branch-scoped audit trail of visa/master/sber
payout attempts (paid, failed, or pending), across orders
parameters:
- description: Filter by order ID
in: query
name: order_id
type: integer
- description: Filter by branch ID
in: query
name: branch_id
type: integer
- description: Filter by order owner (client) user ID
in: query
name: user_id
type: integer
- description: Filter by gateway status (pending, success, failed)
in: query
name: status
type: string
- description: Filter by passport name/surname or order unique ID
in: query
name: search
type: string
- default: 1
description: Page number
in: query
name: page
type: integer
- default: 10
description: Items per page
in: query
name: limit
type: integer
produces:
- application/json
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'
security:
- BearerAuth: []
summary: List payment history
tags:
- payment-history
/payment-settings:
get:
description: Returns the admin-configurable bank and GBÜS commission fees used