<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.43 (Ruby 4.0.5) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-mih-agent-settlement-records-00" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.34.1 -->
  <front>
    <title abbrev="Agent Settlement Records">Two-Party Settlement Records for Agent Payments</title>
    <seriesInfo name="Internet-Draft" value="draft-mih-agent-settlement-records-00"/>
    <author initials="S." surname="Mih" fullname="Steven Mih">
      <organization>Action State Group, Inc.</organization>
      <address>
        <email>spec@actionstate.ai</email>
      </address>
    </author>
    <date year="2026" month="October" day="01"/>
    <area>Security</area>
    <keyword>agent</keyword>
    <keyword>payment</keyword>
    <keyword>settlement</keyword>
    <keyword>SCITT</keyword>
    <keyword>transparency</keyword>
    <keyword>evidence</keyword>
    <abstract>
      <?line 168?>

<t>A payment between two agents is observed by two systems: the payer's wallet
or bank and the payee's. Existing payment protocols record one of those
observations, signed by one party, and most record nothing about what was
delivered in exchange. This document defines two-party settlement records,
carried as Agent Action Capsules, in which payer and payee each seal, under
their own key, only what their own system observed. A settlement is a set of up to
four leg records (terms, payer-observed, payee-observed, and delivered) that
cite each other by digest and join on a typed payment reference. The state
of a settlement (one-sided, agreed, or mismatched) is derived by the
verifier from which legs are present and whether they agree; no record
asserts it. Signed objects from existing payment protocols are carried by
digest and never re-signed. Amounts are exact integers with a decimal
scale. The document defines a registry of payment reference types covering
x402, Lightning, AP2, ACP, UCP, the Payment HTTP authentication scheme,
ISO 20022, and Open Payments, and maps its states to ISO 20022 status codes.</t>
    </abstract>
    <note>
      <name>Note to Readers</name>
      <?line 186?>

<t>This document is an individual submission. It is a companion to the Agent
Action Capsule profile <xref target="I-D.mih-scitt-agent-action-capsule"/> and to the
bilateral attestation exchange <xref target="I-D.mih-agent-bilateral-attestation"/>.
Conformance vectors are maintained in the <tt>vectors/settlement/</tt> directory of
this document's source repository.</t>
    </note>
  </front>
  <middle>
    <?line 194?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>When an agent pays another agent for an inference, a data set, or a
physical good, at least two systems see the payment. The payer's wallet
sees a transfer leave. The payee's wallet, processor, or bank sees a
transfer arrive. Each system can produce a record. The payment protocols in
use today choose one of them:</t>
      <ul spacing="normal">
        <li>
          <t>The x402 settlement response <xref target="X402"/> is returned to the payer and is not
signed; its trust comes from the chain it names. The x402 signed offer and
receipt extension <xref target="X402-OFFER-RECEIPT"/> adds a receipt signed by the payee
only.</t>
        </li>
        <li>
          <t>AP2 <xref target="AP2"/> binds user and agent mandates, and returns a Payment Receipt
signed by the payment processor and a Checkout Receipt signed by the
merchant. Each receipt is one party's statement.</t>
        </li>
        <li>
          <t>The Payment HTTP authentication scheme <xref target="I-D.ryan-httpauth-payment"/>
returns a <tt>Payment-Receipt</tt> header that is not signed.</t>
        </li>
        <li>
          <t>BOLT 12 payer proofs <xref target="BOLT12"/> combine a payee-signed invoice with a
payer signature. They are two-party for the payment, and specific to
Lightning.</t>
        </li>
        <li>
          <t>ISO 20022 status reports <xref target="ISO20022"/> are produced by each agent in the
chain about its own side, under bank keys.</t>
        </li>
      </ul>
      <t>None of these records what the delivered content was, and none lets a third
party check, offline, that the two sides' observations of one payment
agree. When they disagree, or when one side says nothing, the evidence is
one party's log against the other's.</t>
      <t>This document defines settlement records in which:</t>
      <ol spacing="normal" type="1"><li>
          <t>The payer and the payee are independent sealers. Each seals, under its
own key, only what its own wallet or system observed. Neither attests to
the other's side (<xref target="sealers"/>).</t>
        </li>
        <li>
          <t>A settlement is up to four leg records: terms, payer-observed,
payee-observed, and delivered. Each leg cites the terms leg by digest,
and a leg may cite the counterparty's leg it holds (<xref target="legs"/>).</t>
        </li>
        <li>
          <t>Legs join on a typed payment reference drawn from an open registry
(<xref target="payment-ref"/>).</t>
        </li>
        <li>
          <t>Signed objects from existing protocols are carried by digest, and
optionally as their exact bytes. They are never re-signed or re-encoded
(<xref target="wrap"/>).</t>
        </li>
        <li>
          <t>Amounts are exact: an integer value and a decimal scale, never a
floating-point number (<xref target="amounts"/>).</t>
        </li>
        <li>
          <t>The delivered leg binds a digest of the delivered content to the terms
(<xref target="delivered-leg"/>).</t>
        </li>
        <li>
          <t>The state of a settlement is derived from the legs present, never
asserted by a leg (<xref target="states"/>). One side's leg alone is a stated claim,
not an agreement.</t>
        </li>
      </ol>
      <t>Each leg is an Agent Action Capsule <xref target="I-D.mih-scitt-agent-action-capsule"/>
with one additional member. These records therefore inherit the Capsule's
content identity, its Producer Envelope signature, its cross-record
references, and its registration path to a SCITT Transparency Service
<xref target="RFC9943"/>.</t>
      <section anchor="nongoals">
        <name>What This Document Does Not Do</name>
        <t>This document does not move money, define a payment protocol, replace any
protocol it binds to, or decide between the parties. It defines no trust policy for
deciding which key may seal for a payer or payee; that is the verifier's
policy, as in <xref target="I-D.mih-scitt-agent-action-capsule"/>. It does not rank,
rate, or otherwise grade the parties to a settlement. It records what each
side observed, and it defines how a verifier derives whether the
observations agree.</t>
      </section>
    </section>
    <section anchor="conventions">
      <name>Conventions and Definitions</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
      <?line -18?>

<dl>
        <dt>Payer:</dt>
        <dd>
          <t>The party whose funds leave its control in the payment.</t>
        </dd>
        <dt>Payee:</dt>
        <dd>
          <t>The party to whom the funds are directed.</t>
        </dd>
        <dt>Sealer:</dt>
        <dd>
          <t>The party that produces a leg record and signs it with a Producer
Envelope. In this document a sealer is always the payer or the payee.</t>
        </dd>
        <dt>Leg:</dt>
        <dd>
          <t>One of the four records of a settlement: terms, payer-observed,
payee-observed, or delivered.</t>
        </dd>
        <dt>Leg record:</dt>
        <dd>
          <t>An Agent Action Capsule carrying a <tt>settlement</tt> member (<xref target="leg-record"/>).</t>
        </dd>
        <dt>Observation:</dt>
        <dd>
          <t>What a sealer's own wallet, account, processor, or delivery system
reported to that sealer. An observation is about the sealer's own side
only.</t>
        </dd>
        <dt>Payment reference:</dt>
        <dd>
          <t>A typed identifier that both sides' systems report for the same payment,
such as a transaction hash or an end-to-end identifier (<xref target="payment-ref"/>).</t>
        </dd>
        <dt>Wrapped object:</dt>
        <dd>
          <t>A signed or otherwise authoritative object defined by another protocol
(for example an x402 signed offer or an AP2 Payment Receipt), carried in a
leg by digest (<xref target="wrap"/>).</t>
        </dd>
        <dt>Stated claim:</dt>
        <dd>
          <t>A leg that no leg from the other side corroborates. It records what one
side says it observed. It is not an agreement.</t>
        </dd>
        <dt>Verifier:</dt>
        <dd>
          <t>Any party that checks a set of leg records and derives the settlement
state (<xref target="states"/>).</t>
        </dd>
      </dl>
      <t>Digests in this document are SHA-256, written as 64 lowercase hexadecimal
characters. A "JSON digest" is the Capsule profile's JSON digest: SHA-256
over the RFC 8785 <xref target="RFC8785"/> canonical form (<xref target="I-D.mih-scitt-agent-action-capsule"/>,
Conventions and Definitions).</t>
    </section>
    <section anchor="sealers">
      <name>Two Independent Sealers</name>
      <t>The payer and the payee each produce their own leg records and sign them
with their own key. The rules in this section are what make a settlement
two-party rather than one party's account of both sides.</t>
      <ol spacing="normal" type="1"><li>
          <t><strong>Own side only.</strong> A sealer <bcp14>MUST</bcp14> record in a leg only what its own system
observed. The payer-observed leg records what the payer's wallet or
account reported about the outgoing payment. The payee-observed leg
records what the payee's wallet, processor, or account reported about
the incoming payment. A sealer <bcp14>MUST NOT</bcp14> record the counterparty's
observation as its own, even when it holds the counterparty's evidence.
It <bcp14>MAY</bcp14> cite the counterparty's leg (<xref target="citations"/>) or wrap a
counterparty-issued object (<xref target="wrap"/>); both are carried as what they
are, never as the citing sealer's observation.</t>
        </li>
        <li>
          <t><strong>Own key.</strong> Each leg is signed by a Producer Envelope, a COSE_Sign1
<xref target="RFC9052"/> object over the leg's Capsule ID
(<xref target="I-D.mih-scitt-agent-action-capsule"/>, Producer Envelope wire profile),
whose <tt>kid</tt> is the sealer's key. The payer-observed leg <bcp14>MUST</bcp14> be sealed
under a key the verifier's policy accepts for the payer, and the
payee-observed leg under a key it accepts for the payee.</t>
        </li>
        <li>
          <t><strong>Distinct keys.</strong> Within one settlement, a payer-observed leg and a
payee-observed leg sealed under the same key are not two sides. A
verifier <bcp14>MUST</bcp14> report <tt>sealer_conflation</tt> for such a pair and <bcp14>MUST NOT</bcp14>
derive <tt>agreed</tt> from it (<xref target="states"/>). This check needs no key policy: it
compares the two envelopes' <tt>kid</tt> values.</t>
        </li>
        <li>
          <t><strong>Role consistency.</strong> A leg's <tt>sealer_role</tt> <bcp14>MUST</bcp14> match the leg: <tt>payer</tt>
for a payer-observed leg and <tt>payee</tt> for a payee-observed leg. The terms
leg and the delivered leg may be sealed by either party
(<xref target="terms-leg"/>, <xref target="delivered-leg"/>).</t>
        </li>
      </ol>
      <t>What a signature proves is unchanged from the base profile: the holder of
the key signed the Capsule ID. Whether that key belongs to the payer or the
payee is the verifier's policy (certificates, DIDs, DNS-published keys, or
the signer-authorization methods of the protocol being bound). A verifier
<bcp14>MUST</bcp14> return each leg's authenticated key so that its caller can apply that
policy.</t>
    </section>
    <section anchor="leg-record">
      <name>The Leg Record</name>
      <section anchor="carriage">
        <name>Carriage in a Capsule</name>
        <t>A leg record is an Agent Action Capsule of format 4
<xref target="I-D.mih-scitt-agent-action-capsule"/> with a top-level <tt>settlement</tt> member.
Everything the base profile requires of a Capsule applies: the
<tt>capsule_id</tt> is the SHA-256 of the RFC 8785 form of the Capsule without
<tt>capsule_id</tt>, floating-point numbers are forbidden in digest-bearing
material, and the <tt>settlement</tt> member participates in the digest. A leg
record's identity is its <tt>capsule_id</tt>.</t>
        <t>A leg record <bcp14>SHOULD</bcp14> use <tt>action_type: "fyi"</tt> and an <tt>assurance</tt> block whose
<tt>effect_mode</tt> is <tt>not_applicable</tt>: the leg records an observation, and the
payment itself is not an effect the sealer's gate committed. A deployment
in which the sealer's own gate dispatched the payment <bcp14>MAY</bcp14> instead record it
as the effect of a separate Capsule with <tt>effect.type: "send_payment"</tt> and
cite that Capsule from the payer-observed leg; this document does not
require it.</t>
        <t>A verifier unaware of this document processes a leg record as an ordinary
