{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://getzero.dev/contracts/zero.marketplace.paid_response_receipt.v0.schema.json",
  "title": "ZERO marketplace paid response receipt v0",
  "description": "Draft blocked receipt schema for future marketplace paid responses. Version v0 represents disabled paid response delivery and cannot prove a charge.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "schema",
    "kind",
    "receipt_id",
    "listing_id",
    "supplier_id",
    "request_id",
    "created_at",
    "settlement",
    "response",
    "execution_boundary",
    "privacy_boundary",
    "blockers"
  ],
  "properties": {
    "schema_version": { "const": "zero.marketplace.paid_response_receipt.v0" },
    "schema": { "const": "https://getzero.dev/contracts/zero.marketplace.paid_response_receipt.v0.schema.json" },
    "kind": { "const": "marketplace_paid_response_receipt" },
    "receipt_id": { "type": "string", "minLength": 8 },
    "listing_id": { "type": "string", "minLength": 3 },
    "supplier_id": { "type": "string", "minLength": 3 },
    "request_id": { "type": "string", "minLength": 8 },
    "created_at": { "type": "string", "format": "date-time" },
    "settlement": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "paid_call_enabled",
        "charged_amount_usd",
        "credits_charged",
        "x402_payment_hash",
        "marketplace_commission_usd",
        "seller_payout_usd",
        "refund_available"
      ],
      "properties": {
        "paid_call_enabled": { "const": false },
        "charged_amount_usd": { "const": 0 },
        "credits_charged": { "const": 0 },
        "x402_payment_hash": { "type": "null" },
        "marketplace_commission_usd": { "const": 0 },
        "seller_payout_usd": { "const": 0 },
        "refund_available": { "const": false }
      }
    },
    "response": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "delivered",
        "delivery_status",
        "public_replay_id",
        "private_receipt_ref",
        "retention_status",
        "paid_output_hash",
        "private_prompt_redacted"
      ],
      "properties": {
        "delivered": { "const": false },
        "delivery_status": { "const": "disabled" },
        "public_replay_id": { "type": "null" },
        "private_receipt_ref": { "type": "null" },
        "retention_status": { "const": "not_retained_because_paid_delivery_disabled" },
        "paid_output_hash": { "type": "null" },
        "private_prompt_redacted": { "const": true }
      }
    },
    "execution_boundary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "receipt_can_execute_orders",
        "receipt_can_mutate_runtime",
        "receipt_can_grant_authority",
        "receipt_can_move_funds"
      ],
      "properties": {
        "receipt_can_execute_orders": { "const": false },
        "receipt_can_mutate_runtime": { "const": false },
        "receipt_can_grant_authority": { "const": false },
        "receipt_can_move_funds": { "const": false }
      }
    },
    "privacy_boundary": {
      "type": "object",
      "additionalProperties": false,
      "required": ["operator_id_public", "raw_prompt_public", "private_keys_public", "seller_payout_address_public"],
      "properties": {
        "operator_id_public": { "const": false },
        "raw_prompt_public": { "const": false },
        "private_keys_public": { "const": false },
        "seller_payout_address_public": { "const": false }
      }
    },
    "blockers": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 3 } }
  }
}
