{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/curlec/json-schema/curlec-dispute-schema.json",
  "title": "Dispute",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/curlec-disputes-api-openapi.yml#/components/schemas/Dispute",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique dispute identifier. Prefix: disp_"
    },
    "entity": {
      "type": "string",
      "enum": [
        "dispute"
      ]
    },
    "payment_id": {
      "type": "string",
      "description": "The payment against which the dispute was raised (pay_*)."
    },
    "amount": {
      "type": "integer",
      "description": "Disputed amount in currency subunits."
    },
    "currency": {
      "type": "string"
    },
    "amount_deducted": {
      "type": "integer",
      "description": "Amount deducted from your balance when dispute is lost."
    },
    "reason_code": {
      "type": "string",
      "description": "Code identifying the dispute reason."
    },
    "reason_description": {
      "type": "string",
      "description": "Human-readable explanation of the dispute cause."
    },
    "respond_by": {
      "type": "integer",
      "description": "Unix timestamp by which you must respond. Missing this forfeits the dispute."
    },
    "status": {
      "type": "string",
      "enum": [
        "open",
        "under_review",
        "won",
        "lost",
        "closed"
      ],
      "description": "open: action required. under_review: evidence submitted, awaiting bank decision. won: resolved in your favour. lost: resolved against you. closed: resolved without chargeback."
    },
    "phase": {
      "type": "string",
      "enum": [
        "fraud",
        "retrieval",
        "chargeback",
        "pre_arbitration",
        "arbitration"
      ],
      "description": "Escalation stage of the dispute process."
    },
    "created_at": {
      "type": "integer"
    },
    "evidence": {
      "$ref": "#/$defs/DisputeEvidence"
    }
  },
  "$defs": {
    "DisputeEvidence": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "integer",
          "description": "Contested amount in currency subunits."
        },
        "summary": {
          "type": "string",
          "description": "Your explanation of why the dispute should be resolved in your favour. Max 1000 characters."
        },
        "shipping_proof": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Document IDs proving product shipment."
        },
        "billing_proof": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Order confirmation document IDs."
        },
        "cancellation_proof": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "customer_communication": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "proof_of_service": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "explanation_letter": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "refund_confirmation": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "access_activity_log": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "refund_cancellation_policy": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "term_and_conditions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "others": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "submitted_at": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Unix timestamp of last evidence submission. Null for drafts."
        }
      }
    }
  }
}