Capsule. Every check of the base profile still applies to it.</t>
      </section>
      <section anchor="settlement-member">
        <name>The settlement Member</name>
        <t>The <tt>settlement</tt> member is a JSON object:</t>
        <table>
          <thead>
            <tr>
              <th align="left">Member</th>
              <th align="left">Type</th>
              <th align="left">Required in</th>
              <th align="left">Meaning</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">
                <tt>version</tt></td>
              <td align="left">string</td>
              <td align="left">all legs</td>
              <td align="left">
                <bcp14>MUST</bcp14> be <tt>"0"</tt> for this document.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>leg</tt></td>
              <td align="left">string</td>
              <td align="left">all legs</td>
              <td align="left">
                <tt>terms</tt>, <tt>payer_observed</tt>, <tt>payee_observed</tt>, or <tt>delivered</tt>. A closed set; any other value is a structural failure.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>sealer_role</tt></td>
              <td align="left">string</td>
              <td align="left">all legs</td>
              <td align="left">
                <tt>payer</tt> or <tt>payee</tt> (<xref target="sealers"/>).</td>
            </tr>
            <tr>
              <td align="left">
                <tt>terms_ref</tt></td>
              <td align="left">string</td>
              <td align="left">all legs except terms</td>
              <td align="left">The <tt>capsule_id</tt> of the terms leg this leg answers.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>amount</tt></td>
              <td align="left">object</td>
              <td align="left">terms, payer_observed</td>
              <td align="left">The amount (<xref target="amounts"/>). In the terms leg, the price. In the payer-observed leg, the amount the payer's system reports it sent toward the payee, excluding any routing fee (<xref target="fees"/>).</td>
            </tr>
            <tr>
              <td align="left">
                <tt>routing_fee</tt></td>
              <td align="left">object</td>
              <td align="left">
                <bcp14>OPTIONAL</bcp14>, payer_observed</td>
              <td align="left">The fee the payer's system reports it paid to intermediaries on top of <tt>amount</tt> (<xref target="fees"/>).</td>
            </tr>
            <tr>
              <td align="left">
                <tt>received</tt></td>
              <td align="left">object</td>
              <td align="left">payee_observed</td>
              <td align="left">The amount the payee's system reports credited to the payee, after any receive fee (<xref target="fees"/>).</td>
            </tr>
            <tr>
              <td align="left">
                <tt>receive_fee</tt></td>
              <td align="left">object</td>
              <td align="left">
                <bcp14>OPTIONAL</bcp14>, payee_observed</td>
              <td align="left">The fee the payee's system reports deducted on the receiving side between the amount sent and <tt>received</tt> (<xref target="fees"/>).</td>
            </tr>
            <tr>
              <td align="left">
                <tt>payment_ref</tt></td>
              <td align="left">object</td>
              <td align="left">payer_observed, payee_observed</td>
              <td align="left">The payment reference (<xref target="payment-ref"/>). <bcp14>OPTIONAL</bcp14> in the terms leg when the reference is fixed before payment (for example a Lightning payment hash).</td>
            </tr>
            <tr>
              <td align="left">
                <tt>status</tt></td>
              <td align="left">string</td>
              <td align="left">payer_observed, payee_observed</td>
              <td align="left">
                <tt>pending</tt>, <tt>settled</tt>, <tt>failed</tt>, or <tt>reversed</tt>, as the sealer's own system reported it (<xref target="status"/>).</td>
            </tr>
            <tr>
              <td align="left">
                <tt>observed_at</tt></td>
              <td align="left">string</td>
              <td align="left">payer_observed, payee_observed, delivered</td>
              <td align="left">
                <xref target="RFC3339"/> UTC time at which the sealer's system reported the observation.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>deliverable</tt></td>
              <td align="left">object</td>
              <td align="left">
                <bcp14>OPTIONAL</bcp14>, terms</td>
              <td align="left">What is to be delivered (<xref target="terms-leg"/>).</td>
            </tr>
            <tr>
              <td align="left">
                <tt>valid_until</tt></td>
              <td align="left">string</td>
              <td align="left">
                <bcp14>OPTIONAL</bcp14>, terms</td>
              <td align="left">
                <xref target="RFC3339"/> UTC time after which the terms no longer apply.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>delivery</tt></td>
              <td align="left">object</td>
              <td align="left">delivered</td>
              <td align="left">What was delivered (<xref target="delivered-leg"/>).</td>
            </tr>
            <tr>
              <td align="left">
                <tt>wrapped</tt></td>
              <td align="left">array</td>
              <td align="left">
                <bcp14>OPTIONAL</bcp14>, all legs</td>
              <td align="left">Wrapped objects (<xref target="wrap"/>).</td>
            </tr>
          </tbody>
        </table>
        <t>A member not listed for a leg <bcp14>MUST NOT</bcp14> be present in that leg. A verifier
reports a missing required member or a present forbidden member as
<tt>settlement_malformed</tt>.</t>
        <t>No member of <tt>settlement</tt> states the settlement's state. The state is
derived (<xref target="states"/>); a member that asserted it would let one sealer state
a fact that only the combination of both sides' records can establish.</t>
      </section>
      <section anchor="citations">
        <name>Citations Between Legs</name>
        <t>Legs cite each other in two ways.</t>
        <t><strong>The terms reference.</strong> Every leg other than the terms leg carries
<tt>terms_ref</tt>, the <tt>capsule_id</tt> of the terms leg it answers. A leg answers
exactly one terms leg. <tt>terms_ref</tt> is a bare digest, in the
same way the base profile's <tt>cross_party.initiator_ref</tt> is: it names the
terms leg's <tt>capsule_id</tt>, and a verifier compares it with the recomputed
<tt>capsule_id</tt> of the terms leg it holds.</t>
        <t><strong>Counterparty legs.</strong> A sealer that holds a leg sealed by the other party
<bcp14>MAY</bcp14> cite it from its own leg with a <tt>references</tt> entry
(<xref target="I-D.mih-scitt-agent-action-capsule"/>, Cross-record references) of type
<tt>agent-action-capsule</tt>, <tt>digest_alg</tt> <tt>SHA-256</tt>, the cited leg's
<tt>capsule_id</tt> as <tt>digest</tt>, and <tt>citation_purpose: "counterparty_half"</tt>. As
the base profile defines that purpose, the citation records custody of the
counterparty's leg, not an observation of it.</t>
        <t>A sealer's own legs form its own stream, and a sealer <bcp14>MAY</bcp14> link them with
<tt>chain</tt> (for example, a payee's delivered leg following its payee-observed
leg with relation <tt>follows</tt>). The join of a settlement never depends on
<tt>chain</tt>; it depends on <tt>terms_ref</tt> and <tt>payment_ref</tt> only.</t>
        <t>The usual order of a settlement is shown below. Only the terms leg must
exist before the others; any subset of the other legs can be present.</t>
        <artwork><![CDATA[
   payee (or payer)              payer                 payee
  +----------------+     +------------------+    +------------------+
  |  terms leg     |<----| payer_observed   |    | payee_observed   |
  |  amount, wraps |     | payment_ref,     |    | payment_ref,     |
  |  offer/mandate |<-+  | amount,          |<...| received,        |
  |                |  |  | routing_fee,     |    | receive_fee,     |
  |                |  |  | status           |    | status           |
  +----------------+  |  +------------------+    +------------------+
          ^           |                                   |
          |           +-----------------------------------+
          |                terms_ref (every leg)
  +-----------------------------+
  |  delivered leg (either side)|
  |  content_digest, direction  |
  +-----------------------------+

   <---- terms_ref        <.... references[] counterparty_half
]]></artwork>
      </section>
    </section>
    <section anchor="legs">
      <name>The Legs</name>
      <section anchor="terms-leg">
        <name>Terms</name>
        <t>The terms leg fixes what the payment is for and how much it is. It is
sealed by the party that set the terms. That is usually the payee, whose
offer or invoice states the price; in a mandate-based flow it is usually
the payer, whose mandate states what it authorized. The other party
accepts the terms by citing them: its observed leg carries the same
<tt>terms_ref</tt>. A terms leg that no counterparty leg cites is one party's
statement of the terms, not an agreement on them.</t>
        <t>The terms leg carries:</t>
        <ul spacing="normal">
          <li>
            <t><tt>amount</tt>: the agreed amount (<xref target="amounts"/>).</t>
          </li>
          <li>
            <t><tt>wrapped</tt> (<bcp14>OPTIONAL</bcp14>): the protocol object that stated the terms. Examples
are the x402 signed offer <xref target="X402-OFFER-RECEIPT"/>, the AP2 Checkout or
Payment Mandate <xref target="AP2"/>, and a BOLT 12 invoice <xref target="BOLT12"/>.</t>
          </li>
          <li>
            <t><tt>deliverable</tt> (<bcp14>OPTIONAL</bcp14>): an object with at least one of these members:
            </t>
            <ul spacing="normal">
              <li>
                <t><tt>content_digest</tt>: the digest of the content to be delivered, when it
is known in advance (for example a data set with a published digest).</t>
              </li>
              <li>
                <t><tt>description_digest</tt>: the JSON digest of a description of what is to
be delivered, when the content is not known in advance (for example an
inference whose output does not yet exist).</t>
              </li>
            </ul>
          </li>
          <li>
            <t><tt>payment_ref</tt> (<bcp14>OPTIONAL</bcp14>): the payment reference, when it is fixed before
payment.</t>
          </li>
          <li>
            <t><tt>valid_until</tt> (<bcp14>OPTIONAL</bcp14>).</t>
          </li>
        </ul>
        <t>Refunds and partial payments are out of scope for this revision. A refund
can be recorded as a separate settlement, with its own terms leg and the
roles reversed; this document defines no citation between it and the
original terms leg (<xref target="open-issues"/>).</t>
        <t>When the terms come from a protocol object, the terms leg's <tt>amount</tt> <bcp14>MUST</bcp14>
equal the amount that object states (<xref target="amounts"/>). The x402 offer's
<tt>amount</tt> is already an integer string in the asset's atomic units, so it
becomes <tt>value</tt> directly, with <tt>assetScale</tt> set to the asset's number of
decimals.</t>
      </section>
      <section anchor="payer-leg">
        <name>Payer-Observed</name>
        <t>The payer-observed leg records what the payer's own system reported about
the payment it made: the payment reference, the amount it sent toward the
payee (<tt>amount</tt>), the routing fee it paid on top of that (<tt>routing_fee</tt>),
and the status the payer's system reported. It is sealed by the payer.</t>
        <t>It <bcp14>SHOULD</bcp14> wrap the object the payer's system returned, where one exists:
the x402 <tt>PaymentPayload</tt> the payer sent and the settlement response it
received <xref target="X402"/>, the BOLT 12 payer proof <xref target="BOLT12"/>, or the ISO 20022
status report the payer's bank returned <xref target="ISO20022"/>. A payer that received
a payee-issued receipt (for example an AP2 Payment Receipt or an x402 signed
receipt) <bcp14>MAY</bcp14> wrap it here; it is then carried as the issuer's object, not as
the payer's observation (<xref target="wrap"/>).</t>
      </section>
      <section anchor="payee-leg">
        <name>Payee-Observed</name>
        <t>The payee-observed leg records what the payee's own system reported about
the payment it received: the payment reference, the amount credited to it
(<tt>received</tt>), the fee deducted on the receiving side (<tt>receive_fee</tt>), and
the status the payee's system reported. It is sealed by the payee.</t>
        <t>It <bcp14>SHOULD</bcp14> wrap the object the payee's system produced or received: the x402
settlement response from its facilitator, the x402 signed receipt it issued
<xref target="X402-OFFER-RECEIPT"/>, the AP2 Payment Receipt or Checkout Receipt <xref target="AP2"/>,
the <tt>Payment-Receipt</tt> it returned <xref target="I-D.ryan-httpauth-payment"/>, or the
ISO 20022 credit notification its bank sent. Where a signed payee receipt
already exists, the payee-observed leg wraps it; it does not restate and
re-sign the same claim.</t>
        <t>A payee that holds the payer-observed leg <bcp14>MAY</bcp14> cite it (<xref target="citations"/>).</t>
      </section>
      <section anchor="delivered-leg">
        <name>Delivered</name>
        <t>The delivered leg records what was delivered under the terms. Either party
may seal one, and both may: the payee records what it sent, and the payer
records what it received. Each records only its own side.</t>
        <t>The <tt>delivery</tt> member is an object:</t>
        <table>
          <thead>
            <tr>
              <th align="left">Member</th>
              <th align="left">Type</th>
              <th align="left">Req</th>
              <th align="left">Meaning</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">
                <tt>direction</tt></td>
              <td align="left">string</td>
              <td align="left">
                <bcp14>REQUIRED</bcp14></td>
              <td align="left">
                <tt>sent</tt> (sealed by the payee) or <tt>received</tt> (sealed by the payer). Any other combination of <tt>direction</tt> and <tt>sealer_role</tt> is <tt>settlement_malformed</tt>.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>content_digest</tt></td>
              <td align="left">string</td>
              <td align="left">
                <bcp14>REQUIRED</bcp14> unless <tt>carrier</tt> is present</td>
              <td align="left">The digest of the delivered content: SHA-256 over the exact octets sent or received, or the JSON digest when the content is a JSON value.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>carrier</tt></td>
              <td align="left">string</td>
              <td align="left">
                <bcp14>OPTIONAL</bcp14></td>
              <td align="left">For physical goods: the carrier (<xref target="aep"/>).</td>
            </tr>
            <tr>
              <td align="left">
                <tt>tracking_digest</tt></td>
              <td align="left">string</td>
              <td align="left">
                <bcp14>OPTIONAL</bcp14></td>
              <td align="left">For physical goods: the digest of the carrier's tracking number. The tracking number itself is not carried (<xref target="privacy"/>).</td>
            </tr>
            <tr>
              <td align="left">
                <tt>status</tt></td>
              <td align="left">string</td>
              <td align="left">
                <bcp14>OPTIONAL</bcp14></td>
              <td align="left">For physical goods: <tt>pending</tt>, <tt>in_transit</tt>, <tt>delivered</tt>, <tt>failed</tt>, or <tt>returned</tt>.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>shipped_at</tt></td>
              <td align="left">string</td>
              <td align="left">
                <bcp14>OPTIONAL</bcp14></td>
              <td align="left">For physical goods: <xref target="RFC3339"/> UTC.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>delivered_at</tt></td>
              <td align="left">string</td>
              <td align="left">
                <bcp14>OPTIONAL</bcp14></td>
              <td align="left">For physical goods: <xref target="RFC3339"/> UTC.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>address_digest</tt></td>
              <td align="left">string</td>
              <td align="left">
                <bcp14>OPTIONAL</bcp14></td>
              <td align="left">For physical goods: a salted digest of the canonical delivery address (<xref target="privacy"/>).</td>
            </tr>
          </tbody>
        </table>
        <t><strong>Binding to the terms.</strong> The delivered leg is bound to the terms in two
