{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/paypal/json-schema/paypal-taxes-paginated-schema.json",
  "title": "TaxesPaginated",
  "description": "Paginated list of tax objects",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/paypal-taxes-api-openapi.yml#/components/schemas/TaxesPaginated",
  "type": "object",
  "required": [
    "taxes",
    "meta"
  ],
  "properties": {
    "taxes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TaxResponse"
      }
    },
    "meta": {
      "$ref": "#/$defs/PaginationMetadata"
    }
  },
  "$defs": {
    "DateTimeWithZone": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time in ISO 8601 format."
    },
    "PaginationMetadata": {
      "type": "object",
      "properties": {
        "total_count": {
          "type": "integer"
        },
        "total_pages": {
          "type": "integer"
        },
        "current_page": {
          "type": "integer"
        }
      }
    },
    "TaxBase": {
      "description": "Base schema for tax request/response objects",
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the tax"
        },
        "rate": {
          "type": "string",
          "pattern": "^(?!0+(?:\\.0+)?$)(?:0?\\.\\d{1,2}|[1-9]\\d?(?:\\.\\d{1,2})?|100(?:\\.0{1,2})?)$",
          "description": "The percentage rate of the tax applied to transactions. A decimal amount from 0.01 to 100.00 inclusive, always with exactly two decimal places, no leading zeros except 0.xx."
        },
        "description": {
          "type": "string",
          "description": "Detailed description of the tax for internal reference"
        }
      }
    },
    "TaxCode": {
      "type": "string",
      "description": "Unique code used to identify the tax. Must contain only alphanumeric characters, underscores, and hyphens.",
      "pattern": "^[a-zA-Z0-9_-]*$"
    },
    "TaxResponse": {
      "description": "Represents a customizable tax rate that can be applied to invoices and fees",
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/TaxBase"
        },
        {
          "type": "object",
          "properties": {
            "code": {
              "$ref": "#/$defs/TaxCode"
            },
            "id": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the tax"
            },
            "created_at": {
              "allOf": [
                {
                  "$ref": "#/$defs/DateTimeWithZone"
                },
                {
                  "description": "The effective start date of the subscription; can be past, current, or future. Date must be provided in ISO 8601 format"
                }
              ]
            }
          }
        }
      ]
    }
  }
}