## Querying Tax Data

Stripe Tax data provides a comprehensive view of your tax liability, encompassing automated calculations across various Stripe products like Payment Links, Checkout, Subscriptions, Invoices, and custom integrations. All tax-specific data resides within the **Tax** section of the schema, with `tax_transactions` serving as the primary table.

To delve deeper into your tax data, you can leverage additional tables that represent the components of a `tax_transaction`, such as `tax_transaction_line_items`, `tax_transaction_shipping_costs`, and `tax_transaction_jurisdiction_details`.

The following diagram illustrates the components generated during an automated tax calculation and their relationship to the originating object:

*(Diagram would be inserted here, showing the flow from an originating object to tax calculation components and their relationships.)*

Amounts in the examples below are presented in minor currency units (e.g., cents instead of dollars).

### Tax Transactions

Each row in the `tax_transactions` table represents a single `tax_transaction` object. These objects record the assumed or reduced tax liability for a transaction or its reversal. You can generate reports on every tax transaction created through automated tax calculations.

This table is the recommended starting point for creating reports on your tax liability. To retrieve your tax liability amounts, you'll need to join it with other tax tables. However, this table directly links your data to other Stripe products like invoices and Checkout sessions. Joining to non-tax tables via `source_id` and `source_type` provides the object that triggered the tax transaction's creation.

### Tax Transaction Line Items

The `tax_transaction_line_items` table contains details about each line item within a tax transaction. This includes information such as the amount, tax rate applied, and the product tax code.

### Tax Transaction Shipping Costs

For transactions involving shipping, the `tax_transaction_shipping_costs` table provides details about the tax applied to shipping charges.

### Tax Transaction Jurisdiction Details

The `tax_transaction_jurisdiction_details` table offers granular information about the tax jurisdictions involved in a transaction, including the jurisdiction key, type, and any specific tax rates applied.

By querying these tables, you can gain detailed insights into your tax liabilities, understand tax calculations, and ensure accurate reporting and compliance.