ways. Its <tt>terms_ref</tt> names the terms leg, so the content digest is a
statement about delivery under those terms and no other. And when the
terms leg carries <tt>deliverable.content_digest</tt>, a verifier compares the
delivered <tt>content_digest</tt> with it (<xref target="delivery-state"/>). When the terms
carry only <tt>description_digest</tt>, the verifier can establish that both
sides name the same delivered content, but not that the content matches
the description; that judgment is outside this document.</t>
        <t>For an inference, <tt>content_digest</tt> is the digest of the completion as
returned at the serving boundary, the same value a Capsule with
<tt>effect.type: "inference_completion"</tt> records as its <tt>response_digest</tt>
(<xref target="I-D.mih-scitt-agent-action-capsule"/>, Effect Record). A delivered leg
<bcp14>MAY</bcp14> cite that Capsule with <tt>citation_purpose: "acted_on"</tt>.</t>
      </section>
    </section>
    <section anchor="amounts">
      <name>Amounts</name>
      <t>An amount is a JSON object with exactly three members, the same triple Open
Payments uses <xref target="OPEN-PAYMENTS"/>:</t>
      <table>
        <thead>
          <tr>
            <th align="left">Member</th>
            <th align="left">Type</th>
            <th align="left">Meaning</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">
              <tt>value</tt></td>
            <td align="left">string</td>
            <td align="left">A non-negative integer in decimal digits: <tt>0</tt>, or a digit 1-9 followed by digits. No sign, no leading zeros, no decimal point, no exponent, no whitespace.</td>
          </tr>
          <tr>
            <td align="left">
              <tt>assetCode</tt></td>
            <td align="left">string</td>
            <td align="left">The asset. For a fiat currency, the ISO 4217 alphabetic code <xref target="ISO4217"/>. For an asset on a network with a CAIP-2 identifier, the CAIP-19 asset type <xref target="CAIP-19"/>. For Lightning, <tt>BTC</tt>.</td>
          </tr>
          <tr>
            <td align="left">
              <tt>assetScale</tt></td>
            <td align="left">integer</td>
            <td align="left">The number of decimal places: an integer from 0 to 255.</td>
          </tr>
        </tbody>
      </table>
      <t>For example, USDC on Base has the CAIP-19 asset type
<tt>eip155:8453/erc20:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913</tt>.</t>
      <t>The amount is <tt>value</tt> divided by ten to the power <tt>assetScale</tt>. For example,
<tt>{"value": "1500000", "assetCode": "eip155:8453/erc20:0x8335...2913",
"assetScale": 6}</tt> is 1.5 units of that token, and <tt>{"value": "21000",
"assetCode": "BTC", "assetScale": 11}</tt> is 21000 millisatoshi.</t>
      <t>Decimal amounts are exact: 1.50 USDC is <tt>value</tt> <tt>"1500000"</tt> with
<tt>assetScale</tt> 6, 0.000001 is <tt>value</tt> <tt>"1"</tt> with <tt>assetScale</tt> 6, and
1234.56 is <tt>value</tt> <tt>"123456"</tt> with <tt>assetScale</tt> 2; any decimal fraction is
representable by choosing <tt>assetScale</tt>.</t>
      <t>The rules for amounts:</t>
      <ol spacing="normal" type="1"><li>
          <t><tt>value</tt> <bcp14>MUST</bcp14> be a JSON string matching the grammar above. A JSON number
in <tt>value</tt> is not conforming, whether or not it has a fractional part. A
floating-point number anywhere in a Capsule already fails the base
profile's digest rules; a string with a decimal point or exponent fails
this document as <tt>amount_not_exact</tt>.</t>
        </li>
        <li>
          <t><tt>assetScale</tt> <bcp14>MUST</bcp14> be a JSON integer from 0 to 255.</t>
        </li>
        <li>
          <t>Two amounts are equal if and only if their <tt>assetCode</tt> strings are
identical and their values are equal at a common scale: with
S = max(s1, s2), v1 * 10^(S - s1) = v2 * 10^(S - s2), computed in exact
integer arithmetic. Implementations <bcp14>MUST NOT</bcp14> convert either amount to a
binary floating-point number at any point.</t>
        </li>
        <li>
          <t>Amounts with different <tt>assetCode</tt> values are never equal, even if a
conversion rate exists. A settlement in which the two sides report
different assets is a mismatch (<xref target="states"/>).</t>
        </li>
      </ol>
      <t>The x402 <tt>amount</tt> and the AEP <tt>amount_atomic</tt> <xref target="AEP"/> are integer strings in
atomic units; they become <tt>value</tt> unchanged, with <tt>assetScale</tt> set to the
asset's decimals. Lightning amounts in millisatoshi use <tt>assetScale</tt> 11.
The <tt>assetCode</tt> <tt>BTC</tt> denotes bitcoin settled over Lightning; bitcoin
settled on-chain uses its CAIP-19 asset type (for example
<tt>bip122:000000000019d6689c085ae165831e93/slip44:0</tt>), and the two are
different assets for every comparison in this document.</t>
      <section anchor="fees">
        <name>Fees</name>
        <t>The two sides of one payment do not, in general, report the same number.
A Lightning payee's wallet, for example, can report 995 millisatoshi
received with a receive-side fee of 5 for a payment of 1000 millisatoshi
the payer sent with no routing fee. Both observations are honest. This
document therefore records each side's gross, fee, and net separately, and
never compares the payer's and the payee's amounts directly.</t>
        <t>The members, each an amount in the form above:</t>
        <ul spacing="normal">
          <li>
            <t>Payer-observed: <tt>amount</tt> is what the payer's system reports it sent
toward the payee. <tt>routing_fee</tt> is what it paid to intermediaries on
top. The payer's total debit is <tt>amount</tt> + <tt>routing_fee</tt>.</t>
          </li>
          <li>
            <t>Payee-observed: <tt>received</tt> is what the payee's system reports credited.
<tt>receive_fee</tt> is what was deducted on the receiving side, including any
charges deducted by intermediaries from the amount in transit, as the
payee's system reports them. The gross amount that arrived for the payee
is <tt>received</tt> + <tt>receive_fee</tt>; equivalently, net = gross - fee.</t>
          </li>
        </ul>
        <t>The rules for fees:</t>
        <ol spacing="normal" type="1"><li>
            <t>A fee is non-negative: its <tt>value</tt> follows the grammar of rule 1 above.</t>
          </li>
          <li>
            <t>A fee <bcp14>MUST</bcp14> carry the same <tt>assetCode</tt> as the amount it accompanies
(<tt>routing_fee</tt> with <tt>amount</tt>, <tt>receive_fee</tt> with <tt>received</tt>). It <bcp14>MAY</bcp14>
use a different <tt>assetScale</tt>; sums are computed in exact integer
arithmetic at the largest scale involved, as in rule 3 above. A fee in
a different asset cannot be combined with its amount; a verifier reports
<tt>fee_asset_differs</tt> and the pair is <tt>unjoined</tt> (<xref target="payment-state"/>).</t>
          </li>
          <li>
            <t>A fee member that is present with value <tt>0</tt> states that the sealer's
system reported no fee. A fee member that is absent states nothing.</t>
          </li>
          <li>
            <t>An absent <tt>receive_fee</tt> is read as zero only when the payment reference
type declares that receive fees are not applicable to it
(<xref target="payment-ref-types"/>). For every other type, a payee-observed leg
without <tt>receive_fee</tt> cannot be joined: the verifier reports
<tt>fee_unstated</tt> and the pair is <tt>unjoined</tt>, never <tt>agreed</tt>. A payee that
observed no fee records <tt>receive_fee</tt> with value <tt>0</tt>.</t>
          </li>
          <li>
            <t><tt>routing_fee</tt> does not enter the join (<xref target="payment-state"/>); the payee
cannot observe it. A payer <bcp14>SHOULD</bcp14> record it so that the payer's total
debit is reconstructable.</t>
          </li>
        </ol>
      </section>
    </section>
    <section anchor="payment-ref">
      <name>Payment References</name>
      <section anchor="payment-ref-shape">
        <name>Shape and Join Rule</name>
        <t>A payment reference is a JSON object with a <tt>type</tt> member, a <tt>value</tt>
member, and the qualifier members its type defines:</t>
        <sourcecode type="json"><![CDATA[
{"type": "x402.transaction",
 "value": "0x5a1f...c3d2",
 "network": "eip155:8453"}
]]></sourcecode>
        <ul spacing="normal">
          <li>
            <t><tt>type</tt> (string, <bcp14>REQUIRED</bcp14>): a registered payment reference type
(<xref target="iana-payment-ref"/>).</t>
          </li>
          <li>
            <t><tt>value</tt> (string, <bcp14>REQUIRED</bcp14>): the identifier, copied from the field the
type names, in the normal form the type defines.</t>
          </li>
          <li>
            <t>Qualifiers (strings): as the type defines. A qualifier names the space
in which <tt>value</tt> is unique (for example the CAIP-2 network of a
transaction hash).</t>
          </li>
        </ul>
        <t>Two payment references are the same reference if and only if their <tt>type</tt>
is the same registered type and every member is identical as a string after
the type's normal form is applied. A verifier <bcp14>MUST NOT</bcp14> join legs on a
payment reference whose type it does not recognize: equal-looking strings
of an unknown type are not known to name the same payment, because the
verifier does not know the type's normal form or uniqueness scope. Such a
pair is <tt>unjoined</tt> (<xref target="states"/>). Under the base profile's never-reject
invariant, the legs themselves remain valid Capsules.</t>
        <t>Types whose names begin with <tt>x-</tt> are private and <bcp14>MUST NOT</bcp14> be registered.</t>
      </section>
      <section anchor="payment-ref-types">
        <name>Initial Types</name>
        <dl>
          <dt><tt>x402.transaction</tt>:</dt>
          <dd>
            <t><tt>value</tt> is the settlement response <tt>transaction</tt> member. Qualifier <tt>network</tt>: the CAIP-2 network identifier <xref target="CAIP-2"/>, from the settlement response <tt>network</tt> member. Normal form: for <tt>eip155</tt> networks, lowercase hexadecimal with <tt>0x</tt> prefix; otherwise as received. Source: <xref target="X402"/>.</t>
          </dd>
          <dt><tt>ln.payment_hash</tt>:</dt>
          <dd>
            <t><tt>value</tt> is the BOLT 11 payment hash (tagged field <tt>p</tt>). Normal form: 64 lowercase hex. Source: <xref target="BOLT11"/>.</t>
          </dd>
          <dt><tt>bolt12.invoice_payment_hash</tt>:</dt>
          <dd>
            <t><tt>value</tt> is the BOLT 12 invoice <tt>invoice_payment_hash</tt>. Normal form: 64 lowercase hex. Source: <xref target="BOLT12"/>.</t>
          </dd>
          <dt><tt>ap2.transaction_id</tt>:</dt>
          <dd>
            <t><tt>value</tt> is the AP2 Payment Mandate <tt>transaction_id</tt>. Normal form: as received. Source: <xref target="AP2"/>.</t>
          </dd>
          <dt><tt>ap2.payment_id</tt>:</dt>
          <dd>
            <t><tt>value</tt> is the AP2 Payment Receipt <tt>payment_id</tt>. Normal form: as received. Source: <xref target="AP2"/>.</t>
          </dd>
          <dt><tt>ap2.network_confirmation_id</tt>:</dt>
          <dd>
            <t><tt>value</tt> is the AP2 Payment Receipt <tt>network_confirmation_id</tt>. Normal form: as received. Source: <xref target="AP2"/>.</t>
          </dd>
          <dt><tt>acp.order_id</tt>:</dt>
          <dd>
            <t><tt>value</tt> is the ACP order <tt>order.id</tt>. Normal form: as received. Source: <xref target="ACP"/>.</t>
          </dd>
          <dt><tt>ucp.order_id</tt>:</dt>
          <dd>
            <t><tt>value</tt> is the UCP order <tt>order.id</tt>. Normal form: as received. Source: <xref target="UCP"/>.</t>
          </dd>
          <dt><tt>mpp.reference</tt>:</dt>
          <dd>
            <t><tt>value</tt> is the <tt>reference</tt> member of the decoded <tt>Payment-Receipt</tt>. Qualifier <tt>method</tt>: the receipt's <tt>method</tt> member. Normal form: as received. Source: <xref target="I-D.ryan-httpauth-payment"/>.</t>
          </dd>
          <dt><tt>iso20022.uetr</tt>:</dt>
          <dd>
            <t><tt>value</tt> is the ISO 20022 <tt>UETR</tt> (Unique End-to-end Transaction Reference). Normal form: lowercase UUID string <xref target="RFC9562"/>. Source: <xref target="ISO20022"/>.</t>
          </dd>
          <dt><tt>iso20022.end_to_end_id</tt>:</dt>
          <dd>
            <t><tt>value</tt> is the ISO 20022 <tt>EndToEndId</tt>. Qualifier <tt>debtor_agent</tt>: the BIC of the debtor agent. Normal form: as received. Source: <xref target="ISO20022"/>.</t>
          </dd>
          <dt><tt>open_payments.incoming_payment</tt>:</dt>
          <dd>
            <t><tt>value</tt> is the Open Payments incoming payment <tt>id</tt> (a URL). Normal form: as received. Source: <xref target="OPEN-PAYMENTS"/>.</t>
          </dd>
        </dl>
        <t>Receive fees: <tt>x402.transaction</tt> declares receive fees not applicable for
