# x402 receipts: how an agent proves it paid

> Where proof of an x402 payment lives: the PAYMENT-RESPONSE header, the transaction hash, signed receipts from the offer-receipt extension, and retry keys.

Published 2026-11-08. Source: https://toolvet.app/blog/x402-payment-receipt-proof

**Short answer:** x402 gives you three kinds of evidence that a payment happened, each weaker or stronger in a different way. The first comes with every paid response: a `PAYMENT-RESPONSE` header (or `_meta["x402/payment-response"]` over MCP) holding a `SettlementResponse` with `success`, `transaction`, `network`, `payer` and, when applicable, the settled `amount`. The second is the chain itself: the `transaction` hash lets anyone look the transfer up, but it is an empty string when nothing was broadcast, which is the normal case for `batch-settlement`. The third is a signed receipt from the optional `offer-receipt` extension, in which the server signs `resourceUrl`, `payer`, `network` and `issuedAt` with EIP-712 or JWS so the artifact can be verified later by someone who was not in the conversation. Only the third proves the *server* acknowledged delivery, and only if you also check that the signing key was authorized for that resource. As of 8 November 2026 the extension ships in `@x402/extensions` and has since 2.7.0 on 16 March 2026, and a separate `payment-identifier` extension gives retries an idempotency key so a flaky connection does not turn one payment into two.

