# settle/payment/terms/propose

https://toip.tools/spec/settle/payment/terms/propose/0.1

The payer sends the full terms document with its own signed acceptance. The payee checks the terms against its invoice and its limits: price, purpose, token, arbiter, fee, threshold, reclaim deadline, payment-link conditions and the payer's key binding. If everything checks out, it accepts.

- **Sent**: payer's party → payee's party
- **Kind**: One-way. No response is expected; any answer is a separate message.
- **Envelope**: Signed by the issuer, addressed to one recipient, timestamped, and encrypted in a TSP Direct message. The signature and recipient binding prevent its use as a bearer token.
- **Defined in**: [`projects/settle/src/protocol/specs.ts:8`](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/settle/src/protocol/specs.ts#L8) as `TERMS_PROPOSE`
- **Handled in**: [`projects/settle/src/agents/party.ts`](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/settle/src/agents/party.ts)
- **Design**: [7. The Trust Tasks](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/settle/docs/design.md#7-the-trust-tasks) in `projects/settle/docs/design.md`

## Payload

As the handler declares it, in projects/settle/src/agents/party.ts:

```ts
{ terms: Terms; acceptance: Acceptance }
```

### Types it uses

projects/settle/src/protocol/documents.ts:71:

```ts
export interface Terms {
  type: "settle/terms";
  version: 1;
  payment: string;
  purpose: string;
  payer: Party;
  payee: Party & { credentials: Credential[] };
  arbiter: { did: string; key: Address };
  amount: { mint: Address; units: string; display: string };
  conditions: { policy: "settle/policies/attested-completion/1"; attester: string; disputeWindowSeconds: number };
  /** The processor's facilitator fee: `units` = max(price × bps, minUnits), funded on top of the price, paid on every outcome. */
  fee: { bps: number; minUnits: string; units: string; account: Address; to: string };
  threshold: number;
  refundAfter: number;
}
```

projects/settle/src/protocol/documents.ts:94:

```ts
/** A party's signature on the terms, as its own small document bound to the terms hash. */
export interface Acceptance {
  type: "settle/acceptance";
  issuer: string;
  termsHash: string;
  proof?: unknown;
}
```

## Notes

The design says either side may propose. In the code only the payer does.

## Document envelope

Every Trust Task uses this envelope. Replace `payload` with the structure shown above.

Shape of a document of this type:

```json
{
  "id": "urn:uuid:…",
  "type": "https://toip.tools/spec/settle/payment/terms/propose/0.1",
  "issuer": "did:key:… (the sender)",
  "recipient": "did:key:… (the receiver)",
  "issuedAt": "2026-11-06T18:00:00.000Z",
  "payload": { … },
  "proof": {
    "type": "DataIntegrityProof",
    "cryptosuite": "eddsa-jcs-2022",
    "verificationMethod": "did:key:…#…",
    "proofPurpose": "assertionMethod",
    "proofValue": "z…"
  }
}
```

---

This is the Markdown version of https://toip.tools/spec/settle/payment/terms/propose/0.1/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