the x402 <tt>exact</tt> scheme only, because that scheme transfers exactly
<tt>amount</tt> to <tt>payTo</tt> and any facilitator charge is outside that transfer.
Other x402 schemes, present or future (for example schemes that batch many
payments into one transfer), may differ, and a verifier <bcp14>MUST</bcp14> treat
<tt>receive_fee</tt> as one that may apply for any scheme other than <tt>exact</tt>. The
scheme is the <tt>scheme</tt> member of the x402 signed offer and of the
<tt>PaymentRequirements</tt> the payer accepted <xref target="X402"/>; a verifier reads it from
a wrapped <tt>x402.offer</tt> in the terms leg or a wrapped <tt>x402.payment-payload</tt>
in the payer-observed leg whose octets it holds. A verifier that cannot
establish that the scheme is <tt>exact</tt> treats the receive fee as one that may
apply. Every other initial type declares that a receive fee may apply
(<xref target="fees"/>, rule 4).</t>
        <t>Notes on the initial types:</t>
        <ul spacing="normal">
          <li>
            <t>x402 settlement responses always carry <tt>transaction</tt> and <tt>network</tt>. The
x402 signed receipt omits <tt>transaction</tt> by default for privacy
<xref target="X402-OFFER-RECEIPT"/>; a payee-observed leg takes the reference from the
settlement response its facilitator returned, not from the receipt.</t>
          </li>
          <li>
            <t>For batched settlement, where many payments settle in one on-chain
transaction, the transaction hash is not unique to one payment. Such a
rail needs its own type naming the per-payment identifier it assigns.</t>
          </li>
          <li>
            <t><tt>EndToEndId</tt> is assigned by the initiating party and is not globally
unique; the <tt>debtor_agent</tt> qualifier narrows it. Where a <tt>UETR</tt> exists,
<tt>iso20022.uetr</tt> <bcp14>SHOULD</bcp14> be used instead.</t>
          </li>
          <li>
            <t>AP2 <tt>payment_id</tt> and <tt>network_confirmation_id</tt> appear in the Payment
Receipt, which is produced after the payment; <tt>transaction_id</tt> appears in
the Payment Mandate, before it. A payer's leg and a payee's leg join only
on a type both sides' systems report.</t>
          </li>
        </ul>
      </section>
    </section>
    <section anchor="wrap">
      <name>Wrapping Existing Signed Objects</name>
      <t>Many payment protocols already produce signed objects: the x402 signed offer
and receipt, AP2 mandates and receipts, the BOLT 12 invoice and payer proof.
These records carry such an object as it is. It never re-signs it and
never re-encodes it.</t>
      <t>A <tt>wrapped</tt> entry is a JSON object:</t>
      <table>
        <thead>
          <tr>
            <th align="left">Member</th>
            <th align="left">Type</th>
            <th align="left">Req</th>
            <th align="left">Meaning</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">
              <tt>type</tt></td>
            <td align="left">string</td>
            <td align="left">
              <bcp14>REQUIRED</bcp14></td>
            <td align="left">A registered wrapped object type (<xref target="iana-wrapped"/>).</td>
          </tr>
          <tr>
            <td align="left">
              <tt>digest_alg</tt></td>
            <td align="left">string</td>
            <td align="left">
              <bcp14>REQUIRED</bcp14></td>
            <td align="left">
              <tt>SHA-256</tt>.</td>
          </tr>
          <tr>
            <td align="left">
              <tt>digest</tt></td>
            <td align="left">string</td>
            <td align="left">
              <bcp14>REQUIRED</bcp14></td>
            <td align="left">SHA-256 over the object's octets as defined for its type, 64 lowercase hex.</td>
          </tr>
          <tr>
            <td align="left">
              <tt>content</tt></td>
            <td align="left">string</td>
            <td align="left">
              <bcp14>OPTIONAL</bcp14></td>
            <td align="left">The same octets, base64url-encoded without padding (<xref target="RFC4648"/>, Section 5).</td>
          </tr>
        </tbody>
      </table>
      <t>The rules:</t>
      <ol spacing="normal" type="1"><li>
          <t><strong>Exact octets.</strong> <tt>digest</tt> is computed over the octets the type defines,
which are the octets as the protocol delivered them (for example the
ASCII octets of a JWS compact serialization). A sealer <bcp14>MUST NOT</bcp14> parse
and re-serialize the object before digesting it, and <bcp14>MUST NOT</bcp14> apply RFC
8785 to it unless the type says so. This is the rule that
<xref target="I-D.mih-sokolov-scitt-payload-binding"/>, Section 4.4, names
<tt>as-transmitted</tt>: no canonicalization, SHA-256 over the exact octet
sequence the carrying format already fixes, written as 64 lowercase hex
characters. A wrapped type's octet definition (<xref target="iana-wrapped"/>) plays
the role of that section's byte-boundary selector, and <bcp14>SHOULD</bcp14> name the
production in the type's own specification that fixes those octets.</t>
        </li>
        <li>
          <t><strong>Content check.</strong> When <tt>content</tt> is present, a verifier <bcp14>MUST</bcp14> decode it
and check that its SHA-256 equals <tt>digest</tt>. A mismatch is
<tt>wrapped_digest_mismatch</tt>.</t>
        </li>
        <li>
          <t><strong>Never re-sign.</strong> A sealer <bcp14>MUST NOT</bcp14> re-sign a wrapped object, sign a
copy of it with its own key, or restate its claims as members of its own
leg in place of wrapping it. The sealer's Producer Envelope covers the
leg, and therefore the digest of the wrapped object; it says that the
sealer holds an object with that digest, not that the sealer issued it.
A wrapped object whose signature verifies under the sealer's own leg key,
where the wrapped type's issuer is a different party, is
<tt>wrapped_resigned</tt>.</t>
        </li>
        <li>
          <t><strong>Verification of the wrapped object is the wrapped protocol's.</strong> A
