{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/paypal/json-schema/paypal-tax-create-request-schema.json",
  "title": "TaxCreateRequest",
  "description": "Request body for creating a new tax",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/paypal-taxes-api-openapi.yml#/components/schemas/TaxCreateRequest",
  "allOf": [
    {
      "$ref": "#/$defs/TaxBase"
    },
    {
      "type": "object",
      "required": [
        "code",
        "rate"
      ],
      "properties": {
        "code": {
          "$ref": "#/$defs/TaxCode"
        }
      }
    }
  ],
  "$defs": {
    "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_-]*$"
    }
  }
}