{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gtm-api/json-schema/gtm-api-get-billing-transactions-metrics-request-schema.json",
  "title": "GetBillingTransactionsMetricsRequest",
  "description": "Request body of `get_billing_transactions_metrics`.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gtm-api-billing-transactions-api-openapi.yml#/components/schemas/GetBillingTransactionsMetricsRequest",
  "type": "object",
  "properties": {
    "filter": {
      "type": "object",
      "properties": {
        "sid": {
          "type": "object",
          "properties": {
            "eq": {
              "type": "string"
            },
            "in": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "additionalProperties": false
        },
        "owner_user_sid": {
          "type": "object",
          "properties": {
            "eq": {
              "type": "string"
            },
            "in": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "additionalProperties": false
        },
        "team_sid": {
          "type": "object",
          "properties": {
            "eq": {
              "type": "string"
            },
            "in": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "is_null": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "subscription_sid": {
          "type": "object",
          "properties": {
            "eq": {
              "type": "string"
            },
            "in": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "is_null": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "paddle_transaction_id": {
          "type": "object",
          "properties": {
            "eq": {
              "type": "string"
            },
            "in": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "additionalProperties": false
        },
        "invoice_number": {
          "type": "object",
          "properties": {
            "eq": {
              "type": "string"
            },
            "in": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "is_null": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "status": {
          "type": "object",
          "properties": {
            "eq": {
              "type": "string",
              "enum": [
                "billed",
                "paid",
                "completed",
                "past_due",
                "canceled"
              ]
            },
            "ne": {
              "type": "string",
              "enum": [
                "billed",
                "paid",
                "completed",
                "past_due",
                "canceled"
              ]
            },
            "in": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "billed",
                  "paid",
                  "completed",
                  "past_due",
                  "canceled"
                ]
              }
            },
            "nin": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "billed",
                  "paid",
                  "completed",
                  "past_due",
                  "canceled"
                ]
              }
            }
          },
          "additionalProperties": false
        },
        "origin": {
          "type": "object",
          "properties": {
            "eq": {
              "type": "string",
              "enum": [
                "subscription_charge",
                "subscription_update",
                "one_time"
              ]
            },
            "ne": {
              "type": "string",
              "enum": [
                "subscription_charge",
                "subscription_update",
                "one_time"
              ]
            },
            "in": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "subscription_charge",
                  "subscription_update",
                  "one_time"
                ]
              }
            },
            "nin": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "subscription_charge",
                  "subscription_update",
                  "one_time"
                ]
              }
            }
          },
          "additionalProperties": false
        },
        "collection_mode": {
          "type": "object",
          "properties": {
            "eq": {
              "type": "string",
              "enum": [
                "automatic",
                "manual"
              ]
            },
            "ne": {
              "type": "string",
              "enum": [
                "automatic",
                "manual"
              ]
            },
            "in": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "automatic",
                  "manual"
                ]
              }
            }
          },
          "additionalProperties": false
        },
        "currency": {
          "type": "object",
          "properties": {
            "eq": {
              "type": "string"
            },
            "in": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "additionalProperties": false
        },
        "billed_at": {
          "type": "object",
          "properties": {
            "gte": {
              "type": "string"
            },
            "lte": {
              "type": "string"
            },
            "gt": {
              "type": "string"
            },
            "lt": {
              "type": "string"
            },
            "is_null": {
              "type": "boolean"
            }
          },
          "additionalProperties": false
        },
        "created_at": {
          "type": "object",
          "properties": {
            "gte": {
              "type": "string"
            },
            "lte": {
              "type": "string"
            },
            "gt": {
              "type": "string"
            },
            "lt": {
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      }
    },
    "period": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "description": "ISO 8601 UTC window start (inclusive)."
        },
        "to": {
          "type": "string",
          "description": "ISO 8601 UTC window end; must be ≥ from."
        }
      },
      "required": [
        "from",
        "to"
      ],
      "description": "Required metrics window [from, to]."
    }
  },
  "required": [
    "period"
  ]
}