verifier <bcp14>MAY</bcp14> verify the wrapped object under its own protocol's rules
(for example an AP2 receipt under the processor's key). This document
does not change those rules, and a wrapped object's validity does not
change what the leg itself proves.</t>
        </li>
      </ol>
      <t>The octets for each initial type are defined in <xref target="iana-wrapped"/>. For the
x402 objects in EIP-712 format, the protocol defines no byte string for the
object as a whole, so the octets are the RFC 8785 form of the JSON envelope
object (<tt>format</tt>, <tt>payload</tt>, <tt>signature</tt>); the EIP-712 signature covers the
typed-data hash, not JSON octets, so this canonical form does not affect the
signature. In the terms of <xref target="I-D.mih-sokolov-scitt-payload-binding"/>, that
type selects <tt>jcs</tt> (Section 4.1) rather than <tt>as-transmitted</tt>, because the
container defines no byte sequence to select.</t>
    </section>
    <section anchor="states">
      <name>Derived Settlement States</name>
      <section anchor="state-inputs">
        <name>Inputs</name>
        <t>A verifier derives states from a set of leg records. A party that presents
its own legs, the counterparty legs it holds, and the octets of the objects
they wrap can carry them together in an Evidence Bundle
<xref target="I-D.mih-zhang-agent-disclosure-bundle"/>, whose citation closure lets the
verifier check that every leg a presented leg cites is present. For each leg it first
checks:</t>
        <ol spacing="normal" type="1"><li>
            <t>the Capsule checks of the base profile;</t>
          </li>
          <li>
            <t>each Producer Envelope, and the authenticated key;</t>
          </li>
          <li>
            <t>the <tt>settlement</tt> member's structure (<xref target="settlement-member"/>) and amounts
(<xref target="amounts"/>);</t>
          </li>
          <li>
            <t>the wrapped entries (<xref target="wrap"/>);</t>
          </li>
          <li>
            <t>the sealer rules (<xref target="sealers"/>), against the verifier's key policy.</t>
          </li>
        </ol>
        <t>A leg that fails a check is reported with the failure and does not
contribute to the derived state. The distinct-key rule (<xref target="sealers"/>) is a
check on a pair of legs, not on one: <tt>sealer_conflation</tt> prevents <tt>agreed</tt>
but does not by itself exclude either leg, because without a key policy the
verifier cannot tell which of the two legs is the genuine one. The legs
that remain are grouped by <tt>terms_ref</tt>. Every check is performed on the records' own bytes; no
state is read from any record.</t>
      </section>
      <section anchor="payment-state">
        <name>Payment State</name>
        <t>For one terms leg, let P be the payer-observed legs that cite it and Q the
payee-observed legs that cite it. A sealer <bcp14>SHOULD</bcp14> produce at most one
observed leg per terms leg; when it produces a later one (for example when
<tt>pending</tt> becomes <tt>settled</tt>), the later leg <bcp14>SHOULD</bcp14> chain to the earlier
with relation <tt>supersedes</tt>, and the verifier uses the head of that chain.</t>
        <table>
          <thead>
            <tr>
              <th align="left">State</th>
              <th align="left">Condition</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">
                <tt>terms_only</tt></td>
              <td align="left">No observed leg cites the terms leg.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>payer_stated</tt></td>
              <td align="left">Only a payer-observed leg is present. A stated claim.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>payee_stated</tt></td>
              <td align="left">Only a payee-observed leg is present. A stated claim.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>agreed</tt></td>
              <td align="left">Both are present and joinable, sealed under distinct keys, their payment references are the same reference (<xref target="payment-ref-shape"/>), the amount rule below holds, and their <tt>status</tt> values are equal. The verifier reports the agreed status.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>mismatch</tt></td>
              <td align="left">Both are present and joinable, and the amount rule fails, the <tt>status</tt> values differ, or the payment references differ. The verifier reports which of <tt>amount</tt>, <tt>status</tt>, and <tt>payment_ref</tt> differ.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>unjoined</tt></td>
              <td align="left">Both are present, but they cannot be joined: a payment reference type is not recognized, the two legs carry payment references of different types, <tt>receive_fee</tt> is absent where the type does not declare receive fees not applicable (<tt>fee_unstated</tt>), or a fee is in a different asset from its amount (<tt>fee_asset_differs</tt>).</td>
            </tr>
          </tbody>
        </table>
        <t><strong>The amount rule.</strong> The two observed legs are consistent on amount if and
only if</t>
        <artwork><![CDATA[
   payer.amount = payee.received + payee.receive_fee
]]></artwork>
        <t>where all three carry the same <tt>assetCode</tt> and the sum and comparison are
computed exactly at the largest <tt>assetScale</tt> of the three
(<xref target="amounts"/>, <xref target="fees"/>). If <tt>payer.amount</tt> has a different <tt>assetCode</tt>
from <tt>payee.received</tt>, the amount rule fails and the state is <tt>mismatch</tt>.
A verifier <bcp14>MUST NOT</bcp14> compare <tt>payer.amount</tt> with <tt>payee.received</tt> directly:
a receive-side fee makes them differ in an honest payment, and treating
that difference as a mismatch would misreport it. A verifier <bcp14>MUST NOT</bcp14> relax
the amount rule by a tolerance; a difference of one unit at the common
scale is a mismatch.</t>
        <t>A verifier <bcp14>MUST NOT</bcp14> report <tt>agreed</tt> for a pair that fails the distinct-key
rule (<xref target="sealers"/>); it reports <tt>sealer_conflation</tt> instead.</t>
        <t>A one-sided state is a stated claim. It says what one sealer reports its
own system observed. It is not evidence of agreement, and a verifier <bcp14>MUST
NOT</bcp14> present it as <tt>agreed</tt>. The absence of the other leg is not evidence
that the other side disagrees: the other leg may not exist yet, may exist
and not have been shared, or may never be produced. A verifier that needs
to distinguish these can ask the counterparty for its leg using an
evidence request <xref target="I-D.mih-agent-evidence-request"/>, whose outcomes
distinguish an answer, a signed refusal, and a recorded absence.</t>
        <t><tt>agreed</tt> is about the payment only. A verifier also reports, separately,
whether the payer's <tt>amount</tt> equals the terms leg's <tt>amount</tt>
(<tt>terms_amount: equal</tt> or <tt>differs</tt>). Two sides can agree on what moved and
both differ from the terms. This document defines no fee bounds in the
terms leg; whether a fee was acceptable is a question about the terms, not
about whether the two sides agree, and a future revision that adds bounds
reports them in the same separate way.</t>
      </section>
      <section anchor="delivery-state">
        <name>Delivery State</name>
        <t>For one terms leg, let D be the delivered legs that cite it.</t>
        <table>
          <thead>
            <tr>
              <th align="left">State</th>
              <th align="left">Condition</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">
                <tt>none</tt></td>
              <td align="left">No delivered leg.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>stated</tt></td>
              <td align="left">One side's delivered leg only, and its <tt>content_digest</tt> does not differ from the terms' <tt>deliverable.content_digest</tt> when that is present.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>matched</tt></td>
              <td align="left">A <tt>sent</tt> leg and a <tt>received</tt> leg carry the same <tt>content_digest</tt>, and it does not differ from the terms' <tt>deliverable.content_digest</tt> when that is present.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>mismatch</tt></td>
              <td align="left">A <tt>sent</tt> and a <tt>received</tt> leg carry different <tt>content_digest</tt> values, or any delivered <tt>content_digest</tt> differs from the terms' <tt>deliverable.content_digest</tt>.</td>
            </tr>
          </tbody>
        </table>
        <t>The two states are independent. A payment can be <tt>agreed</tt> while delivery is
<tt>none</tt>, and delivery can be <tt>matched</tt> while the payment is <tt>payee_stated</tt>.</t>
      </section>
      <section anchor="failures">
        <name>Failures</name>
        <t>The failure codes a verifier reports for these records are:</t>
        <table>
          <thead>
            <tr>
              <th align="left">Code</th>
              <th align="left">Meaning</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">
                <tt>settlement_malformed</tt></td>
              <td align="left">The <tt>settlement</tt> member is missing a required member, carries a forbidden one, or has a value outside its closed set.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>amount_not_exact</tt></td>
              <td align="left">An amount <tt>value</tt> is not a string of the required grammar, or <tt>assetScale</tt> is not an integer from 0 to 255.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>terms_ref_unresolved</tt></td>
              <td align="left">A leg's <tt>terms_ref</tt> does not match the <tt>capsule_id</tt> of any terms leg in the set.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>leg_role_mismatch</tt></td>
              <td align="left">A leg's <tt>sealer_role</tt> does not match its leg (<xref target="sealers"/>).</td>
            </tr>
            <tr>
              <td align="left">
                <tt>sealer_not_authorized_for_role</tt></td>
              <td align="left">The leg's authenticated key is not accepted by the verifier's policy for the leg's role.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>sealer_conflation</tt></td>
              <td align="left">A payer-observed and a payee-observed leg for one terms leg are sealed under the same key.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>wrapped_digest_mismatch</tt></td>
              <td align="left">A wrapped entry's <tt>content</tt> does not hash to its <tt>digest</tt>.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>wrapped_resigned</tt></td>
              <td align="left">A wrapped object carries a signature by the leg's own sealer where its type's issuer is a different party.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>payment_ref_type_unknown</tt></td>
              <td align="left">A payment reference type is not recognized. Informational: the leg is not rejected, and the pair is <tt>unjoined</tt>.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>fee_unstated</tt></td>
              <td align="left">A payee-observed leg has no <tt>receive_fee</tt> and its payment reference type does not declare receive fees not applicable. Informational: the leg is not rejected, and the pair is <tt>unjoined</tt>.</td>
            </tr>
            <tr>
              <td align="left">
                <tt>fee_asset_differs</tt></td>
              <td align="left">A fee's <tt>assetCode</tt> differs from the amount it accompanies. Informational: the leg is not rejected, and the pair is <tt>unjoined</tt>.</td>
            </tr>
          </tbody>
        </table>
      </section>
    </section>
    <section anchor="status">
      <name>Status Values and ISO 20022</name>
      <t>An observed leg's <tt>status</tt> is one of four values. Each is what the
sealer's own system reported about the sealer's own side.</t>
      <table>
        <thead>
          <tr>
            <th align="left">status</th>
            <th align="left">Meaning</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">
              <tt>pending</tt></td>
            <td align="left">The sealer's system reports the payment as accepted or in process, not final.</td>
          </tr>
          <tr>
            <td align="left">
              <tt>settled</tt></td>
            <td align="left">The sealer's system reports the payment as final on the sealer's side: debited for the payer, credited or received for the payee.</td>
          </tr>
          <tr>
            <td align="left">
              <tt>failed</tt></td>
            <td align="left">The sealer's system reports the payment as rejected or not completed.</td>
          </tr>
          <tr>
            <td align="left">
              <tt>reversed</tt></td>
            <td align="left">The sealer's system reports a payment that had settled as returned or reversed.</td>
          </tr>
        </tbody>
      </table>
      <t>These values map to ISO 20022 <xref target="ISO20022"/> as follows, so that reviewers
familiar with bank status reports can read a leg directly. The payer's side
corresponds to the status the debtor agent reports; the payee's side to the
status the creditor agent reports or the entry status in the account
notification.</t>
      <table>
        <thead>
          <tr>
            <th align="left">status</th>
            <th align="left">Payer-observed (pacs.002 TxSts)</th>
            <th align="left">Payee-observed (pacs.002 TxSts)</th>
            <th align="left">Payee-observed (camt.054 entry status)</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">
              <tt>pending</tt></td>
            <td align="left">
              <tt>ACTC</tt>, <tt>ACCP</tt>, <tt>ACSP</tt>, or <tt>PDNG</tt></td>
            <td align="left">
              <tt>ACSP</tt> or <tt>PDNG</tt></td>
            <td align="left">
              <tt>PDNG</tt></td>
          </tr>
          <tr>
            <td align="left">
              <tt>settled</tt></td>
            <td align="left">
              <tt>ACSC</tt></td>
            <td align="left">
              <tt>ACCC</tt></td>
            <td align="left">
              <tt>BOOK</tt></td>
          </tr>
          <tr>
            <td align="left">
              <tt>failed</tt></td>
            <td align="left">
              <tt>RJCT</tt></td>
            <td align="left">
              <tt>RJCT</tt></td>
            <td align="left">(no entry)</td>
          </tr>
          <tr>
            <td align="left">
              <tt>reversed</tt></td>
            <td align="left">a pacs.004 return of the payment</td>
            <td align="left">a pacs.004 return of the payment</td>
            <td align="left">
              <tt>BOOK</tt> with reversal indicator <tt>true</tt></td>
          </tr>
        </tbody>
      </table>
      <t>The mapping is one-way: a sealer whose system reports an ISO 20022 code
records the corresponding <tt>status</tt> and <bcp14>SHOULD</bcp14> wrap the status report itself.
A code not listed (for example <tt>ACWC</tt>, accepted with change) does not map
to <tt>settled</tt>; a sealer records <tt>pending</tt> and wraps the report, and the
change appears as an amount difference if the amounts differ.</t>
      <t>Fees correspond to ISO 20022 charges as follows. The correspondence is
informative; a sealer records what its own system reported and wraps the
message.</t>
      <table>
        <thead>
          <tr>
            <th align="left">Member</th>
            <th align="left">ISO 20022</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">payer <tt>amount</tt></td>
            <td align="left">pacs.008 <tt>InstdAmt</tt>, or <tt>IntrBkSttlmAmt</tt> when no instructed amount is given</td>
          </tr>
          <tr>
            <td align="left">payer <tt>routing_fee</tt></td>
            <td align="left">charges the debtor bears and is billed for separately (charge bearer <tt>ChrgBr</tt> <tt>DEBT</tt>)</td>
          </tr>
          <tr>
            <td align="left">payee <tt>received</tt></td>
            <td align="left">camt.054 entry <tt>Amt</tt> of the credit</td>
          </tr>
          <tr>
            <td align="left">payee <tt>receive_fee</tt></td>
            <td align="left">charges deducted from the amount in transit or by the creditor agent: pacs.008 <tt>ChrgsInf</tt> amounts deducted under <tt>ChrgBr</tt> <tt>SHAR</tt> or <tt>CRED</tt>, as reported to the creditor in camt.054 <tt>Chrgs</tt></td>
          </tr>
        </tbody>
      </table>
      <t>With these, the amount rule (<xref target="payment-state"/>) reads: the instructed
amount equals the booked credit plus the charges deducted on the way.</t>
      <t>For other rails, the sealer derives <tt>status</tt> from the object its system
returned:</t>
      <table>
        <thead>
          <tr>
            <th align="left">Rail object</th>
            <th align="left">settled</th>
            <th align="left">failed</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">x402 settlement response <xref target="X402"/></td>
            <td align="left">
              <tt>success</tt> is <tt>true</tt></td>
            <td align="left">
              <tt>success</tt> is <tt>false</tt></td>
          </tr>
          <tr>
            <td align="left">AP2 Payment Receipt <xref target="AP2"/></td>
            <td align="left">
              <tt>status</tt> is <tt>Success</tt></td>
            <td align="left">
              <tt>status</tt> is <tt>Error</tt></td>
          </tr>
          <tr>
            <td align="left">
              <tt>Payment-Receipt</tt> <xref target="I-D.ryan-httpauth-payment"/></td>
            <td align="left">receipt present (<tt>status</tt> is <tt>success</tt>)</td>
            <td align="left">no receipt</td>
          </tr>
          <tr>
            <td align="left">Lightning payment</td>
            <td align="left">preimage obtained (payer) or invoice settled (payee)</td>
            <td align="left">payment failed</td>
          </tr>
        </tbody>
      </table>
    </section>
    <section anchor="aep">
      <name>Crosswalk to AEP Fulfillment Fields</name>
      <t>The A-Comm Evidence Protocol <xref target="AEP"/> records a commerce transaction as a
single-sealer hash chain whose fulfillment artifact (AEP Section 3.7)
records shipping and delivery. A delivered leg maps to it as follows, so
that an AEP fulfillment artifact can be produced from a delivered leg and
compared with one.</t>
      <table>
        <thead>
          <tr>
            <th align="left">AEP Section 3.7 field</th>
            <th align="left">This document</th>
            <th align="left">Note</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">
              <tt>fulfillment_id</tt></td>
            <td align="left">Capsule <tt>action_id</tt></td>
            <td align="left"> </td>
          </tr>
          <tr>
            <td align="left">
              <tt>platform_order_id</tt></td>
            <td align="left">
              <tt>payment_ref</tt> of type <tt>acp.order_id</tt> or <tt>ucp.order_id</tt> on the observed legs</td>
            <td align="left"> </td>
          </tr>
          <tr>
            <td align="left">
              <tt>carrier</tt></td>
            <td align="left">
              <tt>delivery.carrier</tt></td>
            <td align="left"> </td>
          </tr>
          <tr>
            <td align="left">
              <tt>tracking_number</tt></td>
            <td align="left">
              <tt>delivery.tracking_digest</tt></td>
            <td align="left">Digest only; the number is not carried (<xref target="privacy"/>).</td>
          </tr>
          <tr>
            <td align="left">
              <tt>tracking_url</tt></td>
            <td align="left">not carried</td>
            <td align="left">A locator, not evidence.</td>
          </tr>
          <tr>
            <td align="left">
              <tt>status</tt></td>
            <td align="left">
              <tt>delivery.status</tt></td>
            <td align="left">Same five values.</td>
          </tr>
          <tr>
            <td align="left">
              <tt>shipped_at</tt></td>
            <td align="left">
              <tt>delivery.shipped_at</tt></td>
            <td align="left"> </td>
          </tr>
          <tr>
            <td align="left">
              <tt>delivered_at</tt></td>
            <td align="left">
              <tt>delivery.delivered_at</tt></td>
            <td align="left"> </td>
          </tr>
          <tr>
            <td align="left">
              <tt>delivery_address_hash</tt></td>
            <td align="left">
              <tt>delivery.address_digest</tt></td>
            <td align="left">Same salted-hash approach.</td>
          </tr>
          <tr>
            <td align="left">
              <tt>delivery_address_match</tt></td>
            <td align="left">not carried</td>
            <td align="left">A derived value; derived by the verifier, never asserted.</td>
          </tr>
          <tr>
            <td align="left">
              <tt>signature_captured</tt></td>
            <td align="left">not carried</td>
            <td align="left">Personal data; a proof-of-delivery document may be wrapped by digest.</td>
          </tr>
          <tr>
            <td align="left">
              <tt>proof_of_delivery_url</tt></td>
            <td align="left">
              <tt>wrapped</tt> entry of type <tt>delivery.proof</tt></td>
            <td align="left">The document by digest, not its URL.</td>
          </tr>
          <tr>
            <td align="left">
              <tt>captured_at</tt></td>
            <td align="left">Capsule <tt>timestamp</tt></td>
            <td align="left"> </td>
          </tr>
          <tr>
            <td align="left">
              <tt>idempotency_key</tt></td>
            <td align="left">Capsule <tt>action_id</tt></td>
            <td align="left"> </td>
          </tr>
        </tbody>
      </table>
      <t>The authorization fields of AEP Section 3.6 that concern settlement map as
follows. AEP records no fee fields; <tt>routing_fee</tt>, <tt>received</tt>, and
<tt>receive_fee</tt> have no AEP counterpart, and an AEP export carries the
payer's <tt>amount</tt> only.</t>
      <table>
        <thead>
          <tr>
            <th align="left">AEP Section 3.6 field</th>
            <th align="left">This document</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">
              <tt>settlement_rail</tt></td>
            <td align="left">implied by the <tt>payment_ref</tt> type</td>
          </tr>
          <tr>
            <td align="left">
              <tt>stablecoin.chain</tt></td>
            <td align="left">
              <tt>payment_ref.network</tt> (<tt>x402.transaction</tt>)</td>
          </tr>
          <tr>
            <td align="left">
              <tt>stablecoin.transaction_hash</tt></td>
            <td align="left">
              <tt>payment_ref.value</tt> (<tt>x402.transaction</tt>)</td>
          </tr>
          <tr>
            <td align="left">
              <tt>stablecoin.asset</tt></td>
            <td align="left">
              <tt>amount.assetCode</tt> (as a CAIP-19 asset type)</td>
          </tr>
          <tr>
            <td align="left">
              <tt>stablecoin.amount_atomic</tt></td>
            <td align="left">payer <tt>amount.value</tt>, with <tt>assetScale</tt> set to the asset's decimals</td>
          </tr>
          <tr>
            <td align="left">
              <tt>x402_payment_response</tt></td>
            <td align="left">
              <tt>wrapped</tt> entry of type <tt>x402.settle-response</tt></td>
          </tr>
        </tbody>
      </table>
      <t>AEP seals its chain under one server key and names independent signatures
as one way to raise a bundle above its "Asserted" signal class. A pair of
payer-observed and payee-observed legs, each sealed by its own party, is
evidence of that kind for the payment.</t>
    </section>
    <section anchor="registration">
      <name>Registration with a Transparency Service</name>
      <t>Each leg is a Capsule and can be made transparent the way the base profile
defines: a registrar submits a Signed Statement whose payload is the leg's
Capsule ID to a SCITT Transparency Service <xref target="RFC9943"/> and obtains a Receipt
<xref target="RFC9942"/>. A Receipt proves that the leg was registered in that
Transparency Service's log; it does not prove that the leg's content is
true, and it does not make a one-sided leg a two-party record.</t>
      <t>Each sealer <bcp14>SHOULD</bcp14> register its own legs. A sealer <bcp14>MAY</bcp14> register with more
than one Transparency Service. Registration gives a third party a way to
check that a leg existed at the time of its Receipt; a sealer that later
produces a conflicting leg for the same terms cannot also make the earlier
one disappear from a log it was registered in. Which Registration Policy a
Transparency Service applies is that service's concern.</t>
    </section>
    <section anchor="related">
      <name>Relationship to Existing Work</name>
      <t><strong>Bilateral attestation.</strong> <xref target="I-D.mih-agent-bilateral-attestation"/> defines a
request/action exchange between two organizations, in which each signs its
own half and acknowledges the other's. This document applies the same
discipline to a payment: each side signs only its own half, the halves cite
each other by digest, and a missing half is a defined state rather than an
error. The settlement legs are not the bilateral exchange's objects; a
deployment can use both, with an action attestation citing a terms leg.</t>
      <t><strong>x402.</strong> This document binds to the x402 settlement response's <tt>transaction</tt>
and <tt>network</tt> <xref target="X402"/>, and wraps the signed offer and receipt
<xref target="X402-OFFER-RECEIPT"/>. It adds a record of what the payer's side observed,
which x402 does not define, and a delivered-content digest bound to the
terms.</t>
      <t><strong>AP2.</strong> AP2 mandates and receipts <xref target="AP2"/> are wrapped by digest. A Payment
Receipt is the processor's statement; in these records it is carried in the
payee's leg as the processor's object, and the payee's own observation is
the leg itself.</t>
      <t><strong>BOLT 12 payer proofs.</strong> A payer proof <xref target="BOLT12"/> is a two-party proof of a
Lightning payment. It is wrapped, not replaced; this document adds the
delivery leg and a form that is the same across rails.</t>
      <t><strong>Payment HTTP authentication.</strong> The <tt>Payment-Receipt</tt>
        <xref target="I-D.ryan-httpauth-payment"/> is not signed. Wrapped in a payee-observed
leg, it becomes part of a signed record that can be registered.</t>
      <t><strong>Cedulon.</strong> <xref target="I-D.dogru-cedulon-core"/> defines an issuer-signed Trade
Manifest before payment and an issuer-signed Spend Receipt after it, with an
optional second signature by the payee over a delivered-content hash
(<tt>deliveredHash</tt>). Both documents use COSE and bind delivery by digest.
This document differs in having two sealers of equal standing, each
recording its own observation, and in deriving the settlement state from
both.</t>
      <t><strong>COSE countersignatures.</strong> Nothing in this document is a COSE
countersignature <xref target="RFC9338"/>. Each leg is a separate Capsule from a
separate sealer.</t>
    </section>
    <section anchor="security">
      <name>Security Considerations</name>
      <t><strong>One party sealing both sides.</strong> The main attack on a two-party record is
one party producing both halves. A payer-observed and payee-observed pair
under one key is detected without any policy (<xref target="sealers"/>). A pair under
two keys that one party controls is not detectable from the records; the
verifier's key policy is what binds each key to a party, and the evidence
is no stronger than that binding.</t>
      <t><strong>Stated claims.</strong> A one-sided leg is easy to produce and says only what one
party claims. Verifiers <bcp14>MUST</bcp14> present one-sided states as stated claims
(<xref target="payment-state"/>).</t>
      <t><strong>Pre-written legs.</strong> A sealer can write several candidate legs for one
terms leg and disclose the one it prefers. Registration with a Transparency
Service (<xref target="registration"/>) makes each registered leg discoverable later,
and the at-most-one-observed-leg rule (<xref target="payment-state"/>) makes a second
unchained leg for the same terms visible as such. A payer-observed leg
cites a terms leg whose <tt>capsule_id</tt> the payer did not choose, and the
payment reference is produced by the rail, so the values a payer digests
are not all under its control. See also the considerations on predictable
values in <xref target="I-D.mih-agent-bilateral-attestation"/>.</t>
      <t><strong>Wrapped objects.</strong> A wrapped object is carried by digest. A leg that
wraps an object proves the sealer held octets with that digest; it does not
prove the object is valid. A verifier that relies on a wrapped object's
content verifies that object under its own protocol.</t>
      <t><strong>Re-signing.</strong> A sealer that re-signs an upstream object makes it look as
though the sealer issued it, and replaces the upstream signer's evidence
with its own. The never-re-sign rule (<xref target="wrap"/>) prevents this; the
<tt>wrapped_resigned</tt> check detects the simplest case.</t>
      <t><strong>Amounts.</strong> Floating-point amounts produce different values on different
platforms and make digests unstable. Amounts are exact integers with a
scale (<xref target="amounts"/>); comparing assets by identical <tt>assetCode</tt> prevents a
rate from being applied silently.</t>
      <t><strong>Fees.</strong> A naive comparison of the payer's and the payee's amounts would
report every payment with a receive-side fee as a mismatch, and a verifier
that learned to ignore such mismatches would then also ignore real ones.
The amount rule (<xref target="payment-state"/>) is exact, so a difference it does not
explain is always reported. Because the rule trusts the payee's report of
<tt>receive_fee</tt>, a payee can explain a shortfall by overstating its fee; the
two sides then agree on the arithmetic, and whether that fee was
acceptable is a question for the terms. A payee that omits <tt>receive_fee</tt>
on a rail where fees apply gets <tt>unjoined</tt>, never <tt>agreed</tt>, so silence
cannot pass for a zero fee.</t>
      <t><strong>Payment references.</strong> A payment reference names a payment; it is not
evidence the payment happened. The status in an observed leg is the
sealer's report of its own system's report. A verifier that needs the
rail's own confirmation obtains it from the rail.</t>
      <t><strong>Canonicalization.</strong> All digests over JSON in this document use the base
profile's declared RFC 8785 construction, the <tt>jcs</tt> algorithm of
<xref target="I-D.mih-sokolov-scitt-payload-binding"/>. Wrapped objects use the octets
their type defines, under that document's <tt>as-transmitted</tt> rule
(<xref target="wrap"/>). No digest is computed over an object re-encoded by
inference from its shape.</t>
    </section>
    <section anchor="privacy">
      <name>Privacy Considerations</name>
      <t>Payment records are personal data in most jurisdictions when a party is a
natural person, and commercially sensitive otherwise.</t>
      <t><strong>Identifiers are personal data.</strong> Payment references (transaction hashes,
end-to-end identifiers, order identifiers) and wallet addresses can
identify a person or link payments together. A leg carries only the
payment reference needed to join the two sides. Deployments <bcp14>SHOULD</bcp14> treat a
leg as personal data and disclose it only to the counterparty and to
parties entitled to review the settlement.</t>
      <t><strong>No raw account numbers.</strong> A leg <bcp14>MUST NOT</bcp14> carry a raw bank account number,
card number, IBAN, or similar account identifier. Where an account must be
matched, a leg carries a salted digest of it. Delivery addresses and
tracking numbers are carried only as salted digests (<tt>address_digest</tt>,
<tt>tracking_digest</tt>); the salt is kept by the sealer and disclosed only to
parties entitled to check the match. Unsalted digests of low-entropy values
such as addresses can be reversed by guessing.</t>
      <t><strong>Correlation.</strong> A payment reference that appears in registered legs links
those legs to the public record of the rail (for example an on-chain
transaction). Registering legs in a Transparency Service in clear text
makes the payment discoverable to anyone who can read the log. Deployments
<bcp14>SHOULD</bcp14> register only the leg's Capsule ID, as the base profile does, and
<bcp14>SHOULD</bcp14> use the selective-disclosure profile
<xref target="I-D.mih-scitt-agent-action-capsule-sel-disc"/> to commit to the payment
reference and amount rather than disclose them where the use case allows.
The x402 signed receipt omits the transaction reference by default for the
same reason <xref target="X402-OFFER-RECEIPT"/>.</t>
      <t><strong>Fees.</strong> Fee amounts can reveal the route, the intermediaries, or the
commercial terms between a payee and its provider. They are subject to the
same disclosure considerations as amounts.</t>
      <t><strong>Delivered content.</strong> The delivered leg carries a digest of the content,
never the content. A digest of low-entropy content (a short answer, a
yes/no result) can be guessed; a sealer delivering such content <bcp14>SHOULD</bcp14>
digest a structure that includes an unpredictable component, such as the
full response object.</t>
    </section>
    <section anchor="open-issues">
      <name>Open Issues</name>
      <t>The following are expected to be addressed in a later revision. This
document does not design them.</t>
      <dl>
        <dt>Several payments per terms leg:</dt>
        <dd>
          <t>Terms that are paid in parts (for example one payment per invoice under
one terms leg) need a payment sequence or index on the observed legs and
a rule for the total. This revision joins one payer-observed and one
payee-observed leg per terms leg; partial payments and refunds are out
of scope (<xref target="terms-leg"/>).</t>
        </dd>
        <dt>Key-policy result:</dt>
        <dd>
          <t>Whether each leg's key is accepted for its party is a separate result
from the payment state. A later revision is expected to report it
separately (for example whether the parties are bound), so that
implementations do not invent combined states.</t>
        </dd>
        <dt>In-progress payments:</dt>
        <dd>
          <t>A payment that one side reports <tt>settled</tt> and the other <tt>pending</tt> is
in flight, not in disagreement. A later revision is expected to define an
<tt>in_progress</tt> state for it, distinct from <tt>mismatch</tt>; in this revision the
status difference is reported as <tt>mismatch</tt>.</t>
        </dd>
      </dl>
    </section>
    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>This document asks IANA to create two registries in a new "Agent Settlement
Records" registry group. Until IANA establishes them, the source repository
of this document keeps them as the interim registry of record.</t>
      <section anchor="iana-payment-ref">
        <name>Payment Reference Types</name>
        <t>Registry name: Settlement Payment Reference Types.</t>
        <t>Registration policy: Specification Required (<xref target="RFC8126"/>, Section 4.6).</t>
        <t>Each entry has: the type name; the upstream field <tt>value</tt> is copied from;
the qualifier members and their meaning; the normal form; whether a
receive fee may apply or is not applicable (<xref target="fees"/>); and a reference
to a publicly available specification of the upstream field.</t>
        <t>Designated-expert guidance: the expert checks that the upstream field is
publicly specified, that the normal form makes equality well defined, that
the qualifiers make <tt>value</tt> unique for one payment, and that the type does
not duplicate an existing one. Names beginning with <tt>x-</tt> are not
registered.</t>
        <t>Initial contents: the types in <xref target="payment-ref-types"/>, each referencing this
document and the source listed there.</t>
      </section>
      <section anchor="iana-wrapped">
        <name>Wrapped Object Types</name>
        <t>Registry name: Settlement Wrapped Object Types.</t>
        <t>Registration policy: Specification Required (<xref target="RFC8126"/>, Section 4.6).</t>
        <t>Each entry has: the type name; the issuer of the object under its own
specification; the exact octets the digest is computed over; and a
reference.</t>
        <t>Initial contents:</t>
        <dl>
          <dt><tt>x402.offer</tt>:</dt>
          <dd>
            <t>Issuer: payee. Octets: JWS format: the ASCII octets of the JWS compact serialization. EIP-712 format: RFC 8785 form of the envelope object (<tt>format</tt>, <tt>payload</tt>, <tt>signature</tt>). Reference: <xref target="X402-OFFER-RECEIPT"/>.</t>
          </dd>
          <dt><tt>x402.receipt</tt>:</dt>
          <dd>
            <t>Issuer: payee. Octets: As for <tt>x402.offer</tt>. Reference: <xref target="X402-OFFER-RECEIPT"/>.</t>
          </dd>
          <dt><tt>x402.payment-payload</tt>:</dt>
          <dd>
            <t>Issuer: payer. Octets: The base64-decoded value of the <tt>PAYMENT-SIGNATURE</tt> header as sent. Reference: <xref target="X402"/>.</t>
          </dd>
          <dt><tt>x402.settle-response</tt>:</dt>
          <dd>
            <t>Issuer: facilitator. Octets: for the payer, the base64-decoded value of the <tt>PAYMENT-RESPONSE</tt> header as received; for the payee, the settlement response body as its facilitator returned it. Reference: <xref target="X402"/>.</t>
          </dd>
          <dt><tt>ap2.checkout-mandate</tt>:</dt>
          <dd>
            <t>Issuer: user or agent. Octets: The SD-JWT serialization as presented. Reference: <xref target="AP2"/>.</t>
          </dd>
          <dt><tt>ap2.payment-mandate</tt>:</dt>
          <dd>
            <t>Issuer: user or agent. Octets: The SD-JWT serialization as presented. Reference: <xref target="AP2"/>.</t>
          </dd>
          <dt><tt>ap2.checkout-receipt</tt>:</dt>
          <dd>
            <t>Issuer: merchant. Octets: The JWT compact serialization as received. Reference: <xref target="AP2"/>.</t>
          </dd>
          <dt><tt>ap2.payment-receipt</tt>:</dt>
          <dd>
            <t>Issuer: payment processor. Octets: The JWT compact serialization as received. Reference: <xref target="AP2"/>.</t>
          </dd>
          <dt><tt>bolt12.invoice</tt>:</dt>
          <dd>
            <t>Issuer: payee. Octets: The invoice TLV stream octets. Reference: <xref target="BOLT12"/>.</t>
          </dd>
          <dt><tt>bolt12.payer-proof</tt>:</dt>
          <dd>
            <t>Issuer: payer. Octets: The payer proof TLV stream octets. Reference: <xref target="BOLT12"/>.</t>
          </dd>
          <dt><tt>mpp.payment-receipt</tt>:</dt>
          <dd>
            <t>Issuer: payee. Octets: The base64url-decoded value of the <tt>Payment-Receipt</tt> header. Reference: <xref target="I-D.ryan-httpauth-payment"/>.</t>
          </dd>
          <dt><tt>iso20022.message</tt>:</dt>
          <dd>
            <t>Issuer: the agent that sent it. Octets: The XML message octets as received. Reference: <xref target="ISO20022"/>.</t>
          </dd>
          <dt><tt>delivery.proof</tt>:</dt>
          <dd>
            <t>Issuer: carrier or payee. Octets: The proof-of-delivery document octets. Reference: this document.</t>
          </dd>
        </dl>
      </section>
      <section anchor="no-other-actions">
        <name>No Other Actions</name>
        <t>This document reserves the Capsule payload member name <tt>settlement</tt> for the
use defined here. The base profile has no IANA registry of payload member
names, so no IANA action is requested for it. The <tt>leg</tt>, <tt>sealer_role</tt>,
<tt>status</tt>, and <tt>delivery.direction</tt> values are closed sets defined by this
document and are not registries; a future revision that needs a new value
updates this document.</t>
      </section>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC3339">
          <front>
            <title>Date and Time on the Internet: Timestamps</title>
            <author fullname="G. Klyne" initials="G." surname="Klyne"/>
            <author fullname="C. Newman" initials="C." surname="Newman"/>
            <date month="July" year="2002"/>
            <abstract>
              <t>This document defines a date and time format for use in Internet protocols that is a profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="3339"/>
          <seriesInfo name="DOI" value="10.17487/RFC3339"/>
        </reference>
        <reference anchor="RFC4648">
          <front>
            <title>The Base16, Base32, and Base64 Data Encodings</title>
            <author fullname="S. Josefsson" initials="S." surname="Josefsson"/>
            <date month="October" year="2006"/>
            <abstract>
              <t>This document describes the commonly used base 64, base 32, and base 16 encoding schemes. It also discusses the use of line-feeds in encoded data, use of padding in encoded data, use of non-alphabet characters in encoded data, use of different encoding alphabets, and canonical encodings. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4648"/>
          <seriesInfo name="DOI" value="10.17487/RFC4648"/>
        </reference>
        <reference anchor="RFC8126">
          <front>
            <title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
            <author fullname="M. Cotton" initials="M." surname="Cotton"/>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <author fullname="T. Narten" initials="T." surname="Narten"/>
            <date month="June" year="2017"/>
            <abstract>
              <t>Many protocols make use of points of extensibility that use constants to identify various protocol parameters. To ensure that the values in these fields do not have conflicting uses and to promote interoperability, their allocations are often coordinated by a central record keeper. For IETF protocols, that role is filled by the Internet Assigned Numbers Authority (IANA).</t>
              <t>To make assignments in a given registry prudently, guidance describing the conditions under which new values should be assigned, as well as when and how modifications to existing values can be made, is needed. This document defines a framework for the documentation of these guidelines by specification authors, in order to assure that the provided guidance for the IANA Considerations is clear and addresses the various issues that are likely in the operation of a registry.</t>
              <t>This is the third edition of this document; it obsoletes RFC 5226.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="26"/>
          <seriesInfo name="RFC" value="8126"/>
          <seriesInfo name="DOI" value="10.17487/RFC8126"/>
        </reference>
        <reference anchor="RFC8785">
          <front>
            <title>JSON Canonicalization Scheme (JCS)</title>
            <author fullname="A. Rundgren" initials="A." surname="Rundgren"/>
            <author fullname="B. Jordan" initials="B." surname="Jordan"/>
            <author fullname="S. Erdtman" initials="S." surname="Erdtman"/>
            <date month="June" year="2020"/>
            <abstract>
              <t>Cryptographic operations like hashing and signing need the data to be expressed in an invariant format so that the operations are reliably repeatable. One way to address this is to create a canonical representation of the data. Canonicalization also permits data to be exchanged in its original form on the "wire" while cryptographic operations performed on the canonicalized counterpart of the data in the producer and consumer endpoints generate consistent results.</t>
              <t>This document describes the JSON Canonicalization Scheme (JCS). This specification defines how to create a canonical representation of JSON data by building on the strict serialization methods for JSON primitives defined by ECMAScript, constraining JSON data to the Internet JSON (I-JSON) subset, and by using deterministic property sorting.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8785"/>
          <seriesInfo name="DOI" value="10.17487/RFC8785"/>
        </reference>
        <reference anchor="RFC9052">
          <front>
            <title>CBOR Object Signing and Encryption (COSE): Structures and Process</title>
            <author fullname="J. Schaad" initials="J." surname="Schaad"/>
            <date month="August" year="2022"/>
            <abstract>
              <t>Concise Binary Object Representation (CBOR) is a data format designed for small code size and small message size. There is a need to be able to define basic security services for this data format. This document defines the CBOR Object Signing and Encryption (COSE) protocol. This specification describes how to create and process signatures, message authentication codes, and encryption using CBOR for serialization. This specification additionally describes how to represent cryptographic keys using CBOR.</t>
              <t>This document, along with RFC 9053, obsoletes RFC 8152.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="96"/>
          <seriesInfo name="RFC" value="9052"/>
          <seriesInfo name="DOI" value="10.17487/RFC9052"/>
        </reference>
        <reference anchor="I-D.mih-scitt-agent-action-capsule">
          <front>
            <title>An Agent Action Capsule Profile for SCITT</title>
            <author initials="S." surname="Mih" fullname="Steven Mih">
              <organization>Action State Group, Inc.</organization>
            </author>
            <date year="2026" month="September"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-mih-scitt-agent-action-capsule-05"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="RFC9338">
          <front>
            <title>CBOR Object Signing and Encryption (COSE): Countersignatures</title>
            <author fullname="J. Schaad" initials="J." surname="Schaad"/>
            <date month="December" year="2022"/>
            <abstract>
              <t>Concise Binary Object Representation (CBOR) is a data format designed for small code size and small message size. CBOR Object Signing and Encryption (COSE) defines a set of security services for CBOR. This document defines a countersignature algorithm along with the needed header parameters and CBOR tags for COSE. This document updates RFC 9052.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="96"/>
          <seriesInfo name="RFC" value="9338"/>
          <seriesInfo name="DOI" value="10.17487/RFC9338"/>
        </reference>
        <reference anchor="RFC9562">
          <front>
            <title>Universally Unique IDentifiers (UUIDs)</title>
            <author fullname="K. Davis" initials="K." surname="Davis"/>
            <author fullname="B. Peabody" initials="B." surname="Peabody"/>
            <author fullname="P. Leach" initials="P." surname="Leach"/>
            <date month="May" year="2024"/>
            <abstract>
              <t>This specification defines UUIDs (Universally Unique IDentifiers) --
also known as GUIDs (Globally Unique IDentifiers) -- and a Uniform
Resource Name namespace for UUIDs. A UUID is 128 bits long and is
intended to guarantee uniqueness across space and time. UUIDs were
originally used in the Apollo Network Computing System (NCS), later
in the Open Software Foundation's (OSF's) Distributed Computing
Environment (DCE), and then in Microsoft Windows platforms.</t>
              <t>This specification is derived from the OSF DCE specification with the
