toip.tools

settle/payment/request

https://toip.tools/spec/settle/payment/request/0.1

The payee sends an invoice to the payer. It carries the price, the purpose, a new payment key bound to the payee's DID, and the payee's credentials. The payer checks the key binding and the credentials and records the invoice. If the invoice answers one of its own checkouts, the payer then proposes terms without a click.

Sent
payee's party payer'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:7 as PAYMENT_REQUEST
Handled in
projects/settle/src/agents/party.ts
Design
7. The Trust Tasks in projects/settle/docs/design.md

Payload

TypeScriptprojects/settle/src/agents/messages.ts:7
export interface OfferPayload {
  payment: string;
  purpose: string;
  units: string;
  payee: TermsParty;
  credentials: Credential[];
  /** The payee's own name for itself (shown to people, never trusted). */
  name?: string;
  /** Set when the invoice answers a checkout from a payment link. */
  link?: string;
  checkout?: string;
  /** The release conditions the payment link fixed; the payee accepts only terms that use them. */
  conditions?: { attester: string; disputeWindowDays: number };
}

Notes

The payee also sends it in reply to settle/checkout/start. Then the payload has link, checkout and conditions set.

Document envelope

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

JSONShape of a document of this type
{
  "id": "urn:uuid:…",
  "type": "https://toip.tools/spec/settle/payment/request/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…"
  }
}