Przejdź do treści

Procurement Receipt v1

Source schema: doc/schemas/procurement-receipt.v1.schema.json

Machine-readable schema for the auditable outcome of a procurement contract.

Governing Basis

Project Lineage

Requirements

Stories

Fields

Field Required Shape Description
schema/v yes const: 1 Schema version.
receipt/id yes string Stable identifier of the outcome receipt.
contract/id yes string Procurement contract to which this receipt belongs.
question/id yes string Question lifecycle identifier for audit joins.
created-at yes string Receipt creation timestamp.
payer/participant-id yes string Participation-role identity on the payer/asker side whose acceptance or refusal is being recorded.
payee/participant-id yes string Participation-role identity on the payee/responder side whose acknowledgement or outcome is being recorded.
settled-at no string Timestamp at which settlement or equivalent terminal confirmation completed.
outcome yes enum: settled, rejected, expired, canceled Terminal contract outcome recorded by the local node.
confirmation/mode yes enum: arbiter-confirmed, self-confirmed, manual-review-only Confirmation mode actually used for the recorded outcome.
answer/accepted no boolean Whether the received answer or summary satisfied the contract criteria.
payer/signature no string Signature or reference proving payer-side acceptance of the recorded outcome.
payee/signature no string Signature or reference proving payee-side acknowledgement of the recorded outcome.
arbiter/signatures no array Arbiter confirmations when the contract required arbiter approval.
settlement/rail no enum: external-invoice, host-ledger, manual-transfer, none Settlement rail used outside the protocol core.
settlement/ref no string External settlement reference such as an invoice id, ledger entry id, or transfer reference.
settlement/hold-ref no string Host-ledger hold reference from which release or refund was resolved.
settlement/transfer-refs no array One or more host-ledger transfer references that completed release, partial release, refund, or payout bookkeeping for the contract.
rejection/reason no string Human- or machine-readable reason when the answer or contract outcome was not accepted.
policy_annotations no object

Conditional Rules

Rule 1

When:

{
  "properties": {
    "outcome": {
      "const": "settled"
    }
  },
  "required": [
    "outcome"
  ]
}

Then:

{
  "required": [
    "settled-at",
    "answer/accepted",
    "payer/signature",
    "payee/signature"
  ],
  "properties": {
    "answer/accepted": {
      "const": true
    }
  }
}

Rule 2

When:

{
  "properties": {
    "confirmation/mode": {
      "const": "arbiter-confirmed"
    }
  },
  "required": [
    "confirmation/mode"
  ]
}

Then:

{
  "required": [
    "arbiter/signatures"
  ]
}

Rule 3

When:

{
  "properties": {
    "outcome": {
      "enum": [
        "rejected",
        "expired",
        "canceled"
      ]
    }
  },
  "required": [
    "outcome"
  ]
}

Then:

{
  "required": [
    "rejection/reason"
  ]
}

Rule 4

When:

{
  "properties": {
    "settlement/rail": {
      "const": "host-ledger"
    }
  },
  "required": [
    "settlement/rail"
  ]
}

Then:

{
  "required": [
    "settlement/ref",
    "settlement/hold-ref",
    "settlement/transfer-refs"
  ]
}

Field Semantics

schema/v

  • Required: yes
  • Shape: const: 1

Schema version.

receipt/id

  • Required: yes
  • Shape: string

Stable identifier of the outcome receipt.

contract/id

  • Required: yes
  • Shape: string

Procurement contract to which this receipt belongs.

question/id

  • Required: yes
  • Shape: string

Question lifecycle identifier for audit joins.

created-at

  • Required: yes
  • Shape: string

Receipt creation timestamp.

payer/participant-id

  • Required: yes
  • Shape: string

Participation-role identity on the payer/asker side whose acceptance or refusal is being recorded.

payee/participant-id

  • Required: yes
  • Shape: string

Participation-role identity on the payee/responder side whose acknowledgement or outcome is being recorded.

settled-at

  • Required: no
  • Shape: string

Timestamp at which settlement or equivalent terminal confirmation completed.

outcome

  • Required: yes
  • Shape: enum: settled, rejected, expired, canceled

Terminal contract outcome recorded by the local node.

confirmation/mode

  • Required: yes
  • Shape: enum: arbiter-confirmed, self-confirmed, manual-review-only

Confirmation mode actually used for the recorded outcome.

answer/accepted

  • Required: no
  • Shape: boolean

Whether the received answer or summary satisfied the contract criteria.

payer/signature

  • Required: no
  • Shape: string

Signature or reference proving payer-side acceptance of the recorded outcome.

payee/signature

  • Required: no
  • Shape: string

Signature or reference proving payee-side acknowledgement of the recorded outcome.

arbiter/signatures

  • Required: no
  • Shape: array

Arbiter confirmations when the contract required arbiter approval.

settlement/rail

  • Required: no
  • Shape: enum: external-invoice, host-ledger, manual-transfer, none

Settlement rail used outside the protocol core.

settlement/ref

  • Required: no
  • Shape: string

External settlement reference such as an invoice id, ledger entry id, or transfer reference.

settlement/hold-ref

  • Required: no
  • Shape: string

Host-ledger hold reference from which release or refund was resolved.

settlement/transfer-refs

  • Required: no
  • Shape: array

One or more host-ledger transfer references that completed release, partial release, refund, or payout bookkeeping for the contract.

rejection/reason

  • Required: no
  • Shape: string

Human- or machine-readable reason when the answer or contract outcome was not accepted.

policy_annotations

  • Required: no
  • Shape: object