{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gtm-api/json-schema/gtm-api-get-billing-transaction-invoice-response-schema.json",
  "title": "GetBillingTransactionInvoiceResponse",
  "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/GetBillingTransactionInvoiceResponse",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "enum": [
        true
      ]
    },
    "operation": {
      "type": "string",
      "enum": [
        "action"
      ]
    },
    "action": {
      "type": "string",
      "description": "kebab-case verb; matches the route segment."
    },
    "item": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "sid": {
          "type": "string"
        },
        "owner_user_sid": {
          "type": "string"
        },
        "team_sid": {
          "type": [
            "string",
            "null"
          ]
        },
        "subscription_sid": {
          "type": [
            "string",
            "null"
          ]
        },
        "paddle_transaction_id": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "billed",
            "paid",
            "completed",
            "past_due",
            "canceled"
          ]
        },
        "origin": {
          "type": "string",
          "enum": [
            "subscription_charge",
            "subscription_update",
            "one_time"
          ]
        },
        "collection_mode": {
          "type": "string",
          "enum": [
            "automatic",
            "manual"
          ]
        },
        "invoice_number": {
          "type": [
            "string",
            "null"
          ]
        },
        "total": {
          "type": "string"
        },
        "tax": {
          "type": [
            "string",
            "null"
          ]
        },
        "currency": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "price_sid": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "product_sid": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "product_type": {
                "type": "string",
                "enum": [
                  "plan",
                  "addon"
                ]
              },
              "quantity": {
                "type": "number"
              },
              "unit_amount": {
                "type": "string"
              },
              "paddle_price_id": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "price_sid",
              "product_sid",
              "product_type",
              "quantity",
              "unit_amount",
              "paddle_price_id"
            ]
          }
        },
        "billed_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "created_at": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      },
      "required": [
        "sid",
        "owner_user_sid",
        "team_sid",
        "subscription_sid",
        "paddle_transaction_id",
        "status",
        "origin",
        "collection_mode",
        "invoice_number",
        "total",
        "tax",
        "currency",
        "items",
        "billed_at",
        "created_at",
        "updated_at"
      ]
    },
    "result": {
      "type": "object",
      "additionalProperties": {}
    },
    "meta": {
      "type": "object",
      "properties": {
        "trace_id": {
          "type": "string",
          "description": "UUID v7; same 128-bit value as the X-Trace-Id header."
        },
        "span_id": {
          "type": "string",
          "pattern": "^[0-9a-f]{16}$",
          "description": "16 hex chars, root span of this request."
        },
        "timestamp": {
          "type": "string",
          "description": "ISO 8601 UTC (Y-m-dTH:i:sZ), response time."
        },
        "duration_ms": {
          "type": "integer",
          "minimum": 0,
          "description": "Server-side wall clock."
        },
        "team_sid": {
          "type": [
            "string",
            "null"
          ],
          "description": "The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends."
        },
        "actor_type": {
          "type": [
            "string",
            "null"
          ],
          "description": "user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends."
        }
      },
      "required": [
        "trace_id",
        "span_id",
        "timestamp",
        "duration_ms"
      ]
    }
  },
  "required": [
    "success",
    "operation",
    "action",
    "item",
    "result",
    "meta"
  ]
}