{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://weverlabs.com/schemas/receipt-verification.schema.json",
  "title": "Receipt Verification Endpoint v1",
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "schema_version": {
      "const": "receipt_verification.v1"
    },
    "mode": {
      "type": "string",
      "enum": [
        "read_receipt_verification",
        "verify_receipt",
        "verify_paid_run_receipt",
        "build_verification_packet",
        "record_verification_event",
        "read_verification_events"
      ]
    },
    "receipt_id": {
      "type": "string"
    },
    "receipt_hash": {
      "type": "string"
    },
    "receipt_signature": {
      "type": "string"
    },
    "production_run_id": {
      "type": "string"
    },
    "return_package_id": {
      "type": "string"
    },
    "payment_reference": {
      "type": "string"
    },
    "package_hash": {
      "type": "string"
    },
    "amount_units": {
      "type": "number"
    },
    "currency": {
      "type": "string"
    },
    "proof_hash": {
      "type": "string"
    },
    "completion_signature": {
      "type": "string"
    }
  },
  "required": [
    "mode"
  ]
}
