Skip to content

Intent Types

All type-only exports from intent/types.ts. These are the shape of a Payment Intent and its parts.

PaymentIntent

The core object. Key fields:

ts
schemaVersion: "1"
id: string                  // pi_…
reason: PaymentReason
origin: TaskOrigin
counterparty: Counterparty
amount: AmountSpec          // { kind: "fixed" | "limit", value: Money }
approval: ApprovalRequirement
policy: PolicyConstraints
audit: AuditTrail
status?: PaymentIntentStatus
metadata?: Record<string, unknown>

Supporting types

TypeShape (summary)
Money{ amount: string; currency: string } — amount is a decimal string
AmountSpec{ kind: "fixed" | "limit"; value: Money }
PaymentReason{ category: string; description: string }
Counterparty{ kind: CounterpartyKind; name: string; identifiers?: … }
CounterpartyKind"api" | "merchant" | …
ApprovalRequirement{ mode: ApprovalMode; … }
ApprovalMode"policy" | "auto" | "human"
PaymentIntentStatuspending | authorized | executing | settled | failed | revoked
PaymentIntentMode"live" | "dry-run" | "mock"
PaymentIntentDraftflat input to buildFromDraft / Xpense.emit
PolicyConstraints{ allowedCurrencies?: string[]; … }
GovernanceConstraints{ budgetId?; approver?; requiresApprovalAbove? }
MandateRefs{ intentHash?; cartHash?; paymentHash? }
AllowanceScopeACP-style scope on the intent
IntentDeclaration{ text; humanPresent }
AuditTrail / AuditEntrytamper-evident event log
TaskOrigin{ agentId?; goal?; … }
SettlementScheme"exact" | "voucher" | "stream"
SubmitResult{ id; status; raw? }
PaymentReasonsee above

Outline only — exact field lists live in src/intent/types.ts.

Proprietary software. All rights reserved.