{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gtm-api/json-schema/gtm-api-search-billing-transactions-request-schema.json",
  "title": "SearchBillingTransactionsRequest",
  "description": "Request body of `search_billing_transactions`.",
  "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/SearchBillingTransactionsRequest",
  "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
        }
      }
    },
    "include": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "subscription",
          "owner",
          "team"
        ]
      },
      "description": "Relations to eager-load (see entity Includes)."
    },
    "sort": {
      "type": "object",
      "properties": {
        "field": {
          "type": "string",
          "enum": [
            "billed_at",
            "created_at",
            "total"
          ]
        },
        "direction": {
          "type": "string",
          "enum": [
            "asc",
            "desc"
          ],
          "description": "Default desc."
        }
      },
      "required": [
        "field"
      ]
    },
    "page_size": {
      "type": "integer",
      "minimum": 0,
      "maximum": 500,
      "description": "0..500, default 50. page_size=0 = count-only, page_size=1 = getFirst."
    },
    "cursor": {
      "type": [
        "string",
        "null"
      ],
      "description": "Opaque forward cursor from a previous response pagination.next_cursor."
    }
  }
}