AlmondTill/G3N API

TokenPurchase

object type

A TokenPurchase — buying platform tokens with real money (**Stripe primary**; ACH/wire/invoiced = deferral 7): $ → tokens at the volume tier (tier_1 | tier_2 | tier_3 — SERVER-computed, never client-asserted), loaded into the GROUP's TokenAccount as a purchase TokenEntry when the webhook settles. **AT/stack charging the MERCHANT** — the platform account's OWN PaymentIntent (distinct from the merchant's customer Payments and the Connect plane). **NON-REFUNDABLE**. The FSM is the ratified 3-STATE table VERBATIM: created(i) → succeeded ▣ / failed ✦, BOTH edges system:stripe_webhook — NO caller transitions and NOTHING mutable between birth and settlement ⇒ the wire realizes {create:true, update:false, transitions:false} (a NEW suppression combination — the webhook-settled document). The birth op mints the TEST PaymentIntent api-side with the LOAD-BEARING metadata {at_kind, tokenPurchaseId, rootId} (ruling — the lesson: PI metadata IS the join key; the EXISTING platform 8-event endpoint roster covers the lane — payment_intent.succeeded/payment_failed/canceled; canceled settles failed). The real-money gate = classification × Stripe MODE (ruling: live-mode charges require a production-classified group; test-mode is legal for ANY classification — that is how the goldens run; the mode derives from the custodied key, never asserted). Purchase-abandon reconciliation beyond canceled = deferral 14a. NOT searchable. Template class A16_BILLING (hand-derived v23).

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 (TP-…).
typeString String!The kind of record — always TokenPurchase here.
captionString String!The record’s display name — what people see it called.
statusString String!The FSM state: created | succeeded | failed.
parentIdID ID!The parent TokenAccount; 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.
usdAmountCentsInt Int!The charge magnitude, USD cents (platform billing is USD). 500..10000000.
tokensPurchasedInt Int!The SERVER-computed token load at the volume tier.
volumeTierCodeString String!tier_1 | tier_2 | tier_3 — the tier that priced it (replayability with rateCardVersion).
rateCardVersionInt Int!The rate-card/tier config version in force at birth.
stripePaymentIntentIdString String!The platform Stripe PaymentIntent (pi_… — SERVER-stamped at birth; the webhook join key, ruling).
settledAtStringWhen the webhook settled it (stamped at succeeded/failed; absent while created).

Used by