AlmondTill/G3N API

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

FieldTypeNotes
idID ID!The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it.
sysIdString String!The group-scoped human-facing system id (RF-…).
typeString String!The kind of record — always Refund here.
captionString String!The record’s display name — what people see it called.
statusString String!The FSM state: created | succeeded | failed.
parentIdID 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.
rootIdID ID!The org-group family root.
createdAtString String!When the record was created, as a UTC timestamp.
updatedAtString String!When the record last changed, as a UTC timestamp.
revisionNumInt Int!How many times this record has been edited; the first save is 0.
revisionID ID!The OCC revision token — supply it on every mutation of this record; rotates on every write.
refCaptionsRefCaption [RefCaption!]!The server-composed captions of this record's declared references (the referenced-caption rule) — one row per referenced id; see RefCaption.
organizationIdID ID!The selling Organization (copied from the parent Payment at mint — attribution).
orderIdID ID!The Order anchoring the money story (the parent Payment’s own parent — the Order.refundIds bounded-append twin).
returnIdID 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).
amountMinorInt Int!The amount reversed in minor units (positive — the sign lives on the reversal Tender row).
currencyString String!The settlement currency — the parent Payment’s currency VERBATIM.
stripeAccountRefStringThe Connect account context THREADED from the parent Payment’s stamp. Null = the platform account.
refundRefIDThe 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).
failureReasonStringThe processor failure reason (failed refunds only — sync port refusal or async processor truth).

Used by