Some background: an x402 payment is a signed authorization that a facilitator settles on-chain, in the default `authorization` flow after the resource server has run the request ([how the loop works](https://toolvet.app/blog/paid-mcp-tools-x402-over-mcp); the `upfront` and `escrow` flows settle before it, see [schemes compared](https://toolvet.app/blog/x402-payment-schemes-exact-upto-batch-settlement)). The client never sees the settlement happen; it sees the response. So "did I pay, and for what" is answered by whatever the server chose to put in that response, plus whatever the chain records. ToolVet never pays the endpoints it lists, so it holds no receipts; what it records is the challenge side, price, pay-to address and whether the endpoint answered, on a schedule ([how we check and score](https://toolvet.app/methodology)). This post is about the half ToolVet cannot see.

## 1. The settlement response

The [v2 HTTP transport](https://github.com/x402-foundation/x402/blob/main/specs/transports-v2/http.md) says "Servers communicate payment settlement results using the `PAYMENT-RESPONSE` header", a base64-encoded `SettlementResponse`. Decoded, the spec's example is:

```json
{
  "success": true,
  "transaction": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
  "network": "eip155:84532",
  "payer": "0x857b06519E91e3A54538791bDbb0E22373e36b66"
}
```

The [core spec's field table](https://github.com/x402-foundation/x402/blob/main/specs/x402-specification-v2.md) makes `success`, `transaction` and `network` required and `payer`, `amount`, `errorReason`, `errorMessage` and `extensions` optional. Three details decide what this header is worth as evidence. `transaction` is "empty string if no transaction was broadcast", and "MUST be non-empty when `errorReason` is `settlement_pending`", so an empty hash with `success: true` is not an error; it means value did not move on-chain in this request. `amount` is "the actual amount settled in atomic units", which is the number to log for an `upto` payment, where the challenge only told you the ceiling. And a failed settlement comes back as another `402` whose `PAYMENT-RESPONSE` has `success: false` and an `errorReason` such as `insufficient_funds`; [x402 settlement failed or pending](https://toolvet.app/blog/x402-settlement-failed-or-pending) covers that branch.

Over MCP the same object travels in the tool result's `_meta["x402/payment-response"]` field, per the [MCP transport spec](https://github.com/x402-foundation/x402/blob/main/specs/transports-v2/mcp.md).
What this header proves: that the server *said* settlement succeeded. It is unsigned, and it is written by the party you just paid. Earlier posts here call it the receipt, and for reconciling against the chain it is: it is the only place the settled `amount` appears, and normally the only place the hash does. It is not a signed statement from the seller.

## 2. The transaction hash

For `exact`, and for `upto` on EVM, settlement is one on-chain transfer, and the `transaction` field names it. (`upto` on Solana runs the `escrow` flow through a payment channel, a deposit and a later claim, so check `extra.paymentFlow` in the challenge.) Anyone with the hash and the CAIP-2 `network` can confirm on a block explorer or an RPC node that `amount` of `asset` went from `payer` to `payTo` in that transaction. That is the strongest evidence x402 offers about the money, and it needs no cooperation from the server after the fact.

It does not cover every scheme. In [`batch-settlement`](https://github.com/x402-foundation/x402/blob/main/specs/schemes/batch-settlement/scheme_batch_settlement.md) "value moves later", and the settlement result carries "a commitment identifier" rather than a transaction hash. The [EVM binding](https://github.com/x402-foundation/x402/blob/main/specs/schemes/batch-settlement/scheme_batch_settlement_evm.md) spells out the voucher-only response: `transaction` is `""`, the top-level `amount` is `""`, and the charge for this request is in `extra.chargedAmount`, next to an `extra.channelState` snapshot with the channel's `balance` and `totalClaimed`; the EVM binding exposes no separate identifier field, so the channel snapshot is what you get. The on-chain record, when it eventually exists, is a batched claim covering many requests, so a single request has no transaction of its own. If your audit trail needs one hash per call, `batch-settlement` is the wrong scheme for you, whatever its fee advantages.

The hash also says nothing about delivery. A transfer confirms that money moved to `payTo`; it does not record which URL you called, whether the server returned a result, or what terms it had offered. For that you need the server to sign something.

## 3. Signed offers and receipts

The [offer-receipt extension](https://github.com/x402-foundation/x402/blob/main/specs/extensions/extension-offer-and-receipt.md) "adds **server-side signatures** to x402": a signed *offer* in the `402` response committing to the terms of each `accepts[]` entry, and a signed *receipt* "returned by the resource server only on success, confirming that payment was received and service was delivered". Its stated uses are "dispute evidence and auditability", user-review attestations and "verifiable proof of commercial interactions for reputation systems".

Both artifacts have the same shape: a `format` of `"eip712"` or `"jws"`, a `signature`, and for EIP-712 a `payload` (for JWS the payload is inside the compact serialization). Offers live at `extensions["offer-receipt"].info.offers[]` in the challenge and carry `version`, `resourceUrl`, `scheme`, `network`, `asset`, `payTo`, `amount` and an optional `validUntil`. The receipt lives at `extensions["offer-receipt"].info.receipt` inside the `SettlementResponse`, so inside the `PAYMENT-RESPONSE` header, and carries `version`, `network`, `resourceUrl`, `payer`, `issuedAt` and an optional `transaction`. The spec calls the receipt "privacy-minimal by default": the hash is omitted "to reduce correlation risk", and servers include it only "when stronger verifiability is preferred over privacy". The EIP-712 domain is `name: "x402 receipt"`, `version: "1"`, `chainId: 1` whatever the payment network, because the signature is an off-chain format here and the network is already in the payload; the spec still restricts EIP-712 artifacts to `eip155:` networks and EVM `payTo` addresses, and the SDK docs point Solana-native servers to JWS with Ed25519 keys.

On the server, the [TypeScript docs](https://github.com/x402-foundation/x402/blob/main/docs/extensions/offer-receipt.mdx) show it as middleware: `registerExtension(createOfferReceiptExtension(offerReceiptIssuer))` on the resource server and `declareOfferReceiptExtension({ includeTxHash: false })` per route, with no change to handlers. Offers are valid for 300 seconds by default. The docs insist on a dedicated signing key: "The signing key used for offers and receipts should be a dedicated signing key, not the wallet that receives payments (`payTo`)". On the client, `extractReceiptFromResponse`, `verifyReceiptSignatureEIP712` or `verifyReceiptSignatureJWS`, and `verifyReceiptMatchesOffer` check that the receipt's `resourceUrl` and `network` match the offer you accepted, that `payer` is one of your wallets and that `issuedAt` is recent, within an hour by default.

The step the SDK leaves to you is in the spec's section on signer authorization: "A valid signature proves that a specific key signed the artifact. It does not prove that the key was authorized to sign on behalf of the service identified by `resourceUrl`." Without that check, "an attacker can generate a valid key pair, sign an offer or receipt for any `resourceUrl`, and present it as legitimate". The spec makes the check a MUST but mandates no mechanism; it lists four: the signer is the `payTo` address itself (simplest, but it couples the payment key to the signing key); a `did:web` document at `/.well-known/did.json` on the resource's domain, which is what a `did:web` `kid` in a JWS header resolves to (the SDK also accepts `did:key` and `did:jwk`); a DNS TXT record at `_controllers.<domain>` listing controller DIDs; or an external registry such as on-chain attestations. For a receipt you verify months later, after a key rotation, the spec adds that verifiers "SHOULD evaluate signer authorization as of the receipt's `issuedAt` time", so the mutable sources (DID document, DNS) need an immutable companion.

## 4. Making retries safe: `payment-identifier`

Evidence is only useful if it maps to one payment. A client that times out after sending `PAYMENT-SIGNATURE` and retries may pay twice. The [payment-identifier extension](https://github.com/x402-foundation/x402/blob/main/specs/extensions/payment_identifier.md) lets a client attach an `id` of 16 to 128 characters (the spec recommends a prefixed UUID v4 such as `pay_7d5d…`) that "serves as an idempotency key" for the resource server, the facilitator or both. The behaviour table: a new `id` is processed normally, the same `id` with the same payload "return[s] cached response", the same `id` with a different payload gets `409 Conflict`, and if the server advertised `required: true` a payload without `id` gets `400 Bad Request`. Servers are told to bind the `id` to a fingerprint of scheme, network, asset, amount, `payTo`, path and method before serving a cached result. A server advertises support in the challenge's `extensions["payment-identifier"]` block; look for it, and reuse the same `id` on every retry of the same request.

## What to keep, if you build an agent

Store the decoded `PAYMENT-RESPONSE` of every paid call with the request URL, the `accepts` entry you chose and your `payment-identifier` `id`. For `exact` and `upto` you then hold a hash per call that anyone can check on-chain; for `batch-settlement` you hold `extra.chargedAmount` and the channel state, and the on-chain evidence arrives later in bulk. When a server offers `offer-receipt`, keep the signed offer with the receipt, verify the signature, verify the receipt against the offer, and decide how you will establish that the signer was authorized for that `resourceUrl`, because the SDK's verify functions check the signature, not the authorization. And before any of this, verify the challenge: a signed offer and receipt prove what the server quoted and that it delivered, not that the quote was fair. The free [x402 checker](https://toolvet.app/check) and the `preflight_check` tool on the [ToolVet MCP server](https://toolvet.app/agents) compare the challenge's price and pay-to address with what ToolVet has seen for that endpoint, and every listing's [status page](https://toolvet.app/browse) shows when either last changed.

## Frequently asked questions

### Does x402 give me a receipt for a payment?

Every paid response carries a `PAYMENT-RESPONSE` header (or `_meta["x402/payment-response"]` over MCP) with the settlement result: `success`, `transaction`, `network`, `payer` and optionally the settled `amount`. It is unsigned. A signed receipt that confirms delivery exists only if the server runs the optional `offer-receipt` extension, which puts it inside the same settlement response under `extensions["offer-receipt"].info.receipt`.

### Why is the transaction field empty in my x402 PAYMENT-RESPONSE?

The spec defines `transaction` as an empty string when no transaction was broadcast. With `batch-settlement` that is the normal case: the request is charged against a payment channel, the charge is in `extra.chargedAmount`, and the on-chain claim happens later in a batch. With `exact` or `upto`, an empty hash alongside `success: true` is unusual and worth raising with the provider.

### How do I verify an x402 signed receipt?

Check the signature with the matching function for its `format` (EIP-712 with the domain `x402 receipt`, version `1`, chain ID `1`, or JWS with the key resolved from the `kid`), check that `resourceUrl`, `network` and `payer` match the offer you accepted and your wallet, check `issuedAt`, and then confirm the signing key was authorized for that resource, through the `payTo` address, a `did:web` document, a DNS TXT record or an external attestation. A valid signature alone proves only that some key signed it.

### How do I stop an x402 retry from paying twice?

Use the `payment-identifier` extension when the server advertises it: generate an `id` of 16 to 128 characters once per request and send the same `id` on every retry. A server or facilitator that implements it returns the cached response for a repeated `id` with the same payload and `409 Conflict` for a repeated `id` with a different one.

Everything quoted above is from the x402 core and transport specifications, the offer-receipt and payment-identifier extension specifications and the SDK documentation in the x402 repository as read on 8 November 2026, with package dates from the npm registry. [How we check and score](https://toolvet.app/methodology) explains what ToolVet records about an endpoint without paying it.
