{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/august-health/json-schema/august-health-com-august-api-integrations-models-billing-callback-v1-record-deposit-request-schema.json",
  "title": "com.august.api.integrations.models.billing_callback.v1.RecordDepositRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/august-health-billing-v1-api-openapi.yml#/components/schemas/com.august.api.integrations.models.billing_callback.v1.RecordDepositRequest",
  "properties": {
    "bankAccountId": {
      "description": "Bank account ID (future use - currently logged and ignored)",
      "type": "string"
    },
    "cashAccountCode": {
      "description": "Cash account code for accounting. Required if the facility has cash accounts configured; must not be sent if no cash accounts are configured.",
      "type": "string"
    },
    "depositDate": {
      "format": "date",
      "type": "string"
    },
    "externalDepositId": {
      "description": "Partner's unique identifier for this deposit",
      "type": "string"
    },
    "payments": {
      "description": "Individual payments in this batch (max 500)",
      "items": {
        "$ref": "#/$defs/com.august.api.integrations.models.billing_callback.v1.ExternalPaymentItem",
        "description": "Individual payments in this batch (max 500)"
      },
      "type": "array"
    },
    "totalAmountCents": {
      "description": "Total deposit amount in cents",
      "format": "int32",
      "type": "integer"
    }
  },
  "required": [
    "externalDepositId",
    "depositDate",
    "totalAmountCents",
    "payments"
  ],
  "$defs": {
    "com.august.api.integrations.models.billing_callback.v1.ExternalPaymentItem": {
      "properties": {
        "amountCents": {
          "description": "Payment amount in cents. Sign depends on paymentType: positive for PAYMENT, negative for PAYMENT_RETURN/REFUND.",
          "format": "int32",
          "type": "integer"
        },
        "externalTransactionId": {
          "description": "Partner's unique identifier for this payment",
          "type": "string"
        },
        "linkedExternalTransactionId": {
          "description": "For PAYMENT_RETURN or REFUND types, the externalTransactionId of the original PAYMENT being reversed.",
          "type": "string"
        },
        "notes": {
          "description": "Optional notes or reason for the payment (e.g., return reason for PAYMENT_RETURN).",
          "type": "string"
        },
        "paymentDate": {
          "format": "date",
          "type": "string"
        },
        "paymentMethod": {
          "$ref": "#/$defs/com.august.api.integrations.models.billing_callback.v1.ExternalPaymentMethod",
          "description": "Payment method used (ACH, CASH, CHECK, CREDIT_CARD, DEBIT_CARD, WIRE)"
        },
        "paymentType": {
          "default": "PAYMENT",
          "enum": [
            "PAYMENT",
            "PAYMENT_RETURN",
            "REFUND"
          ],
          "type": "string"
        },
        "personId": {
          "description": "August person (resident) ID",
          "type": "string"
        }
      },
      "required": [
        "externalTransactionId",
        "personId",
        "amountCents",
        "paymentMethod",
        "paymentDate",
        "paymentType"
      ]
    },
    "com.august.api.integrations.models.billing_callback.v1.ExternalPaymentMethod": {
      "enum": [
        "ACH",
        "CASH",
        "CHECK",
        "CREDIT_CARD",
        "DEBIT_CARD",
        "WIRE"
      ],
      "type": "string"
    }
  }
}