{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/affirm/refs/heads/main/json-schema/transactions-settlement-event-schema.json",
  "title": "SettlementEvent",
  "description": "Represents a single disbursement line item from Affirm to the merchant, associated with a specific transaction event.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "A unique identifier for the settlement event.",
      "example": "500123"
    },
    "transaction_id": {
      "type": "string",
      "description": "The identifier of the transaction this settlement event belongs to.",
      "example": "500123"
    },
    "transaction_event_id": {
      "type": "string",
      "description": "The identifier of the specific transaction event that triggered this settlement.",
      "example": "500123"
    },
    "amount": {
      "type": "integer",
      "description": "Net disbursement amount in the smallest currency unit.",
      "example": 1
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217 currency code for this settlement.",
      "example": "USD"
    },
    "created": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when this settlement event was created, in RFC 3339 format.",
      "example": "2025-03-15T14:30:00Z"
    },
    "type": {
      "type": "string",
      "description": "The type of settlement event corresponding to the transaction action.",
      "enum": [
        "capture",
        "refund",
        "void"
      ],
      "example": "capture"
    }
  }
}