{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/chikocorp-com/json-schema/chikocorp-com-remediation-receipt-schema.json",
  "title": "RemediationReceipt",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/chikocorp-com-x402-preflight-openapi.yml#/components/schemas/RemediationReceipt",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "capability",
    "service",
    "orderId",
    "status",
    "acceptedAt",
    "payment",
    "request",
    "review",
    "persistence",
    "claimBoundary"
  ],
  "properties": {
    "capability": {
      "type": "string",
      "const": "order_x402_remediation"
    },
    "service": {
      "type": "string"
    },
    "orderId": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "acceptedAt": {
      "type": "string",
      "format": "date-time"
    },
    "payment": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "asset",
        "assetContract",
        "network",
        "networkCaip2",
        "expectedAmountAtomic",
        "expectedAmountUsd",
        "payTo",
        "facilitator"
      ],
      "properties": {
        "asset": {
          "type": "string"
        },
        "assetContract": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "networkCaip2": {
          "type": "string"
        },
        "expectedAmountAtomic": {
          "type": "string"
        },
        "expectedAmountUsd": {
          "type": "number"
        },
        "payTo": {
          "type": "string"
        },
        "facilitator": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "request": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "repository_or_url",
        "goal",
        "contact",
        "constraints",
        "callback_url",
        "response_format",
        "language"
      ],
      "properties": {
        "repository_or_url": {
          "type": "string"
        },
        "goal": {
          "type": "string"
        },
        "contact": {
          "type": "string"
        },
        "constraints": {
          "type": "string"
        },
        "callback_url": {
          "type": "string"
        },
        "response_format": {
          "type": "string",
          "enum": [
            "json",
            "markdown",
            "both"
          ]
        },
        "language": {
          "type": "string"
        }
      }
    },
    "review": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "status",
        "statusUrl",
        "resultUrl",
        "reportUrl",
        "estimatedCompletionMinutes",
        "accessToken"
      ],
      "properties": {
        "status": {
          "type": "string"
        },
        "statusUrl": {
          "type": "string",
          "format": "uri"
        },
        "resultUrl": {
          "type": "string",
          "format": "uri"
        },
        "reportUrl": {
          "type": "string",
          "format": "uri"
        },
        "estimatedCompletionMinutes": {
          "type": "integer",
          "minimum": 1
        },
        "accessToken": {
          "type": "string"
        }
      }
    },
    "persistence": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "status",
        "settlementTracking"
      ],
      "properties": {
        "status": {
          "type": "string"
        },
        "settlementTracking": {
          "type": "boolean"
        }
      }
    },
    "claimBoundary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "proves",
        "doesNotProve"
      ],
      "properties": {
        "proves": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "doesNotProve": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}