# settle/checkout/start

https://toip.tools/spec/settle/checkout/start/0.1

A payer who opens a payment link sends the link back to its issuer and asks for an invoice under the link's conditions. The payee checks that the link is its own, unchanged and not archived, then sends a settle/payment/request with those conditions.

- **Sent**: payer's party → payee's party (the link's issuer)
- **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:24`](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/settle/src/protocol/specs.ts#L24) as `CHECKOUT_START`
- **Handled in**: [`projects/settle/src/agents/party.ts`](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/settle/src/agents/party.ts)
- **Design**: [17. The app: platform, parties, payment links (2026-11-06)](https://github.com/yourbuddyconner/toip-tools/blob/main/projects/settle/docs/design.md#17-the-app-platform-parties-payment-links-2026-11-06) in `projects/settle/docs/design.md`

Source documentation: “A payer opening a payment link asks the payee for an invoice under the link's conditions.”

## Payload

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

```ts
{ link: PaymentLink; checkout: string; name?: string }
```

### Types it uses

projects/settle/src/agents/party.ts:63:

```ts
/**
 * A payment link (design §17): the payee's signed offer to anyone who opens it. It travels in the URL,
 * so a checkout page can check who issued it and what it promises without asking any server.
 */
export interface PaymentLink {
  type: "settle/payment-link";
  issuer: string;
  id: string;
  /** The payee's own name for itself. */
  name: string;
  title: string;
  units: string;
  /** Who confirms the work is done: the payer itself, or a named third party. */
  release: "payer-confirms" | "attester-confirms";
  attester?: string;
  attesterName?: string;
  disputeWindowDays: number;
  credentials: Credential[];
  created: string;
  proof?: unknown;
}
```

## 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/checkout/start/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/checkout/start/0.1/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