kind permission of the OSF (now known as "The Open Group"). Information from earlier versions of the OSF DCE specification have
been incorporated into this document. This document obsoletes RFC
4122.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9562"/>
          <seriesInfo name="DOI" value="10.17487/RFC9562"/>
        </reference>
        <reference anchor="RFC9942">
          <front>
            <title>CBOR Object Signing and Encryption (COSE) Receipts</title>
            <author fullname="O. Steele" initials="O." surname="Steele"/>
            <author fullname="H. Birkholz" initials="H." surname="Birkholz"/>
            <author fullname="A. Delignat-Lavaud" initials="A." surname="Delignat-Lavaud"/>
            <author fullname="C. Fournet" initials="C." surname="Fournet"/>
            <date month="June" year="2026"/>
            <abstract>
              <t>CBOR Object Signing and Encryption (COSE) Receipts prove properties of a Verifiable Data Structure (VDS) to a verifier. VDSs and associated Proof Types enable security properties, such as minimal disclosure, transparency, and non-equivocation. Transparency helps maintain trust over time and has been applied to certificates, end-to-end encrypted messaging systems, and supply chain security. This specification enables concise transparency-oriented systems by building on Concise Binary Object Representation (CBOR) and COSE. The extensibility of the approach is demonstrated by providing CBOR encodings for Merkle inclusion and consistency proofs.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9942"/>
          <seriesInfo name="DOI" value="10.17487/RFC9942"/>
        </reference>
        <reference anchor="RFC9943">
          <front>
            <title>An Architecture for Trustworthy and Transparent Digital Supply Chains</title>
            <author fullname="H. Birkholz" initials="H." surname="Birkholz"/>
            <author fullname="A. Delignat-Lavaud" initials="A." surname="Delignat-Lavaud"/>
            <author fullname="C. Fournet" initials="C." surname="Fournet"/>
            <author fullname="Y. Deshpande" initials="Y." surname="Deshpande"/>
            <author fullname="S. Lasker" initials="S." surname="Lasker"/>
            <date month="June" year="2026"/>
            <abstract>
              <t>Traceability in supply chains is a growing security concern. While Verifiable Data Structures (VDSs) have addressed specific issues, such as equivocation over digital certificates, they lack a universal architecture for all supply chains. This document defines such an architecture for single-issuer signed statement transparency. It ensures extensibility and interoperability between different transparency services as well as compliance with various auditing procedures and regulatory requirements.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9943"/>
          <seriesInfo name="DOI" value="10.17487/RFC9943"/>
        </reference>
        <reference anchor="I-D.mih-agent-bilateral-attestation">
          <front>
            <title>Bilateral Attestation of Cross-Organization Agent Actions</title>
            <author initials="S." surname="Mih" fullname="Steven Mih">
              <organization>Action State Group, Inc.</organization>
            </author>
            <date year="2026" month="September" day="13"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-mih-agent-bilateral-attestation-02"/>
        </reference>
        <reference anchor="I-D.mih-sokolov-scitt-payload-binding">
          <front>
            <title>Canonicalization Declaration for SCITT Signed Statements</title>
            <author initials="S." surname="Mih" fullname="Steven Mih">
              <organization>Action State Group, Inc.</organization>
            </author>
            <author initials="A." surname="Sokolov" fullname="Anton Sokolov">
              <organization>Tyche Institute</organization>
            </author>
            <date year="2026" month="September" day="11"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-mih-sokolov-scitt-payload-binding-05"/>
        </reference>
        <reference anchor="I-D.mih-zhang-agent-disclosure-bundle">
          <front>
            <title>AAC Evidence Bundle</title>
            <author initials="S." surname="Mih" fullname="Steven Mih">
              <organization>Action State Group, Inc.</organization>
            </author>
            <author initials="Y." surname="Zhang" fullname="Yiqun Zhang">
              <organization>Independent</organization>
            </author>
            <date year="2026" month="September"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-mih-zhang-agent-disclosure-bundle-00"/>
        </reference>
        <reference anchor="I-D.mih-scitt-agent-action-capsule-sel-disc">
          <front>
            <title>Selective Disclosure Profile for Agent Action Capsules</title>
            <author fullname="Steven Mih" initials="S." surname="Mih">
              <organization>Action State Group, Inc.</organization>
            </author>
            <date day="19" month="June" year="2026"/>
            <abstract>
              <t>   This document normatively profiles the per-field selective-disclosure
   extension point reserved in draft-mih-scitt-agent-action-capsule-01
   Section 9.2 (Selective Disclosure).  It defines the salted-hash
   commitment encoding, decoy-digest construction, disclosure format,
   producer requirements, and verifier checks for selectively
   disclosable fields in Agent Action Capsule payloads.  The mechanism
   follows the SD-JWT selective-disclosure model (RFC 9901) — salted-
   hash commitments, decoy digests, and disclosed [salt, name, value]
   triples — using JCS (RFC 8785) canonicalization, which is already the
   base Capsule profile's canonical form.  SD-JWT (RFC 9901) is the JSON
   form; SD-CWT (draft-ietf-spice-sd-cwt) is the CBOR/dCBOR sibling.
   Because the Capsule payload is JSON, this profile uses the SD-JWT
   (JSON) construction, cited alongside the SPICE WG's SD-CWT work for
   SCITT-ecosystem consistency.  Verifier checks are deterministic and
   reproducible from the Capsule bytes plus a provided disclosure set
   alone; no clock, network access, model invocation, or external lookup
   beyond the provided disclosures is required.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-mih-scitt-agent-action-capsule-sel-disc-00"/>
        </reference>
        <reference anchor="I-D.mih-agent-evidence-request">
          <front>
            <title>An Interaction Model for Requesting Verifiable Evidence</title>
            <author initials="S." surname="Mih" fullname="Steven Mih">
              <organization>Action State Group, Inc.</organization>
            </author>
            <date year="2026" month="September" day="26"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-mih-agent-evidence-request-00"/>
        </reference>
        <reference anchor="I-D.ryan-httpauth-payment">
          <front>
            <title>The "Payment" HTTP Authentication Scheme</title>
            <author fullname="Brendan Ryan" initials="B." surname="Ryan">
              <organization>Tempo Labs</organization>
            </author>
            <author fullname="Jake Moxey" initials="J." surname="Moxey">
              <organization>Tempo Labs</organization>
            </author>
            <author fullname="Tom Meagher" initials="T." surname="Meagher">
              <organization>Tempo Labs</organization>
            </author>
            <author fullname="Jeff Weinstein" initials="J." surname="Weinstein">
              <organization>Stripe</organization>
            </author>
            <author fullname="Steve Kaliski" initials="S." surname="Kaliski">
              <organization>Stripe</organization>
            </author>
            <date day="17" month="March" year="2026"/>
            <abstract>
              <t>   This document defines the "Payment" HTTP authentication scheme,
   enabling HTTP resources to require a payment challenge to be
   fulfilled before access.  The scheme extends HTTP Authentication,
   using the HTTP 402 "Payment Required" status code.

   The protocol is payment-method agnostic, supporting any payment
   network or currency through registered payment method identifiers.
   Specific payment methods are defined in separate payment method
   specifications.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ryan-httpauth-payment-01"/>
        </reference>
        <reference anchor="I-D.dogru-cedulon-core">
          <front>
            <title>Spend Receipts and Payment Rail Reconciliation for AI Agents</title>
            <author fullname="Emek Can Doğru" initials="E. C." surname="Doğru">
              <organization>VERAX TEKNOLOJI LIMITED SIRKETI</organization>
            </author>
            <date day="30" month="September" year="2026"/>
            <abstract>
              <t>   This document addresses auditable payments for AI agents and builds
   upon state-of-the-art HTTP 402, AP2 and credit card systems.  We
   specify a cryptographically secured payment reconciliation protocol
   using a Trade Manifest (a signed offer before payment), a Policy
   Decision Point with default deny, a Spend Receipt (a COSE/CWT claim
   set issued after a gated payment), and rail-extract reconciliation.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-dogru-cedulon-core-02"/>
        </reference>
        <reference anchor="X402" target="https://github.com/x402-foundation/x402/blob/main/specs/x402-specification-v2.md">
          <front>
            <title>x402 Protocol Specification, Version 2</title>
            <author>
              <organization>x402 Foundation</organization>
            </author>
            <date year="2026"/>
          </front>
        </reference>
        <reference anchor="X402-OFFER-RECEIPT" target="https://github.com/x402-foundation/x402/blob/main/specs/extensions/extension-offer-and-receipt.md">
          <front>
            <title>x402 Extension: Signed Offer and Receipt (version 0.6)</title>
            <author>
              <organization>x402 Foundation</organization>
            </author>
            <date year="2026" month="February"/>
          </front>
        </reference>
        <reference anchor="AP2" target="https://ap2-protocol.org/ap2/specification/">
          <front>
            <title>Agent Payments Protocol (AP2) Specification, v0.2</title>
            <author>
              <organization>FIDO Alliance</organization>
            </author>
            <date year="2026" month="April"/>
          </front>
        </reference>
        <reference anchor="ACP" target="https://github.com/agentic-commerce-protocol/agentic-commerce-protocol">
          <front>
            <title>Agentic Commerce Protocol</title>
            <author>
              <organization>Agentic Commerce Protocol contributors</organization>
            </author>
            <date year="2026"/>
          </front>
        </reference>
        <reference anchor="UCP" target="https://github.com/Universal-Commerce-Protocol/ucp">
          <front>
            <title>Universal Commerce Protocol</title>
            <author>
              <organization>Universal Commerce Protocol contributors</organization>
            </author>
            <date year="2026" month="January"/>
          </front>
        </reference>
        <reference anchor="BOLT11" target="https://github.com/lightning/bolts/blob/master/11-payment-encoding.md">
          <front>
            <title>BOLT #11: Invoice Protocol for Lightning Payments</title>
            <author>
              <organization>Lightning Network specification contributors</organization>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="BOLT12" target="https://github.com/lightning/bolts/blob/master/12-offer-encoding.md">
          <front>
            <title>BOLT #12: Flexible Protocol for Lightning Payments (including payer proofs)</title>
            <author>
              <organization>Lightning Network specification contributors</organization>
            </author>
            <date year="2026" month="July"/>
          </front>
        </reference>
        <reference anchor="ISO20022" target="https://www.iso20022.org/">
          <front>
            <title>ISO 20022 Financial Services - Universal Financial Industry Message Scheme (message definitions pacs.002, pacs.004, pacs.008, camt.054)</title>
            <author>
              <organization>International Organization for Standardization</organization>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="OPEN-PAYMENTS" target="https://openpayments.dev/">
          <front>
            <title>Open Payments API</title>
            <author>
              <organization>Interledger Foundation</organization>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="CAIP-2" target="https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md">
          <front>
            <title>CAIP-2: Blockchain ID Specification</title>
            <author>
              <organization>Chain Agnostic Standards Alliance</organization>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="CAIP-19" target="https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-19.md">
          <front>
            <title>CAIP-19: Asset Type and Asset ID Specification</title>
            <author>
              <organization>Chain Agnostic Standards Alliance</organization>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="ISO4217">
          <front>
            <title>Codes for the representation of currencies</title>
            <author>
              <organization>International Organization for Standardization</organization>
            </author>
            <date>n.d.</date>
          </front>
          <seriesInfo name="ISO" value="4217:2015"/>
        </reference>
        <reference anchor="AEP" target="https://github.com/A-Comm-Tech/a-comm-evidence-protocol">
          <front>
            <title>A-Comm Evidence Protocol (AEP) Specification v1.0.3-rc.2 (Draft)</title>
            <author>
              <organization>A-Comm Technologies, Inc.</organization>
            </author>
            <date year="2026" month="July"/>
          </front>
        </reference>
      </references>
    </references>
    <?line 1307?>

