payment-history: /{id} lists the order's payments, logs move to /{id}/logs
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

GET /payment-history/{id} now returns one row per payment of the order
(paid, card, time, period, amounts), newest first - the per-order payment
table the frontend already calls. The step-by-step logs it used to return
are kept at GET /payment-history/{id}/logs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 18:38:02 +05:00
parent a715cd23ea
commit c209f338c2
7 changed files with 319 additions and 14 deletions

View File

@@ -1484,6 +1484,23 @@ definitions:
userId:
type: integer
type: object
paymenthistory.PaymentLogDTO:
properties:
createdAt:
type: string
createdById:
type: integer
createdByName:
type: string
detail:
type: object
id:
type: integer
orderId:
type: integer
step:
type: string
type: object
paymentsettings.PaymentSettingsDTO:
properties:
bankFeeTmt:
@@ -5563,9 +5580,11 @@ paths:
- payment-history
/payment-history/{id}:
get:
description: Returns the full step-by-step audit trail (visa_master_payment_logs)
recorded while processing an order's payout - evidence of what actually happened,
independent of the summary rows returned by the list endpoint
description: Returns every visa/master/sber payout attempt of one order, newest
first - one row per payment with whether it was paid (paid/gatewayStatus),
the card it was paid from (cardholderName/maskedPan, once GBÜS reports them),
its time (createdAt) and period (paymentPeriod). The raw GBÜS response of
a row is at /payment-history/payments/{id}; the step-by-step logs are at /payment-history/{id}/logs.
parameters:
- description: Order ID
in: path
@@ -5578,7 +5597,50 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/appresult.AppSuccess'
items:
$ref: '#/definitions/paymenthistory.PaymentHistoryItemDTO'
type: array
"400":
description: Bad Request
schema:
$ref: '#/definitions/appresult.AppError'
"403":
description: Forbidden
schema:
$ref: '#/definitions/appresult.AppError'
"404":
description: Not Found
schema:
$ref: '#/definitions/appresult.AppError'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/appresult.AppError'
security:
- BearerAuth: []
summary: List an order's payments
tags:
- payment-history
/payment-history/{id}/logs:
get:
description: Returns the full step-by-step audit trail (visa_master_payment_logs)
recorded while processing an order's payout, newest first - evidence of what
actually happened, independent of the summary rows returned by /payment-history/{id}
parameters:
- description: Order ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/paymenthistory.PaymentLogDTO'
type: array
"400":
description: Bad Request
schema: