Aug 10, 2026

Share

Category /

other

13 min read

GOAT Network

AI Agent Payment Audit Trails: What Each Record Canand CannotProve

A transaction hash proves value moved, not who approved the purchase or whether the service arrived. Build scoped evidence from mandate to delivery.

scroll

Table of contents

A transaction hash can show that a network recorded value moving between addresses. It cannot explain why an AI agent bought a service, who granted the agent authority, which policy approved the amount, whether the seller returned the requested result, or whether the buyer could use it.

That distinction is the foundation of AI agent payment audit trails. The goal is not to collect one “complete” log. It is to join several scoped records so an independent reviewer can reconstruct one commercial intent from authorization through payment and delivery.

The strongest design rule is also the simplest: never let one artifact claim more than its signed fields, source system, and verification method can support.

One Payment Produces Several Different Claims

An agent payment can generate at least eight claims. Each needs its own evidence.

Claim to verify

Strongest practical evidence

What that evidence does not prove

A principal authorized the purchase

Versioned grant or approval bound to the agent, purpose, limits, and time window

That the agent followed the grant

The policy engine allowed the action

Decision record with normalized inputs, policy hash, outcome, and reason codes

That the policy was correctly designed

The agent attempted the action

Authenticated runtime trace and tool-execution event

That the principal authorized it

A key signed a payment payload

Verified signature over the exact canonical payload, plus signer-key binding

That the key holder had rightful business authority

Payment was verified or settled

Protocol verification result, settlement response, and network evidence

That the service was delivered

The merchant executed the service

Merchant job record tied to the paid order and request digest

That the result reached the client

The result was delivered

Signed result commitment, response record, or client acknowledgement

That the result was correct or useful

A failure was remedied

Refund, replacement, credit, or dispute record linked to the original intent

That no further obligation remains

This matrix prevents a common audit failure: presenting many records while leaving the decisive claim unsupported. Five server logs do not prove authorization if none links to a principal's grant. A signed receipt does not prove output integrity if the signature does not cover the output. An onchain transfer does not prove receipt of a digital service.

Give the Transaction One Commerce Intent Before Anything Signs

Every system should join its evidence to one stable commerce_intent_id created before the agent requests a signature. That identifier represents the business event—not an HTTP attempt, blockchain transaction, or webhook delivery.

A useful correlation chain looks like this:

commerce_intent_id
  -> authorization_grant_id
  -> policy_decision_id
  -> agent_trace_id
  -> wallet_signing_request_id
  -> payment_id
  -> merchant_order_id
  -> transaction_reference
  -> delivery_id
  -> remedy_id
commerce_intent_id
  -> authorization_grant_id
  -> policy_decision_id
  -> agent_trace_id
  -> wallet_signing_request_id
  -> payment_id
  -> merchant_order_id
  -> transaction_reference
  -> delivery_id
  -> remedy_id
commerce_intent_id
  -> authorization_grant_id
  -> policy_decision_id
  -> agent_trace_id
  -> wallet_signing_request_id
  -> payment_id
  -> merchant_order_id
  -> transaction_reference
  -> delivery_id
  -> remedy_id

Keep provider-native IDs rather than replacing them. The audit index maps them to the commerce intent while each source retains its original record. It should also store canonical digests of the important objects, because an ID proves correlation only if the referenced content cannot be silently changed.

Idempotency belongs at this level. A timeout may create three HTTP retries, two webhook deliveries, and one settlement. They are one commercial intent. Conversely, two independent purchases should not share an idempotency key merely because they called the same route. Create the intent first, reuse it through retries, and require a new intent for a genuinely new purchase.

Authorization Evidence Must Exist Before Agent Execution

The principal may be a person, organization, treasury, application owner, or another authorized service. Its grant should state, at minimum:

  • principal and delegate identities;

  • permitted purpose, task, action, service, and recipient;

  • asset, network, per-payment limit, and cumulative budget;

  • valid-from and expiry times;

  • approval tier and approver evidence;

  • policy version or canonical policy hash;

  • nonce, revocation state, and delegation depth.

The record should be immutable after issuance or superseded by a new version. Editing the meaning of an existing grant destroys the ability to determine what was authorized at payment time.

The policy decision then records the normalized proposal it evaluated: recipient, amount, asset, network, resource, quote expiry, task, and final transaction digest. Store the decision, reason codes, policy version, reservation ID, and timestamp. If a human approves an exception, bind that approval to the same proposal rather than to a vague instruction such as “let the agent spend more.”

