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; 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 human-readable id, shaped like RF-… — stable for the record’s life.
typeString String!The kind of record — always Refund here.
captionString String!The record’s display name — what people see it called.
statusString String!The record’s current state — one of created, succeeded or 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 id of your organization group — every record of yours carries the same one.
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 id of the record’s current edit — send it back with a change so an edit made in the meantime is refused instead of overwritten.
refCaptionsRefCaption [RefCaption!]!The captions of the records this one refers to, composed for you — one row per referenced id; see RefCaption.
organizationIdID ID!The selling Organization.
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.
amountMinorInt Int!The amount reversed in minor units.
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