Giao diện
API · payment
Trang sinh tự động
Parse từ schema.graphql (SDL backend export) bằng parser graphql. Mô tả và quyền lấy nguyên văn từ description trong SDL.
17 query · 17 mutation.
Query
cancellationDecision
Chưa có description trong SDL.
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
orderId | ID! |
Trả về CancellationDecision!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
orderId | ID! | |
campaignType | CampaignType! | |
cause | CancellationCause! | |
timing | CancellationTiming! | |
policyVersion | String! | Interim policy version the decision was taken under. |
outcome | CancellationOutcome! | |
cashDisposition | String! | REFUND_ALL_CAPTURES | KEEP_DEPOSIT | UNDECIDED |
pointsDisposition | String! | REVERSE_ALL_ORIGINAL_REDEEM | KEEP_USED | UNDECIDED |
policyRef | String | The open decision / gap when the outcome is POLICY_UNDECIDED. |
basis | [String!]! | Source rule ids the decision rests on. |
refundCaseId | ID | |
refundableCashVnd | VndAmount | From the refund case, when one exists (sum of the original captures). |
pointsToReverse | PointAmount | From the refund case, when one exists (entire original REDEEM). |
heldCashVnd | VndAmount | FORFEIT only: the captured cash that is kept. |
heldPoints | PointAmount | FORFEIT only: the redeemed points that are kept. |
retainedCycleCount | Int! | |
retainedDeliveries | [RetainedDelivery!]! | |
decidedAt | DateTime! |
cashbookEntries
Automatic receipts and reversals, latest first. Requires cashbook.read (RCP-01, Finance).
query · quyền: cashbook.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
orderId | ID | ||
entryType | CashbookEntryType | ||
obligationKind | CashbookObligationKind | ||
from | DateTime | ||
to | DateTime | ||
page | Int | ||
pageSize | Int |
Trả về CashbookEntryPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [CashbookEntry!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
cashbookFundView
Read-only deposit-fund view; model-governed figures are POLICY_UNDECIDED. Requires cashbook.read.
query · quyền: cashbook.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
from | DateTime | ||
to | DateTime |
Trả về CashbookFundView!
| Field | Kiểu | Mô tả |
|---|---|---|
from | DateTime | |
to | DateTime | |
modelDecision | FundFigureStatus! | Deposit/remaining receipt sums are sourced facts; the four fund figures need the model. |
modelReason | String! | NO_APPROVED_VERSION or APPROVED_MODEL_NOT_BUILT. |
lines | [CashbookFundLine!]! | |
held | FundFigure! | |
applied | FundFigure! | |
refunded | FundFigure! | |
forfeited | FundFigure! |
codCollection
One COD collection with its evidence. Requires payment.read (Finance).
query · quyền: payment.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
id | ID! |
Trả về CodCollection!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
obligationId | ID! | |
orderId | ID! | |
orderCode | String! | #298 business order code (temporary format, NEW-SL-12). |
orderCycleId | ID | |
cycleNo | Int | |
status | CodStatus! | |
version | Int! | |
amountDueVnd | VndAmount! | |
shipmentId | ID | |
collectorCarrierCode | String | |
assignedAt | DateTime | |
deliveredAt | DateTime | |
collection | CodCollectionEvidence | Set once; may arrive before delivery (kept until delivered). |
completedAt | DateTime | When delivered AND collected both held. |
remittance | CodRemittance | |
awaitingRemittance | Boolean! | COLLECTED without remittance evidence (no deadline is sourced). |
updatedAt | DateTime! |
codCollections
COD collections, latest change first. Requires payment.read (Finance).
query · quyền: payment.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
status | CodStatus | ||
orderId | ID | ||
page | Int | ||
pageSize | Int |
Trả về CodCollectionPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [CodCollection!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
codReconciliation
PRC-01 reconcile.read (Finance): every COD run version of one VN date, newest first.
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
runDate | String! |
Trả về [CodReconciliationRun!]!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
runDate | String! | VN business date YYYY-MM-DD; the window is exactly that VN day. |
runVersion | Int! | |
triggerKind | String! | SCHEDULED or RERUN |
status | PaymentReconciliationRunStatus! | |
sourceStatus | SourceStatus! | READY only when COMPLETE; INCOMPLETE/UNKNOWN never mean zero. |
windowStart | DateTime! | |
windowEnd | DateTime! | |
startedAt | DateTime! | |
finishedAt | DateTime | |
errorCode | String | |
datasetHash | String | SHA-256 hex of the COD dataset the run read (COMPLETE only). |
rowsConsidered | Int | |
totals | CodReconciliationTotals | |
items | [CodDiscrepancy!]! | |
gaps | [CodRemittanceGap!]! |
funds
The funds vouchers may use: the cash fund and one per company bank account (VCH-01).
query · SDL không ghi quyền
Không có tham số.
Trả về [Fund!]!
| Field | Kiểu | Mô tả |
|---|---|---|
code | String! | |
kind | FundKind! | |
name | String! | |
bankName | String | BANK only. |
accountTail | String | BANK only: the last 4 to 6 digits of the account number, never the whole number. |
status | FundStatus! |
momoReconciliation
PRC-01 reconcile.read (Finance): every run version of one VN date, newest first.
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
runDate | String! |
Trả về [PaymentReconciliationRun!]!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
provider | String! | |
providerMode | String! | MOCK only until G-FIN (DEC-FIN-MOMO-LIVE). |
runDate | String! | VN business date YYYY-MM-DD; the window is exactly that VN day. |
runVersion | Int! | |
triggerKind | String! | SCHEDULED or RERUN |
status | PaymentReconciliationRunStatus! | |
sourceStatus | SourceStatus! | READY only when COMPLETE; INCOMPLETE/UNKNOWN never mean zero. |
windowStart | DateTime! | |
windowEnd | DateTime! | |
startedAt | DateTime! | |
finishedAt | DateTime | |
errorCode | String | |
datasetHash | String | SHA-256 hex of the provider dataset (COMPLETE only). |
totals | [PaymentReconciliationTotal!]! | Empty unless COMPLETE. |
matchedCount | Int | |
unknownCarriedOver | Int | |
items | [PaymentDiscrepancy!]! |
orderPayments
payment.read (F-01 Finance): the tenders, transactions, allocations and periods of one order.
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
orderId | ID! |
Trả về OrderPaymentView!
| Field | Kiểu | Mô tả |
|---|---|---|
orderId | ID! | |
orderCode | String | #298 business order code (temporary format, NEW-SL-12); null for an id that is no visible order. |
tenders | [OrderPaymentTender!]! | |
periods | [OrderPaymentPeriod!]! | |
totalVnd | VndAmount | |
paidVnd | VndAmount | |
refundedVnd | VndAmount | |
remainingVnd | VndAmount |
paymentObligations
payment.read (F-01 Finance): every payment obligation, newest first.
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
filter | PaymentObligationFilter | ||
page | Int | ||
pageSize | Int |
Trả về PaymentObligationPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [PaymentObligationRow!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
paymentsNeedingAttention
payment.read (F-01 Finance): payments that need a person (#479). Read only.
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
kind | PaymentAttentionKind | ||
page | Int | ||
pageSize | Int |
Trả về PaymentAttentionPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [PaymentAttentionItem!]! | Oldest first. |
page | Int! | |
pageSize | Int! | |
total | Int! | Rows of the requested kind (all kinds without a filter), all pages. |
unknownCount | Int! | |
needsReviewCount | Int! | |
compensationRejectedCount | Int! | |
eventConflictCount | Int! | |
holdReleaseFailedCount | Int! | |
unknownAfterMinutes | Int! | An UNKNOWN attempt is listed once it is this old (PAYMENT_ATTENTION_UNKNOWN_AFTER_MINUTES, default 30). |
paymentTransactions
payment.read (F-01 Finance): provider captures and refunds with their attempt and obligation, newest first.
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
filter | PaymentTransactionFilter | ||
page | Int | ||
pageSize | Int |
Trả về PaymentTransactionPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [PaymentTransactionRow!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
refundCase
One refund case with its legs and history. Requires refund.read (RFD-01).
query · quyền: refund.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
id | ID! |
Trả về RefundCase!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
orderId | ID! | |
orderCode | String! | #298 business order code (temporary format, NEW-SL-12). |
buyerId | ID! | |
origin | RefundOrigin! | |
source | RefundSource! | COD_REFUSAL when a refused COD opened this MANUAL case, else the origin. |
caseType | String! | FULL_REFUND (forfeiture is not a refund case: a FORFEITED order is refused) or PARTIAL_REFUND (FU-575, DEC-CP-SHORTAGE: the share of a partial shortage, origin SHORTAGE; FU-FORFEIT: the share of one forfeited Recurring cycle, origin FORFEIT); #479 B: NO_REFUND (origin RETURN: nothing refunded, keptCashVnd / keptPoints kept); #479 C: EXCESS_REFUND (origin EXCESS_DEPOSIT). |
scope | String! | FULL_ORDER (the whole refundable remainder of the order) or PARTIAL_UNITS (exactly the stored share of the cancelled units); no partial amount can be requested. #479 B: RETURNED_ORDER (a Mua chung return) or RETURNED_CYCLE (one Mua định kỳ cycle, returnCycleNo); #479 C: EXCESS_DEPOSIT. |
status | RefundCaseStatus! | |
progress | RefundProgress! | |
version | Int! | |
approvalRequired | Boolean! | |
requestedBy | ID | |
requestReason | String | |
refundableCashVnd | VndAmount! | Sum of the cash legs (every collected capture's refundable remainder; the deposit share for PARTIAL_UNITS). |
pointsToReverse | PointAmount! | Sum of the point legs (every original REDEEM's unreversed points; the points share for PARTIAL_UNITS). |
decidedBy | ID | |
decidedAt | DateTime | |
decisionNote | String | |
thresholdPolicyVersionId | ID | |
evidenceMediaIds | [ID!]! | |
ruleVersions | [String!]! | |
completedAt | DateTime | |
returnCycleNo | Int | #479 B (origin RETURN): the returned Mua định kỳ cycle; null for a Mua chung return and every other case. |
returnedOn | String | #479 B (origin RETURN): day of the return, YYYY-MM-DD (Vietnam); null otherwise. |
keptCashVnd | VndAmount | #479 B (origin RETURN): cash of the unit the shop keeps (NO_REFUND: everything paid); null otherwise. |
keptPoints | PointAmount | #479 B (origin RETURN): Pi-Point of the unit not given back; null otherwise. |
opsNote | String | #479 B (origin RETURN): internal Operations note; null when none. requestReason holds the reason. |
overpaymentCaseId | ID | #479 C (origin EXCESS_DEPOSIT): the cọc dư case this claim refunds; null otherwise. |
createdAt | DateTime! | |
updatedAt | DateTime! | |
branches | [RefundLeg!]! | |
history | [RefundHistoryEntry!]! | |
profileReady | Boolean! | True when the customer sent a receiver profile. A transfer cannot be recorded before. |
receiverProfile | RefundReceiverProfile | Masked; null unless the caller holds order.refund.process (NFR #5). |
transferRecord | RefundTransferRecord | |
cancelledAt | DateTime | When the order was cancelled (null when unknown). |
cancelReason | String | Cause code of the cancellation decision (CAMPAIGN_FAILED, BUYER_PRE_CLOSE, SHORTAGE, FORFEITURE), null when unknown. No free text. |
cancelReasonCode | OrderCancelReasonCode | G2I-P1-03 (O5, #371): the reason code the buyer picked when cancelling the order; null for any other cancellation or none. |
cancelNote | String | G2I-P1-03: the buyer's own words when cancelling (staff only); null when none. |
refundCases
Refund cases, newest first. Requires refund.read (RFD-01, Finance). orderCode (#479): exact business order code, any letter case; an unknown code matches nothing.
query · quyền: refund.read
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
status | RefundCaseStatus | ||
orderId | ID | ||
orderCode | String | ||
page | Int | ||
pageSize | Int |
Trả về RefundCasePage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [RefundCase!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
unappliedPayments
PRC-01 reconcile.read (Finance): captured money not applied to an obligation. Read only (GAP-149 / GAP-1620).
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
reason | UnappliedPaymentReason | ||
state | UnappliedPaymentState | ||
intentId | ID | #479: only the captures of this payment attempt (PaymentIntent id). | |
limit | Int | 50 |
Trả về UnappliedPaymentQueue!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [UnappliedPayment!]! | A page, oldest first. |
totalCount | Int! | Rows matching the filters (all pages). |
totalUnappliedVnd | VndAmount! | Sum of unappliedVnd over all matching rows. |
resolution | UnappliedResolutionStatus! |
voucher
Chưa có description trong SDL.
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
id | ID! |
Trả về Voucher!
| Field | Kiểu | Mô tả |
|---|---|---|
id | ID! | |
kind | FinanceVoucherKind! | |
status | VoucherStatus! | |
fundCode | String! | |
amountVnd | VndAmount! | Positive integer VND (REVERSAL: copied from the original). |
currency | String! | |
reason | String! | |
orderId | ID | |
orderCode | String | #298 business order code of orderId (temporary format, NEW-SL-12); null without an order and in a command result. |
transactionId | ID | |
originalVoucherId | ID | REVERSAL only: the APPROVED voucher it corrects. |
reversedByVoucherId | ID | APPROVED RECEIPT/PAYMENT only: its live reversal. |
evidenceMediaIds | [ID!]! | Private internal documents (media ids), frozen at submit. |
createdBy | ID! | |
createdAt | DateTime! | |
updatedBy | ID! | |
updatedAt | DateTime! | |
submittedBy | ID | |
submittedAt | DateTime | |
payloadHash | String | Hash of the submitted content and policy; the checker sends it back to approve. |
policy | VoucherPolicySnapshot | |
approvedBy | ID | |
approvedAt | DateTime | |
cashbookEntryId | ID | The cashbook entry an APPROVED voucher posted (one). |
cancelledBy | ID | |
cancelledAt | DateTime | |
rejection | VoucherRejection | Single voucher read only: the last time a checker sent it back to its maker. |
automaticEntryId | ID | Single voucher read only: the automatic entry of the same provider transaction (duplicate source). |
version | Int! |
vouchers
Manual vouchers, newest first (VCH-01).
query · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
kind | FinanceVoucherKind | ||
status | VoucherStatus | ||
orderId | ID | ||
page | Int | ||
pageSize | Int |
Trả về VoucherPage!
| Field | Kiểu | Mô tả |
|---|---|---|
items | [Voucher!]! | |
page | Int! | |
pageSize | Int! | |
total | Int! |
Mutation
approveVoucher
A different person approves exactly what they reviewed: APPROVED, immutable, one cashbook entry (VCH-04, MFA).
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | ApproveVoucherInput! |
Trả về VoucherResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
voucher | Voucher! |
cancelPaymentSession
#479 T14. Closes the provider session of the buyer's own open payment attempt (DEPOSIT or REMAINING), then asks the provider: the attempt ends FAILED and a new one may start, unless the provider reports it paid (then it is applied as paid). A deposit attempt's checkout follows. Requires payment.start (U-05, own order). status UNKNOWN while the provider has not confirmed. Refused: already_paid, session_not_open (no session yet, or the attempt already ended), attempt_in_progress (a capture is in flight).
mutation · quyền: payment.start
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | CancelPaymentSessionInput! |
Trả về StartPaymentResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | The payment intent id. |
version | Int! | |
status | CommandStatus! | UNKNOWN while the provider outcome is undecided. |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | complete_mock_checkout | check_payment_status | order_placed | deposit_failed. |
intent | PaymentIntent! |
cancelVoucher
Cancel an own DRAFT or SUBMITTED voucher (VCH-02).
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | VoucherCommandInput! |
Trả về VoucherResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
voucher | Voucher! |
confirmRefundTransfer
Xac nhan da hoan tien (DH-US-07 AC04): the order's payment becomes REFUNDED, logged, the customer is notified. order.refund.process. Errors: validation_failed (transactionCode, transferredOn, note), stale_version, conflict (refund_not_waiting, profile_required, transfer_already_recorded, transaction_code_reuse, legs_in_progress, case_not_approved), forbidden.
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | ConfirmRefundTransferInput! |
Trả về ConfirmRefundTransferResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | The refund case id. |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
orderId | ID! | |
refundCaseId | ID! | |
outcome | RefundRecordOutcome! | APPLIED, or EXISTING when this confirm (same request or same code) was already saved. |
caseStatus | String! | REFUNDED, or APPROVED while its Pi-Point legs are still running (they complete it). |
paymentStatus | PaymentAxis! | REFUNDED (Da hoan tien) or PARTIALLY_REFUNDED (Hoan mot phan: a Recurring order with a delivered cycle). |
statusVersion | Int! | |
transfer | RefundConfirmedTransfer! |
recordCodCollection
Legacy order-level manual COD collection (A-FF-03). Requires cod.collect. No web caller since U19-P4-02.
mutation · quyền: cod.collect
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | RecordCodCollectionInput! |
Trả về CodCommandResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | The COD collection id. |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
codStatus | CodStatus! | |
remittanceId | ID |
recordCodRemittance
Remittance evidence of a COLLECTED COD. Requires cod.remit (COD-02, Finance).
mutation · quyền: cod.remit
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | RecordCodRemittanceInput! |
Trả về CodCommandResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | The COD collection id. |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
codStatus | CodStatus! | |
remittanceId | ID |
recordReturnNoRefund
#479 B. Operations record that a returned unit paid in full (a Mua chung order in Hoàn hàng, or one Mua định kỳ cycle in Hoàn hàng) is NOT refunded: one RETURN refund case (NO_REFUND, CLOSED, kept = everything paid, reason, date, note) and the unit's payment status RETURN_NO_REFUND "Không hoàn tiền (hoàn hàng)". Idempotent by requestId. Requires order.refund.process; the buyer of the order is refused. Errors: validation_failed (reason, returnedOn, note, cycleNo), not_found, stale_version, conflict (already_recorded, not_returned, not_paid), forbidden.
mutation · quyền: order.refund.process
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | RecordReturnNoRefundInput! |
Trả về RecordReturnNoRefundResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | The RETURN refund case id. |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
orderId | ID! | |
refundCaseId | ID! | |
cycleNo | Int | |
outcome | ReturnRefundOutcome! | |
caseStatus | RefundCaseStatus! | |
keptCashVnd | VndAmount! | |
keptPoints | PointAmount! | |
returnedOn | String! | |
paymentStatus | PaymentAxis! | The payment status of the unit (the order, or the cycle): RETURN_NO_REFUND. |
statusVersion | Int! | status_version of the unit after the record. |
rejectVoucher
A different person sends a SUBMITTED voucher back to its maker with a reason; the voucher returns to DRAFT (VCH-04, MFA).
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | RejectVoucherInput! |
Trả về VoucherResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
voucher | Voucher! |
requestRefundInfoUpdate
Bao khach cap nhat lai (DH-US-16): the payment goes back to WAITING_REFUND_REQUEST; the customer sees the refund as REJECTED with the reason code (and the note when visible) and gets an in-app notice. order.refund.process. Errors: validation_failed (reasonCode, reason, customerNote), stale_version, conflict (refund_not_waiting, profile_required, profile_locked), forbidden.
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | RequestRefundInfoUpdateInput! |
Trả về RequestRefundInfoUpdateResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | The refund case id. |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
orderId | ID! | |
refundCaseId | ID! | |
outcome | RefundRecordOutcome! | APPLIED, or UNCHANGED for a replay of the same request. |
paymentStatus | PaymentAxis! | WAITING_REFUND_REQUEST (Cho yeu cau hoan) until the customer sends the request again. |
statusVersion | Int! | |
rejectedRevision | Int! | The revision of the customer's request that was sent back. |
resolveDiscrepancy
PRC-02 reconcile.resolve (Finance): handle one payment discrepancy item.
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | ResolveDiscrepancyInput! |
Trả về ResolveDiscrepancyPayload!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | String! | |
correlationId | String! | |
item | PaymentDiscrepancy! |
retryRefundBranch
Recovers a REJECTED leg (never an UNKNOWN one). Requires refund.recover (RFD-02).
mutation · quyền: refund.recover
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | RetryRefundBranchInput! |
Trả về RefundCommandResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | The refund case id. |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
refundCaseId | ID! | |
orderId | ID! | |
caseStatus | RefundCaseStatus! | |
progress | RefundProgress! | |
approvalRequired | Boolean! | |
refundableCashVnd | VndAmount! | |
pointsToReverse | PointAmount! | |
legCount | Int! |
saveVoucherDraft
Create or revise a DRAFT voucher (VCH-02).
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | SaveVoucherDraftInput! |
Trả về VoucherResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
voucher | Voucher! |
selectRemainingPaymentMethod
U19-P2-21. The buyer chooses or changes the remaining payment method of an own CONFIRMED order (ORD-04 payment.method_select, OWN). ONLINE opens the online remaining. Errors (extensions.reason): conflict not_confirmed, method_locked (Dang dong goi or later), payment_pending (an online payment is in progress), already_paid, cod_obligation_open; forbidden for another buyer's order; stale_version. U28-P2-03 (DEC-U28-04): a Mua định kỳ order switches COD -> ONLINE per cycle (cycles at Đang đóng gói keep their COD): conflict nothing_remaining when the online amount is <= 0, all_cycles_locked when no cycle is open. PAF (S9, DEC-PAF-09): a Mua chung order with an open COD remaining switches COD -> ONLINE too (the COD obligation is cancelled) until it is at Đang đóng gói.
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | SelectRemainingPaymentMethodInput! |
Trả về SelectRemainingPaymentMethodResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | The order id. |
version | Int! | Version of the choice after the command. |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
method | OrderPaymentMethod! | |
previousMethod | OrderPaymentMethod! | |
changed | Boolean! | False when the method was already the requested one. |
remainingObligationId | ID | ONLINE: the REMAINING obligation to pay with startRemainingPayment (null when nothing is left to pay). |
amountVnd | VndAmount | U28-P2-03 (DEC-U28-04). ONLINE: the amount of that obligation; null otherwise. |
lockedCycleNos | [Int!] | U28-P2-03. Mua định kỳ: cycles at Đang đóng gói or later that keep their fixed COD; null for Mua chung. |
startDepositCheckout
Starts (or, with the same requestId, re-checks) the whole deposit checkout of an order: the point REDEEM first when the order uses points, then the online cash deposit. A rejected or unknown REDEEM starts no cash; a failed cash deposit after an accepted REDEEM reverses the full points once. A failed attempt leaves the order waiting for its deposit: a new requestId retries it (same order, same points). Requires payment.start (U-05, own order).
mutation · quyền: payment.start
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | StartDepositCheckoutInput! |
Trả về StartDepositCheckoutResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | The checkout id. |
version | Int! | |
status | CommandStatus! | UNKNOWN while a provider outcome is undecided. |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | check_checkout_status | complete_mock_checkout | order_placed | points_rejected_requote | deposit_failed | points_refund_needs_support. deposit_failed and points_rejected_requote: the order is still DEPOSIT_PENDING; retry it with a new requestId. |
checkout | DepositCheckout! | |
intent | PaymentIntent | The cash deposit attempt, once it exists (complete the mock checkout with it). |
startRemainingPayment
P3-05. Starts (or re-checks, same requestId) the ONE full online remaining payment of a closed (LOCKED) order, never per recurring cycle. Requires payment.start (U-05, own order). Refused when already paid, while an attempt is live (UNKNOWN: provider_unknown) or for a COD obligation. A lower final price never reaches here: it is an offline overpayment case. nextAction: complete_mock_checkout | check_payment_status | remaining_paid | remaining_payment_failed.
mutation · quyền: payment.start
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | StartRemainingPaymentInput! |
Trả về StartPaymentResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | The payment intent id. |
version | Int! | |
status | CommandStatus! | UNKNOWN while the provider outcome is undecided. |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | complete_mock_checkout | check_payment_status | order_placed | deposit_failed. |
intent | PaymentIntent! |
submitRefundRequest
APP_USER (refund.submit, own order): sends or sends again the refund request while the payment status is WAITING_REFUND_REQUEST; it becomes WAITING_REFUND. #479 C: with refundCaseId, the request of one cọc dư claim while OrderRefund.excessClaim.canSubmitRequest (the payment status does not move). Errors: forbidden (another customer's order), validation_failed (field), stale_version, conflict (refund_not_requestable, no_cash_to_transfer, profile_locked).
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | SubmitRefundRequestInput! |
Trả về RefundSubmitResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | The order id. |
version | Int! | status_version of the order. |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
orderId | ID! | |
refundCaseId | ID! | |
outcome | RefundRecordOutcome! | APPLIED (a new revision) or UNCHANGED (this command already ran). |
paymentStatus | PaymentAxis! | WAITING_REFUND after a submission; #479 C: the order's own payment status, unchanged, for an excess claim. |
revision | Int! | |
citizenIdMasked | String! | |
accountNumberMasked | String! | |
holderMatchesIdName | Boolean! | The account holder name matches the name on the CCCD (accent/case-insensitive). A sign only. |
submitVoucher
Maker submits with evidence; the FUNDS_VOUCHER policy is evaluated and frozen (VCH-03, MFA).
mutation · SDL không ghi quyền
| Tham số | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
input | VoucherCommandInput! |
Trả về VoucherResult!
| Field | Kiểu | Mô tả |
|---|---|---|
aggregateId | ID! | |
version | Int! | |
status | CommandStatus! | |
requestId | ID! | |
correlationId | ID! | |
nextAction | NextAction | |
voucher | Voucher! |