Do not use private chain-of-thought as the authorization record. It is unnecessary, potentially sensitive, and not a stable control artifact. Record the decision inputs, applicable rule identifiers, selected action, and outcome. Those fields explain why the system acted without collecting hidden reasoning or unrelated prompt content.

A Wallet Signature Proves Less Than Most Teams Assume

When correctly verified, a signature proves that the corresponding private key signed a specific payload. That is valuable but narrow.

It does not automatically prove that:

  • the key was controlled by the right organization at that time;

  • the signer was allowed to use company funds for this purpose;

  • the agent's grant was valid and unrevoked;

  • the displayed quote matched the signed payload;

  • the merchant delivered anything.

The signing record should therefore retain the payload digest, signature scheme, key identifier, wallet or account identifier, custody provider where relevant, nonce, expiry, network, and the grant and policy-decision IDs. It should also preserve evidence that the key was authorized at signing time.

Historical key binding matters. A current service identity document can show which key is authorized today, but a mutable document may no longer list a key after rotation. An auditor investigating an older receipt needs a retained key history, timestamped authorization record, or another durable binding that shows the key was legitimate when the artifact was issued.

Actor labels also need care. A relayer may submit a transaction, a paymaster may fund gas, and a smart account may execute an operation. None of those roles necessarily identifies the economic principal or the agent that requested the purchase. Store each role separately instead of assuming the network's transaction sender answers every identity question.

Preserve the Payment Scheme and Settlement State

x402 V2 creates useful protocol evidence at three different HTTP boundaries:

PAYMENT-REQUIRED   server -> client   payment options and terms
PAYMENT-SIGNATURE  client -> server   selected payment payload
PAYMENT-RESPONSE   server -> client   settlement attempt result
PAYMENT-REQUIRED   server -> client   payment options and terms
PAYMENT-SIGNATURE  client -> server   selected payment payload
PAYMENT-RESPONSE   server -> client   settlement attempt result
PAYMENT-REQUIRED   server -> client   payment options and terms
PAYMENT-SIGNATURE  client -> server   selected payment payload
PAYMENT-RESPONSE   server -> client   settlement attempt result

Save the raw artifacts under controlled retention, plus canonical decoded forms and digests used for verification. Record which payment option the client selected, the scheme, network, asset, amount, recipient, facilitator or verifier, verification result, settlement result, transaction reference, error code, and observed confirmation state.

The scheme is not decorative metadata. In an immediate exact-payment flow, verification and settlement may occur within the paid request. In a batch-settlement design, an authorization can be accepted before later redemption. A field named paid: true cannot express both cases safely. Use explicit states such as authorized, submitted, settled, failed, expired, or redeemed, and record the transition source.

Onchain evidence should include the network identifier and the confirmation or finality assumption used by the application. “Transaction found” is not the same as “accepted under the merchant's finality policy.” If a facilitator returns success, preserve that response, but independently reconcile the network state when the transaction value or dispute risk warrants it.

A Signed Receipt Proves Only Its Signed Fields

The x402 Signed Offers & Receipts extension makes the proof boundary concrete. A signed offer can commit a server to fields including resourceUrl, payment scheme, network, amount, payTo, and validUntil. A signed receipt issued after a successful paid response contains resourceUrl, payer, network, issuedAt, and optionally txHash.

Those artifacts can be verified with the documented EIP-712 or JWS formats, and the receipt can be checked against the accepted offer for resource, network, payer, and recency. The signing key should be distinct from the payment-receiving address so compromise of one role does not automatically compromise the other.

But inspect the payload before calling it proof of delivery. The default receipt fields do not include a response-body digest, result schema, HTTP body, quality score, or client acknowledgement. The signature proves that the authorized receipt key signed those fields. Under the extension's workflow, it is a server assertion associated with a paid 200 response; it is not cryptographic proof that a particular file arrived intact or that an inference was correct.

For stronger evidence, add a separate delivery commitment containing the original request digest, result digest, content type or schema version, completion status, merchant order ID, and expiry or retrieval location. Have the client acknowledge that commitment when the protocol and privacy model allow it.

Service Delivery Needs Its Own Evidence Contract

“Delivered” is not one state. A merchant should distinguish:

accepted for execution
-> execution started
-> result produced
-> result committed
-> response transmitted or artifact made available
-> client acknowledged receipt
-> result accepted, rejected, or disputed
accepted for execution
-> execution started
-> result produced
-> result committed
-> response transmitted or artifact made available
-> client acknowledged receipt
-> result accepted, rejected, or disputed
accepted for execution
-> execution started
-> result produced
-> result committed
-> response transmitted or artifact made available
-> client acknowledged receipt
-> result accepted, rejected, or disputed