<section numbered="false" anchor="vectors">
      <name>Conformance Vectors</name>
      <t>The source repository of this document carries conformance vectors in
<tt>vectors/settlement/</tt>. They are generated by a deterministic script from
fixed Ed25519 seeds and RFC 8785 canonical forms, and each case states its
expected states and failure codes. The cases are: a two-party x402
settlement with matching legs and matched delivery; two Lightning payments
of 1000 millisatoshi each where the payee recorded 995 received and a
receive fee of 5, which agree; a receive fee that does not explain the
difference, and an absent receive fee, on Lightning; one-sided payer and
payee settlements; mismatches in asset and in delivered content; amounts
equal at different scales; a two-party BOLT 12 settlement wrapping a payer
proof; an AP2 Payment Receipt wrapped by digest; and negative cases for a
re-signed wrapped object, a wrapped object whose content does not match its
digest, a floating-point amount, a decimal-fraction amount string, an
unknown payment reference type, and a payee-observed leg sealed with the
payer's key.</t>
    </section>
    <section numbered="false" anchor="example">
      <name>Example</name>
      <t>A payer-observed leg for an x402 payment of 1.5 USDC on Base (the Capsule's
other members abbreviated):</t>
      <sourcecode type="json"><![CDATA[
{
  "action_id": "settle-0001-payer",
  "action_type": "fyi",
  "canonicalization_id": "jcs",
  "format_version": "4",
  "settlement": {
    "version": "0",
    "leg": "payer_observed",
    "sealer_role": "payer",
    "terms_ref": "<capsule_id of the terms leg>",
    "payment_ref": {
      "type": "x402.transaction",
      "value": "0x5a1f...c3d2",
      "network": "eip155:8453"
    },
    "amount": {
      "value": "1500000",
      "assetCode": "eip155:8453/erc20:0x8335...2913",
      "assetScale": 6
    },
    "routing_fee": {
      "value": "0",
      "assetCode": "eip155:8453/erc20:0x8335...2913",
      "assetScale": 6
    },
    "status": "settled",
    "observed_at": "2026-10-01T12:00:05Z",
    "wrapped": [
      {"type": "x402.payment-payload",
       "digest_alg": "SHA-256",
       "digest": "<SHA-256 of the PAYMENT-SIGNATURE octets>"}
    ]
  }
}
]]></sourcecode>
    </section>
    <section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>This document was shaped by the public discussion of offer digests, delivery
hashes, and offline-verifiable receipts in the x402 community, by the AP2
receipt model, by the BOLT 12 payer proof work, and by the AEP and Cedulon
drafts.</t>
    </section>
  </back>

</rfc>
