{
  "type": "object",
  "title": "Receipt",
  "description": "Digital acknowledgment of payment and delivery for a logistics service.",
  "required": [
    "id",
    "shipmentId",
    "fare"
  ],
  "properties": {
    "id": {
      "type": "string",
      "example": "RCP-2024-001234"
    },
    "shipmentId": {
      "type": "string",
      "example": "SHP-2024-001234"
    },
    "invoiceNumber": {
      "type": "string",
      "example": "INV-2024-9900"
    },
    "issuedAt": {
      "type": "string",
      "format": "date-time"
    },
    "fare": {
      "$ref": "https://schema.nfh.global/Fare/v2.0/schema.json"
    },
    "paymentMode": {
      "type": "string",
      "enum": [
        "PREPAID",
        "COD",
        "TO_PAY",
        "CREDIT"
      ],
      "example": "PREPAID"
    },
    "paymentTransactionId": {
      "type": "string",
      "example": "TXN-UPI-2024-123456"
    },
    "paidAt": {
      "type": "string",
      "format": "date-time"
    },
    "shipper": {
      "$ref": "https://schema.nfh.global/Contact/v2.0/schema.json"
    },
    "consignee": {
      "$ref": "https://schema.nfh.global/Contact/v2.0/schema.json"
    },
    "carrier": {
      "$ref": "https://schema.nfh.global/Carrier/v2.0/schema.json"
    },
    "deliveryProof": {
      "$ref": "https://schema.nfh.global/Proof/v2.0/schema.json"
    },
    "downloadUrl": {
      "type": "string",
      "format": "uri",
      "description": "URL to download PDF receipt"
    }
  },
  "$id": "https://schema.nfh.global/LogisticsReceipt/v2.0",
  "x-iri": "https://schema.nfh.global/LogisticsReceipt/v2.0",
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
