{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fleetwire/json-schema/fleetwire-partner-charge-input-schema.json",
  "title": "PartnerChargeInput",
  "x-generated": "2026-12-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/fleetwire-openapi-openapi.json#/components/schemas/PartnerChargeInput",
  "type": "object",
  "required": [
    "external_id",
    "kind",
    "amount_cents"
  ],
  "properties": {
    "external_id": {
      "type": "string",
      "maxLength": 191,
      "description": "Your id for this charge. The idempotency key."
    },
    "kind": {
      "type": "string",
      "enum": [
        "toll",
        "violation",
        "fee"
      ],
      "description": "`fee` is a charge of yours that isn't a toll or violation, e.g. a registration fee."
    },
    "amount_cents": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10000000,
      "description": "What the authority charged."
    },
    "provider_fee_cents": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000000,
      "default": 0,
      "description": "Your fee for this charge. Billed to the renter as its own line."
    },
    "currency": {
      "type": "string",
      "minLength": 3,
      "maxLength": 3,
      "default": "USD"
    },
    "occurred_at": {
      "type": "string",
      "format": "date-time",
      "description": "When it happened. Required unless `kind` is `fee`."
    },
    "rental_id": {
      "type": "string",
      "maxLength": 64,
      "description": "The rental, if you know it. Otherwise matched by `plate` and `occurred_at`."
    },
    "plate": {
      "type": "string",
      "maxLength": 20,
      "description": "Needed for matching when there's no `rental_id`."
    },
    "plate_state": {
      "type": "string",
      "maxLength": 10
    },
    "authority": {
      "type": "string",
      "maxLength": 191
    },
    "location": {
      "type": "string",
      "maxLength": 250,
      "description": "Plaza, gantry or address."
    },
    "description": {
      "type": "string",
      "maxLength": 200,
      "description": "Shown on the renter's invoice."
    },
    "citation_number": {
      "type": "string",
      "maxLength": 100
    },
    "violation_type": {
      "type": "string",
      "enum": [
        "parking",
        "red_light",
        "speed",
        "other"
      ]
    },
    "due_at": {
      "type": "string",
      "format": "date",
      "description": "When the authority wants it paid."
    },
    "document_pdf": {
      "type": "string",
      "contentEncoding": "base64",
      "description": "Itemized receipt PDF, base64-encoded. Up to 5 MB."
    },
    "document_url": {
      "type": "string",
      "format": "uri",
      "maxLength": 2000,
      "description": "A public https link to the receipt PDF. Downloaded once, no redirects."
    }
  }
}