For a synchronous API, the server can store the request digest, order ID, execution ID, response status, result digest, response size, and completion time. For an asynchronous report or MCP job, it may also need an artifact identifier, retrieval authorization, availability window, callback attempts, and acknowledgement.

A result digest proves integrity only when the client has the same result and can recompute it. It still does not prove semantic quality. A weather API can deliver exactly the bytes it generated and still return stale data. An image endpoint can return a valid file that fails the requested specification. Quality needs an acceptance rule: schema validation, freshness threshold, model-output contract, deterministic test, client approval, or a defined dispute path.

Minimize sensitive material. Store a digest or encrypted reference when retaining the full result would expose prompts, personal data, proprietary datasets, or credentials. The audit trail should preserve enough evidence to verify the claim without becoming a second high-risk copy of every transaction payload.

Build a Responsibility Map, Not a Blame Log

Different parties create different parts of the evidence chain.

Role

Evidence it should produce

Remaining boundary

Principal or owner

Grant, approval, revocation, policy ownership

Cannot prove agent execution

Agent runtime

Task, tool call, trace, policy result, retry outcome

Cannot grant itself authority

Wallet or custodian

Payload, key ID, signature result, custody controls

Cannot prove service delivery

Facilitator or relayer

Verification, submission, settlement response

May not know the business purpose

Merchant

Offer, order, execution, result commitment, remedy

Its records are first-party assertions unless independently verifiable

Settlement network

Transaction inclusion and state under network rules

Does not know whether digital service arrived

Client runtime

Receipt verification, result digest, acknowledgement, rejection

Acknowledgement does not prove result quality unless criteria are defined

This map makes an incident diagnosable. It does not assign legal blame automatically. Contracts, representations, custody arrangements, local law, and organizational governance determine obligations that a technical log cannot decide. The trail should expose who controlled each transition and where evidence stops.

Make the Trail Tamper-Evident Without Logging Secrets

An audit database becomes more defensible when changes are detectable. A practical design combines:

  • append-only events with monotonically increasing sequence numbers;

  • synchronized clocks plus source-observed and ingestion timestamps;

  • a hash of each canonical event and the previous event hash;

  • signed periodic checkpoints, optionally anchored outside the primary system;

  • versioned signer identities and retained key-authorization history;

  • write-once or object-lock retention where appropriate;

  • independent reconciliation against wallet, facilitator, merchant, and network records.

These controls make tampering more detectable; they do not make every record true. A false event can be immutably stored. Completeness, source authentication, field semantics, and cross-system verification still matter.

Protect the trail as sensitive infrastructure. Never log private keys, seed phrases, authentication tokens, full payment credentials, or unrestricted prompt content. Encrypt sensitive evidence, separate duties for writers and reviewers, restrict access by purpose, redact outputs, and define retention and deletion rules. Include a retention_class or evidence category so operational debug data is not kept as long as authorization and settlement records by accident.

Map GOAT Runtime and Merchant Records Into the Evidence Graph

GOAT Network's current agent and merchant tooling illustrates how useful evidence can come from multiple layers without becoming one automatic audit system.

GOAT AgentKit Runtime exposes structured execution results and lifecycle hooks. Current fields include traceId, action, attempt, timestamps, duration, output or error information, and policy-block reasons. Its runtime also documents policy checks, idempotency, bounded retries and timeouts, metrics, and structured logging. These events can establish what action entered the runtime, which attempt executed, how policy handled it, and whether the action succeeded or failed.

They do not establish principal authority unless the application links the traceId to a valid grant, policy snapshot, and signing request. Output redaction also deserves attention: documented sensitiveOutputFields can redact hook events, while the unredacted execution result may still exist in the application path. The audit design must control both.

GOAT Flow's merchant records cover another portion of the chain. Current documentation includes merchant order identifiers, payment method, token, amount, payer, status, chain and recipient details, transaction hash, expiry, proof retrieval, webhook handling, and reconciliation categories. These can correlate merchant order state with payment evidence, while the merchant still owns the service-execution and delivery records.

Field names are not proof types. In the current merchant guide, a historical signature field returned by getOrderProof() is described as an unsigned Keccak256 digest over selected payment fields such as order ID, transaction hash, log index, addresses, amount, and source chain. It does not cover order status or service delivery. Treat it as the documented digest it is, verify relevant network state independently, and avoid presenting it as a merchant signature over the whole order.

