{
  "type": "object",
  "title": "Fare",
  "description": "Total cost charged for a logistics service including base freight, surcharges, taxes.",
  "required": [
    "currency",
    "totalAmount"
  ],
  "properties": {
    "currency": {
      "type": "string",
      "example": "INR"
    },
    "baseFreight": {
      "type": "number",
      "description": "Base freight charge",
      "example": 450
    },
    "fuelSurcharge": {
      "type": "number",
      "example": 45
    },
    "odaSurcharge": {
      "type": "number",
      "description": "Out of Delivery Area surcharge",
      "example": 0
    },
    "codCharge": {
      "type": "number",
      "description": "Cash on delivery charge",
      "example": 30
    },
    "insuranceCharge": {
      "type": "number",
      "example": 25
    },
    "gst": {
      "type": "number",
      "description": "GST amount",
      "example": 81
    },
    "otherCharges": {
      "type": "number",
      "example": 0
    },
    "discount": {
      "type": "number",
      "example": 50
    },
    "totalAmount": {
      "type": "number",
      "description": "Final total payable",
      "example": 581
    },
    "breakup": {
      "type": "array",
      "description": "Detailed fare breakup line items",
      "items": {
        "$ref": "https://schema.nfh.global/FareBreakup/v2.0/schema.json"
      }
    },
    "estimatedFare": {
      "type": "boolean",
      "description": "Whether this is an estimate or confirmed fare",
      "example": false
    },
    "paymentMode": {
      "type": "string",
      "enum": [
        "PREPAID",
        "COD",
        "TO_PAY",
        "CREDIT"
      ],
      "example": "PREPAID"
    }
  },
  "$id": "https://schema.nfh.global/ShippingFare/v2.0",
  "x-iri": "https://schema.nfh.global/ShippingFare/v2.0",
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
