Refund
object type
A Refund — a PROCESSOR-executed money reversal against the original Payment. NEVER wire-created: it spawns inside refundReturn(original_tender) — and its posReturn collapse — record-first/processor-after: minted created BEFORE the StripePort.refund call; the settle/fail flips ride the ACK/webhook path (system:stripe_webhook rows ONLY — the wire surface is READ-ONLY); 64 attempts bound each order (the Order.refundIds cap). Allocation is LIFO over the order's refundable integrated payments (newest money first); over-capacity refuses CONFLICT/OVER_TENDERED; each committed refund posts a NEGATIVE card Tender. An async processor failure composes the compensating-tender unwind + the refund_async_failed operational line.
Fields
| Field | Type | Notes |
|---|---|---|
id | ID ID! | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
sysId | String String! | The group-scoped human-facing system id (RF-…). |
type | String String! | The kind of record — always Refund here. |
caption | String String! | The record’s display name — what people see it called. |
status | String String! | The FSM state: created | succeeded | failed. |
parentId | ID ID! | The Payment whose settled money this reverses; the record also names its spawning Return (returnId) and the Order anchoring the money story (orderId); rootId = the org group; parentId!== rootId always. |
rootId | ID ID! | The org-group family root. |
createdAt | String String! | When the record was created, as a UTC timestamp. |
updatedAt | String String! | When the record last changed, as a UTC timestamp. |
revisionNum | Int Int! | How many times this record has been edited; the first save is 0. |
revision | ID ID! | The OCC revision token — supply it on every mutation of this record; rotates on every write. |
refCaptions | RefCaption [RefCaption!]! | The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption. |
organizationId | ID ID! | The selling Organization (copied from the parent Payment at mint — attribution). |
orderId | ID ID! | The Order anchoring the money story (the parent Payment’s own parent — the Order.refundIds bounded-append twin). |
returnId | ID ID! | The Return this refund executes (SPEC_CATALOG:365 Refund→Return N:1 — the refundReturn original_tender spawn; the RETURN lane is the ONLY refund consumer). |
amountMinor | Int Int! | The amount reversed in minor units (positive — the sign lives on the reversal Tender row). |
currency | String String! | The settlement currency — the parent Payment’s currency VERBATIM. |
stripeAccountRef | String | The Connect account context THREADED from the parent Payment’s stamp. Null = the platform account. |
refundRef | ID | The processor refund ref (re_…) — stamped WITH the settle/fail truth (REQUIRED from succeeded; present on an ASYNC-failed refund, absent on a sync port refusal). |
failureReason | String | The processor failure reason (failed refunds only — sync port refusal or async processor truth). |