ERC-8004 identity and agent-wallet binding can add continuity to the identity side of this graph. They can help associate an agent record with a wallet, but they do not prove that the agent had authority for this purchase. Identity, authorization, and payment evidence remain separate.

Use a Common Event Envelope Across Every System

Each producer can keep its native record while emitting a normalized audit envelope. The following is illustrative, not an x402, GOAT, or ERC-8004 standard:

{
  "eventVersion": "1.0",
  "eventId": "evt_01J...",
  "eventType": "payment.settled",
  "commerceIntentId": "intent_7f21",
  "occurredAt": "2026-08-10T09:13:42.184Z",
  "observedAt": "2026-08-10T09:13:42.511Z",
  "issuer": {
    "system": "payment-facilitator",
    "instanceId": "fac_eu_2",
    "keyId": "key_2026_07"
  },
  "subjects": {
    "principalId": "org_acme",
    "agentId": "agent_research_3",
    "walletId": "wallet_42",
    "merchantId": "merchant_data_8"
  },
  "correlation": {
    "grantId": "grant_882",
    "policyDecisionId": "decision_913",
    "traceId": "trace_f19",
    "paymentId": "pay_61",
    "merchantOrderId": "order_107",
    "transactionReference": "0xabc..."
  },
  "evidence": {
    "canonicalPayloadHash": "sha256:...",
    "sourceRecordHash": "sha256:...",
    "verificationMethod": "network-and-facilitator",
    "proofScope": ["network", "asset", "amount", "recipient", "settlement_state"],
    "doesNotProve": ["principal_authorization", "service_delivery"]
  },
  "previousEventHash": "sha256:...",
  "retentionClass": "financial-audit"
}
{
  "eventVersion": "1.0",
  "eventId": "evt_01J...",
  "eventType": "payment.settled",
  "commerceIntentId": "intent_7f21",
  "occurredAt": "2026-08-10T09:13:42.184Z",
  "observedAt": "2026-08-10T09:13:42.511Z",
  "issuer": {
    "system": "payment-facilitator",
    "instanceId": "fac_eu_2",
    "keyId": "key_2026_07"
  },
  "subjects": {
    "principalId": "org_acme",
    "agentId": "agent_research_3",
    "walletId": "wallet_42",
    "merchantId": "merchant_data_8"
  },
  "correlation": {
    "grantId": "grant_882",
    "policyDecisionId": "decision_913",
    "traceId": "trace_f19",
    "paymentId": "pay_61",
    "merchantOrderId": "order_107",
    "transactionReference": "0xabc..."
  },
  "evidence": {
    "canonicalPayloadHash": "sha256:...",
    "sourceRecordHash": "sha256:...",
    "verificationMethod": "network-and-facilitator",
    "proofScope": ["network", "asset", "amount", "recipient", "settlement_state"],
    "doesNotProve": ["principal_authorization", "service_delivery"]
  },
  "previousEventHash": "sha256:...",
  "retentionClass": "financial-audit"
}
{
  "eventVersion": "1.0",
  "eventId": "evt_01J...",
  "eventType": "payment.settled",
  "commerceIntentId": "intent_7f21",
  "occurredAt": "2026-08-10T09:13:42.184Z",
  "observedAt": "2026-08-10T09:13:42.511Z",
  "issuer": {
    "system": "payment-facilitator",
    "instanceId": "fac_eu_2",
    "keyId": "key_2026_07"
  },
  "subjects": {
    "principalId": "org_acme",
    "agentId": "agent_research_3",
    "walletId": "wallet_42",
    "merchantId": "merchant_data_8"
  },
  "correlation": {
    "grantId": "grant_882",
    "policyDecisionId": "decision_913",
    "traceId": "trace_f19",
    "paymentId": "pay_61",
    "merchantOrderId": "order_107",
    "transactionReference": "0xabc..."
  },
  "evidence": {
    "canonicalPayloadHash": "sha256:...",
    "sourceRecordHash": "sha256:...",
    "verificationMethod": "network-and-facilitator",
    "proofScope": ["network", "asset", "amount", "recipient", "settlement_state"],
    "doesNotProve": ["principal_authorization", "service_delivery"]
  },
  "previousEventHash": "sha256:...",
  "retentionClass": "financial-audit"
}

proofScope and doesNotProve are operational guardrails. They stop downstream dashboards, support teams, and automated agents from turning “settled” into “authorized and delivered.” Schema versions, canonicalization rules, and issuer-key history must also be retained; otherwise old hashes and signatures may become impossible to reproduce.

