> For the complete documentation index, see [llms.txt](https://docs.metamynd.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.metamynd.ai/agent-controls-agentsafe/settlement-and-settlement-evidence.md). Agents can also search and read this documentation through its [MCP server](https://docs.metamynd.ai/~gitbook/mcp).

# Settlement & Settlement Evidence

The authorize gate answers "may this agent do this?". This page covers everything after a `allow`: how the service that executes the action **claims** the authorization exactly once, how it **settles** it, what happens when the outcome is ambiguous, and what the recorded settlement **rests on**. It is the protocol reference for [Holds, Claims & Exactly-Once Execution](https://docs.metamynd.ai/core-concepts/holds-claims-and-exactly-once-execution).

Normative text: [MAGP §8.7, §12 and §13.6](https://metamynd.ai/developers/spec).

### The lifecycle

```mermaid
stateDiagram-v2
    [*] --> authorized: authorize → allow (hold created)
    authorized --> dispatching: claim (effect/dispatching)
    authorized --> [*]: void, or hold window passes (auto-void)
    dispatching --> dispatched: effect/dispatched
    dispatching --> succeeded: capture
    dispatched --> succeeded: capture
    dispatching --> cancelled: void by the claimer
    dispatching --> unknown: effect/unknown
    dispatched --> unknown: effect/unknown
    unknown --> reconciling: effect/reconcile · force-reconcile
    reconciling --> succeeded: observer / operator
    reconciling --> failed_final: observer / operator
    reconciling --> compensation_required: over-settlement
    compensation_required --> compensating
    compensating --> compensated
    compensating --> compensation_failed
```

1. **Hold.** A permit for a value-bearing action atomically reserves the amount against the mandate's cap. The verdict's `authorizationId` names the hold.
2. **Claim.** The executing service claims the hold before it runs anything. Exactly one claimant wins.
3. **Execute.** The service performs the action upstream, sending the `authorizationId` as the upstream's `Idempotency-Key`.
4. **Settle.** The service **captures** what was actually charged, **voids** a hold whose action provably did not happen, or marks the effect **unknown** when it cannot tell — never guessing.
5. **Reconcile** (only if unknown). The settlement observer, or an operator, decides what happened.

**Unclaimed holds lapse; claimed holds do not**

A hold nobody has claimed expires and auto-voids after the hold window (15 minutes by default; deployment-configurable), returning its budget. Once a counterparty has claimed a hold, the action may already have happened, so the reservation **stays against the cap until it is settled** — it does not lapse with the TTL — and no caller other than the claimer may lower or release it. Revoking the mandate releases only unclaimed holds; claimed ones are left to settle or reconcile (`claimedHoldsLeft` in the revoke response).

### Who may call what

| Call                                      | Route (`POST /policy/mandate/authorize/{id}/…` unless noted) | Who                                                                                                                                                                                           |
| ----------------------------------------- | ------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Claim                                     | `effect/dispatching`                                         | Any service — signed (`MAGP-SERVICE-v1`) or anonymous. On **mainnet** holds, and for owners who have registered any trusted counterparty, only an active registered, signed counterparty.     |
| Report dispatched                         | `effect/dispatched`                                          | Any caller (public).                                                                                                                                                                          |
| Capture at the **full** authorized amount | `capture`                                                    | Anyone holding the authorization id.                                                                                                                                                          |
| Capture **below** the authorized amount   | `capture`                                                    | Before any claim: anyone (it is a release — `unclaimed_lowered`). After a claim: **only the claimer**, and subject to the payee directory and, for x402-bound holds, the settlement observer. |
| Void                                      | `void`                                                       | Before any claim: anyone. After a claim: **only the claimer**, and for an x402-bound hold only if the observer affirms nothing settled.                                                       |
| Mark unknown                              | `effect/unknown`                                             | The **claimer**, the **owner** of the hold's mandate (session), or a platform **admin**.                                                                                                      |
| Ask for reconciliation                    | `effect/reconcile`                                           | The **claimer**, the **owner**, or an **admin**.                                                                                                                                              |
| Force into reconciliation                 | `effect/force-reconcile`                                     | The **owner** of the hold's mandate, or an **admin**.                                                                                                                                         |
| Refund (full or partial)                  | `refund`                                                     | The **claimer** (signed under `refund`, or an anonymous claimer's claim token), the **owner**, or an **admin**.                                                                               |
| Operator resolution / compensation        | `effect/resolve`, `effect/compensate/*`                      | Platform **admin**.                                                                                                                                                                           |
| Outcome lookup                            | `GET …/effect`                                               | Anyone (public).                                                                                                                                                                              |

"The claimer" means the identity that signed the claim, or — for an anonymous claim — whoever presents the `claimToken` that claim returned. A signed claim is preferred: it gets no bearer token (so there is nothing to leak to the agent), and the claimer is recorded on the tamper-evident effect chain. Once a hold has been force-reconciled, the claimer has no powers over it at all.

### The claim

```http
POST /api/v1/policy/mandate/authorize/7c1e…/effect/dispatching
Idempotency-Key: 3f9a1c0e8b7d4e2a9c6f1b0d5e8a7c3b
x-magp-payload-digest: sha256:9b1f…
x-magp-service-did: did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK
x-magp-service-nonce: 5b0c2f7e91d44a6b
x-magp-service-issued-at: 2026-09-25T10:15:02Z
x-magp-service-signature: 8e4d…
Content-Type: application/json

{ "x402": true }
```

* **`Idempotency-Key`** (optional, recommended): 32–128 characters of `[A-Za-z0-9._:~-]`, fresh per claim *call*, reused only to retry that call. It must not contain the authorization id (the agent knows that). A retry whose response was lost gets the original grant back with `replayed: true` — but only while the effect is still `dispatching` and the hold still held; after it was settled, released or went unknown the retry is `AUTHORIZATION_ALREADY_CLAIMED`. A malformed key is `400 IDEMPOTENCY_KEY_INVALID`, never ignored.
* **`x-magp-payload-digest`**: the digest of exactly what the service is about to execute. If the agent bound a payload at authorize, the issuer compares the two before it grants the claim: a different digest is `403 PAYLOAD_DIGEST_MISMATCH` and the hold stays claimable by an honest executor. See [Payload Binding](https://docs.metamynd.ai/core-concepts/payload-binding).
* **`x-magp-service-*`**: the service's signed identity. Signed fields for a claim are the idempotency key, then `payload=<digest>`. See [Request Signing](https://docs.metamynd.ai/agent-protocol/request-signing-and-message-format#service-counterparty-signature).
* **`x402: true`** in the body marks the hold **x402-bound**: its settlement will be checked by the settlement observer (below). It only ever widens which checks apply.

A successful claim:

```json
{
  "success": true,
  "message": "Effect dispatching",
  "data": {
    "ok": true,
    "effectState": "dispatching",
    "reasonCode": "DISPATCHING",
    "agentDid": "did:hedera:testnet:…",
    "action": "flight-purchase",
    "amount": 150,
    "currency": "USD",
    "merchant": "skyward-air",
    "payloadDigest": "sha256:9b1f…"
  }
}
```

The grant carries the hold's own bound values, so the service can confirm the authorization it claimed is for the transaction it is about to run (the SDK guards refuse `AUTHORIZATION_*_MISMATCH` otherwise). An **anonymous** claim's grant also carries `claimToken` — keep it server-side; it is what lets you settle lower or release later. Every other claimant gets `409 AUTHORIZATION_ALREADY_CLAIMED`; see the full refusal list under [Settlement-surface codes](https://docs.metamynd.ai/agent-protocol/reason-code-registry#settlement-surface-codes).

After a grant, the service executes and sends the `authorizationId` upstream as `Idempotency-Key`, so an upstream that de-duplicates makes the effect exactly-once even if the service is asked to run the same call twice.

**Who may claim**

A claim is decided against the **trusted-counterparty registry** of the owner of the hold's mandate:

* A hold whose agent is a **mainnet** identity is always registered-only.
* An owner who has registered **any** entry (even a revoked one) is registered-only, and it fails closed: revoking the last entry stops every claim until one is registered again.
* A deployment can make every owner registered-only; otherwise a testnet owner with no entries is open to any claimant.

Under enforcement an anonymous claim is `COUNTERPARTY_AUTH_REQUIRED`, an unregistered signer `COUNTERPARTY_NOT_REGISTERED`, and a merchant-scoped entry claiming another merchant's hold `COUNTERPARTY_NOT_ALLOWED_FOR_MERCHANT` (all 403; the hold stays claimable). See [Trusted Counterparties & Payee Directory](https://docs.metamynd.ai/core-concepts/trusted-counterparties-and-payee-directory).

### Capture

```http
POST /api/v1/policy/mandate/authorize/7c1e…/capture
x-magp-service-did: did:key:z6Mk…
x-magp-service-nonce: …
x-magp-service-issued-at: …
x-magp-service-signature: …

{
  "amountCharged": 140,
  "bookingRef": "PNR-QX7R2B",
  "settlementTxHash": "0.0.4815162@1758790000.123456789",
  "payTo": "0.0.2342"
}
```

Body: `{ amountCharged, bookingRef?, settlementTxHash?, claimToken?, payTo? }`. Signed fields: `amountCharged`, `bookingRef`, `settlementTxHash`. **`payTo` is not a signed field** — it is only read once the caller has already proven it is the claimer.

```json
{
  "success": true,
  "message": "Captured",
  "data": {
    "captured": true,
    "authorizationId": "7c1e…",
    "amountCharged": 140,
    "authorizedAmount": 150,
    "settlementEvidence": "independently_confirmed",
    "settlementTxHash": "0.0.4815162@1758790000.123456789",
    "proofRef": "…",
    "receipt": { "executionReceiptId": "…", "payloadMatch": true, "signature": "…", "issuerKeyId": "…", "issuedAt": "…" }
  }
}
```

The rules, in order:

* `amountCharged` may never exceed the authorized amount (`400 AMOUNT_EXCEEDS_AUTHORIZED`).
* **At the full amount** nothing needs proving — it can only spend more.
* **Below the full amount on a claimed hold** the caller must be the claimer (`403 COUNTERPARTY_MISMATCH` otherwise). Then:
  1. If the owner registered payee accounts for this merchant, `payTo` must be one of them (`PAYEE_NOT_REGISTERED`; `PAYEE_NOT_VERIFIED` if the directory cannot be read).
  2. If the hold is **x402-bound**, the settlement observer must confirm the lower figure (below). Otherwise it is refused (`SETTLEMENT_NOT_CONFIRMED`, `SETTLEMENT_AMOUNT_MISMATCH`, `SETTLEMENT_NOT_FOUND`) and the amount recorded, when it is confirmed, is the one the observer saw.
  3. With no observer applying, the claimer's figure is recorded as `counterparty_attested`.
* A hold the owner forced into reconciliation cannot be captured at all by a caller (`409 HOLD_UNDER_RECONCILIATION`).
* An effect marked `unknown` cannot be captured on faith: reconcile it (`409 EFFECT_NOT_CAPTURABLE`).
* An unclaimed hold past its window can no longer be captured (its budget was already returned) — re-authorize (`409 AUTHORIZATION_EXPIRED`).
* A hold whose Action Passport is expired, consumed or revoked is refused with that code (`400 PASSPORT_EXPIRED` · `PASSPORT_ALREADY_CONSUMED` · `PASSPORT_REVOKED`). Only a counterparty's capture is checked: when reconciliation (or an operator) settles the hold, it records what happened remotely and a stale passport does not stop it.
* A capture that loses a race — the hold was claimed, settled or voided between the read and the write — captures nothing (`409 HOLD_STATE_CHANGED`).

A **refused** capture has the same body as a refused void or refund: the bare code as the `message`, and the explanatory sentence in `data.detail` — branch on the code, never on the sentence. Every refusal has a code, and its HTTP status follows from the code alone (the [Reason Code Registry](https://docs.metamynd.ai/agent-protocol/reason-code-registry) lists them):

```json
{
  "success": false,
  "message": "HOLD_UNDER_RECONCILIATION",
  "data": {
    "captured": false,
    "authorizationId": "7c1e…",
    "reasonCode": "HOLD_UNDER_RECONCILIATION",
    "detail": "HOLD_UNDER_RECONCILIATION: the owner has put this hold into reconciliation — it settles only on what the settlement observer or an operator establishes"
  }
}
```

Every refused capture uses this shape, including the state refusals above (already settled, expired, over the authorized amount, lowered by a non-claimer, an unusable passport, a lost race). An unknown authorization id is `404 AUTHORIZATION_NOT_FOUND` on capture, void and refund. A capture — or a claim — of an **unclaimed** hold whose mandate (or a mandate it was delegated from) has been revoked is `409 MANDATE_REVOKED`, and `409 DELEGATION_CHAIN_BROKEN` when a delegated mandate's chain can't be walked to its root; void it instead (a revoke normally voids it itself).

Capture issues an **execution receipt** (below) and consumes the hold's Action Passport. Capture is **not idempotent**: a repeat answers `409 NOT_HELD`. After a timeout or a dropped connection, read `GET …/effect` before retrying — `outcome: settled` means the first call landed.

### Void

```http
POST /api/v1/policy/mandate/authorize/7c1e…/void
{ "reason": "upstream declined", "claimToken": "…" }
```

* An unclaimed hold is released by anyone: `200 { voided: true, reasonCode: "HOLD_VOIDED" }`.
* A claimed hold can be released only by its claimer — releasing it is the same as settling at zero. For an **x402-bound** hold the observer must **affirm** that nothing was settled; silence or an absent record is not that (`400 SETTLEMENT_NOT_CONFIRMED`). If you cannot prove the action did not happen, mark it unknown instead. **With a facilitator configured, a claimer can never void a claimed x402-bound hold**: a release carries no transaction id for the mirror-node observer, and the facilitator observer affirms a failure only from a per-authorization settlement record the standard facilitator routes don't serve. This fail-closed result is intended — capture, or mark the effect unknown.
* A void by anyone other than the claimer of a claimed hold is **HTTP 403** `COUNTERPARTY_MISMATCH`.
* A void of an effect already `dispatched` or `unknown` is **HTTP 409** `EFFECT_NOT_VOIDABLE`: it may have happened, so it is reconciled, never voided.
* The other refusals are **HTTP 409** too: `HOLD_UNDER_RECONCILIATION` (the owner forced reconciliation) or `CLAIMED` (a claim landed while the void was in flight). Every refused void carries the bare code as the `message` and `data: { voided: false, authorizationId, reasonCode, detail }` — the same shape as a refused capture or refund.
* A void of a hold already settled or released is `200 { voided: false, reasonCode: "NOT_HELD" }` — not an error, and usually a sign the first void already landed.

### Unknown and reconcile

When a service cannot tell whether its upstream call took effect (a timeout, a 5xx, a dropped connection), it must not capture on faith or void on hope. It marks the effect **unknown**:

```http
POST /api/v1/policy/mandate/authorize/7c1e…/effect/unknown
{ "reason": "upstream timeout" }
```

That freezes the hold out of capture and void; only reconciliation can resolve it. Then:

```http
POST /api/v1/policy/mandate/authorize/7c1e…/effect/reconcile
```

Reconciliation asks the settlement observer (up to 8 s) and resolves to `succeeded`, `failed_final`, `compensation_required`, or leaves the effect `reconciling` for an operator (`NEEDS_HUMAN`). A settlement larger than the authorization is never absorbed: it goes to `compensation_required` (`SETTLED_OVER_AUTHORIZED`) for a person to decide. Both routes accept only the claimer, the owner of the hold's mandate, or an admin (`403 COUNTERPARTY_MISMATCH` / `403 RECONCILE_NOT_PERMITTED` otherwise). Both are rate-limited, and reconcile has a short per-authorization cooldown (`429 RECONCILE_COOLDOWN` with `Retry-After`).

An operator decides a `reconciling` effect with `effect/resolve` (`{ resolution, settledAmount?, settlementTxHash?, remoteRef? }`), recorded as `operator_resolved`.

Operator routes refuse in the standard shape: a caller who is not an operator is `403 FORBIDDEN`; a malformed request is `400 MALFORMED_REQUEST` with the validation issues in `data.issues`; an unknown id is `404 AUTHORIZATION_NOT_FOUND`; a refusal by the effect's state keeps its code and `409`.

### Owner-forced reconciliation

An owner who no longer trusts the counterparty holding a claim — typically one just revoked from the registry — can take the hold out of its hands:

1. `GET /policy/counterparties/{id}/claimed-holds` lists the holds that counterparty still has claimed and unsettled.
2. `POST /policy/mandate/authorize/{id}/effect/force-reconcile` (owner session) moves each to `reconciling` with the owner recorded as the actor, and asks the observer right away.

The budget stays committed, and from then on the claimer has none of its powers — no caller-side capture or void applies, not even at the full amount (`HOLD_UNDER_RECONCILIATION`). The hold settles only on what the observer establishes or an operator decides. Nothing is released or reassigned: a hold that may have executed must not run twice. In the dashboard this is **Trusted Counterparties → claimed holds → Force into reconciliation**.

### Refund

`POST …/refund { amount?, reason? }` is a **record-only** reversal of a captured hold: MetaMynd moves no money (returning funds is the counterparty's or facilitator's job), but the cumulative cap counts less, so the budget genuinely comes back. Omit `amount` to refund everything still captured. Only the hold's **claimer** may refund it — a signed claimer signs under its own action `refund` (fields: `amount`, the empty string for a full refund, then `reason`), so a void signature can never stand for a refund; an anonymous claimer sends `claimToken` — or the hold's owner or an admin. Anyone else: **HTTP 403** `COUNTERPARTY_MISMATCH`. A hold captured without ever being claimed can be refunded only by its owner or an admin. The other refusals use the same body as a refused capture or void (`data: { refunded: false, authorizationId, reasonCode, detail }`): **HTTP 409** `NOT_CAPTURED` (the hold is not captured), `ALREADY_REFUNDED` (nothing remains), `HOLD_STATE_CHANGED` (another refund landed first — read the hold and retry); **HTTP 400** `AMOUNT_EXCEEDS_REFUNDABLE` (more than remains).

```json
{ "authorizationId": "7c1e…", "refunded": true, "refundAmount": 40, "remainingCaptured": 100, "reasonCode": "REFUNDED" }
```

### The outcome lookup

`GET /policy/mandate/authorize/{id}/effect` is public and answers the question a retrying caller actually has — did it happen, and is a retry safe?

```json
{
  "authorizationId": "7c1e…",
  "effectState": "succeeded",
  "spendStatus": "captured",
  "transitions": 3,
  "outcome": "settled",
  "nothingExecuted": false,
  "retrySafe": false,
  "claimed": true,
  "claimedAt": "2026-09-25T10:15:02.412Z",
  "currency": "USD",
  "authorizedAmount": 150,
  "settledAmount": 140,
  "settlementEvidence": "independently_confirmed",
  "updatedAt": "2026-09-25T10:15:09.051Z"
}
```

| `outcome`                                    | Meaning                                                          | `nothingExecuted` | `retrySafe` |
| -------------------------------------------- | ---------------------------------------------------------------- | ----------------- | ----------- |
| `not_started`                                | authorized, unclaimed, inside its hold window                    | `true`            | `false`     |
| `expired`                                    | unclaimed, past its window; budget already returned              | `true`            | `true`      |
| `not_executed`                               | voided before a claim, cancelled by its claimer, or failed clean | `true`            | `true`      |
| `in_flight`                                  | claimed (`dispatching` / `dispatched`)                           | `false`           | `false`     |
| `settled`                                    | settled; the spend is committed                                  | `false`           | `false`     |
| `unknown`                                    | ambiguous or under reconciliation                                | `false`           | `false`     |
| `reversing` / `reversed` / `reversal_failed` | settled, then compensated                                        | `false`           | `false`     |

`retrySafe` is the **only** safe basis for re-authorizing the same intent. It is `false` for `not_started` because that hold can still be claimed until its window closes — to retry, void it first and read `not_executed`. Never retry an `unknown` or `in_flight` outcome blindly. The lookup never carries a claim token or the claimer's identity.

### Authorized amount, settled amount, and settlement evidence

The gate records the amount it **authorized** once, with the hold, and never overwrites it. The **settled** amount is what the cumulative cap then counts. Both are reported (`authorizedAmount`, `settledAmount`), together with what the settled figure rests on:

| `settlementEvidence`       | Meaning                                                                                                                                                                      |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `unattested`               | The full authorized amount, counted for a caller that is not the claiming counterparty. It asserts nothing about what was charged — only the most the authorization allowed. |
| `unclaimed_lowered`        | Settled **below** the authorization **before** any claim. Nothing can have executed, so it is a release, not a report of a charge.                                           |
| `counterparty_attested`    | The claiming counterparty reported the amount. Believed because of who said it; nothing confirmed it.                                                                        |
| `independently_confirmed`  | The settlement observer saw this amount on the remote system.                                                                                                                |
| `operator_resolved`        | A platform operator, resolving an ambiguous effect, decided the amount.                                                                                                      |
| `reconciled_at_authorized` | The remote system confirmed the effect occurred but reported no amount, so the full authorized amount is counted.                                                            |

A hold captured before the authorized amount was stored reports `authorizedAmount: null` — unknown, neither zero nor the settled amount.

**The settlement observer (x402-bound holds only)**

Only holds claimed with `x402: true` are independently observed:

* **The Hedera mirror node is the only observer that can confirm a lowered settlement.** It needs the transaction id (`settlementTxHash`, `0.0.X@seconds.nanos`) **and** `payTo`, and checks on the public mirror node that the transaction succeeded and credited `payTo` with a matching amount (HBAR at the network exchange rate, or a configured HTS stablecoin).
* **The x402 facilitator probe never confirms.** The deployed facilitator keeps no per-authorization settlement record, so it can only answer "unknown" — which refuses a lowered settlement and a post-claim release. It fails closed.
* **Non-x402 holds are not probed.** A claimer's lowered settlement on them is recorded as `counterparty_attested`.

Details and rationale: [x402 Payment Binding](https://docs.metamynd.ai/agent-protocol/x402-payment-binding#x402-bound-holds-and-the-settlement-observer).

### Execution receipts

Capture issues a signed **execution receipt**, a standalone Ed25519 signature over a canonical sorted-key JSON message — verifiable with nothing but the issuer's published key (`GET /action-passport/pubkey`), no anchored root and no Merkle path. It binds what was charged back to the [Action Passport](https://docs.metamynd.ai/verifai-trust-layer/action-passport) the action was authorized against.

* **Receipt version 1** signs nine fields: `executionReceiptId`, `actionPassportId`, `authorizationId`, `agentDid`, `authorizedPayloadDigest`, `executedPayloadDigest`, `payloadMatch`, `outcomeStatus`, `issuedAt`.
* **Receipt version 2** adds `settlementEvidence`, so a relying party checking the signature also gets a tamper-evident answer to how sure the platform was that the settlement was real. Older receipts still verify under their original nine-field message.
* `payloadMatch` states whether the amount charged is within the authorized amount (`amountCharged ≤ authorizedAmount`). It is not a comparison of payloads — the payload comparison happens at the claim.

`GET /action-passport/receipt/verify/{authorizationId}` (public, rate-limited) answers `integrityValid`, `payloadMatch`, `outcomeStatus` and `settlementEvidence` for any relying party.

### SDK helpers

| Package                                                                         | Settlement helpers                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `@metamynd/agentsafe-mcp-guard`, `@metamynd/agentsafe-a2a-guard` (service side) | `requireAuthorization: true` claims for you (fresh `Idempotency-Key`, one retry on a lost response). Then `captureAuthorization({ authorizationId, claimToken, amountCharged, bookingRef?, settlementTxHash?, payTo? })`, `releaseAuthorization({ authorizationId, claimToken, reason? })`, `markAuthorizationUnknown({ authorizationId, reason? })`, `lookupOutcome({ authorizationId })`. Give the guard a `serviceDid` and signing key to sign every call. |
| `@metamynd/agentsafe-http-gateway`                                              | Claims, forwards with `Idempotency-Key: <authorizationId>`, then settles: capture on success, release only on a status in `releaseOnStatus` (default none), unknown otherwise.                                                                                                                                                                                                                                                                                |
| `metamynd-client` (Python)                                                      | `client.capture(authorization_id, amount_charged, booking_ref=None, settlement_tx_hash=None, pay_to=None)`, `client.void(authorization_id, reason=None)`, `client.outcome(authorization_id)`.                                                                                                                                                                                                                                                                 |

Rule of thumb for services: **release only what provably did not happen.** Use release when the upstream cleanly refused; use unknown for a timeout, a 5xx or a dropped connection. Failing to settle can only over-count spend, never under-count it. Step-by-step: [Settle a Claimed Hold](https://docs.metamynd.ai/guides/settle-a-claimed-hold).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.metamynd.ai/agent-controls-agentsafe/settlement-and-settlement-evidence.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