Reconstruct a Disputed Payment in One Pass

Consider a hypothetical agent that pays $0.05 for a research API response. The network shows settlement, but the agent reports that no result arrived.

An auditor should replay the evidence in order:

  1. Intent: confirm that one commerce_intent_id existed before signing and that retries reused it.

  2. Authority: verify the grant's issuer, agent, purpose, service, amount limit, validity window, policy version, and revocation state.

  3. Decision: verify that the normalized proposal matched the grant and that any required approval covered the final payload.

  4. Signature: verify the payment signature, nonce, expiry, key binding, and payload digest.

  5. Terms: compare the accepted offer with the amount, network, recipient, resource, and validity window.

  6. Settlement: verify the facilitator response and relevant network record under the merchant's confirmation policy.

  7. Execution: locate the merchant job linked to the order and confirm whether it started and produced a result.

  8. Delivery: compare the result digest and delivery record with any client acknowledgement or retrieval log.

  9. Remedy: if delivery cannot be demonstrated, verify whether refund, replacement, or credit policy was applied.

Suppose steps one through seven verify, the merchant has a result digest, but there is no response-delivery record or client acknowledgement. The defensible conclusion is not “the merchant delivered because it generated the result,” nor “the client received nothing because it complained.” The evidence supports authorization, payment, and result production; receipt by the client remains unproven.

That narrow conclusion is useful. It identifies the missing control—a verifiable delivery transition—and directs the remedy workflow without inventing certainty.

Verification Drills Matter More Than Retention Volume

An audit trail that nobody can replay is only expensive storage. Run periodic reconstruction drills on sampled transactions and failure cases.

Check whether reviewers can:

  • start from a commerce intent and locate every required native record;

  • verify canonical hashes and signatures with historical keys;

  • distinguish source time, ingestion time, and network time;

  • detect missing sequence numbers, duplicated webhooks, and reused nonces;

  • reconcile merchant, wallet, facilitator, and network amounts;

  • recompute result commitments without exposing unnecessary content;

  • trace a refund or replacement back to the original failure;

  • explain each artifact's proof scope in plain language.

Failures in the drill should change the event contract, not merely the dashboard. The test passes only when an independent reviewer can reach the same bounded conclusion from retained evidence.

FAQ

What should an AI agent payment audit trail contain?

It should contain a principal authorization grant, policy decision, agent execution trace, exact signing payload and key evidence, payment verification and settlement records, merchant order and service-execution records, delivery evidence, and any refund or remedy. All records should link to one commerce intent and preserve their own proof scope.

Is a blockchain transaction hash enough to prove an agent payment was authorized?

No. A transaction hash can identify network-recorded transaction facts, but it does not prove why the payment was made, which principal approved it, whether a policy allowed it, or whether a service was delivered. Authorization requires a separate grant and decision record tied to the transaction payload.

What does an AI agent wallet signature prove?

A valid signature proves that the corresponding key signed the verified payload. To attribute it safely, the trail also needs the key's authorized identity at signing time, the custody context, and the grant that permitted the action. The signature alone does not prove rightful business authority.

Does an x402 signed receipt prove that a service was delivered correctly?

Not by default. The documented receipt signs fields such as resource URL, payer, network, issuance time, and optionally transaction hash. It does not normally include the result body or a quality judgment. A separate result commitment and, where appropriate, client acknowledgement are needed for stronger delivery evidence.

Should developers store an agent's prompts or chain-of-thought in the audit trail?

Not as a default requirement. Store normalized decision inputs, policy and model versions where relevant, action selected, reason codes, outputs or output digests, and errors. Raw prompts may contain sensitive data, and private chain-of-thought is neither necessary nor reliable as an authorization record.

Can an audit trail determine who is legally responsible for a failed agent payment?

It can show which system or actor controlled each technical transition and where evidence is missing. It cannot determine legal liability by itself. Responsibility also depends on contracts, custody arrangements, representations, organizational policy, jurisdiction, and the specific facts of the dispute.

Evidence Is Trustworthy Only When Its Scope Is Explicit

The production test for an AI agent payment audit trail is not whether the database contains many events. It is whether a reviewer can reconstruct one intent and answer five questions separately: who authorized, what the agent executed, which payload was signed, how value settled, and what service was delivered or remedied.

Build the trail before the first signature. Give every event a stable correlation key, authenticated issuer, canonical digest, historical key context, and explicit proof boundary. When an artifact cannot support the next claim, record that gap instead of stretching the evidence.

[01]

AI Knowledge base

More Articles

More Articles

More Articles