# The Tax Transaction object

### The Tax Transaction object

```json
{
  "id": "tax_1NaS0I2eZvKYlo2CRuMhUcmz",
  "object": "tax.transaction",
  "created": 1690932566,
  "currency": "usd",
  "customer": null,
  "customer_details": {
    "address": {
      "city": "South San Francisco",
      "country": "US",
      "line1": "354 Oyster Point Blvd",
      "line2": "",
      "postal_code": "94080",
      "state": "CA"
    },
    "address_source": "shipping",
    "ip_address": null,
    "tax_ids": [],
    "taxability_override": "none"
  },
  "line_items": {
    "object": "list",
    "data": [
      {
        "id": "tax_li_ONCP443tgfS8I1",
        "object": "tax.transaction_line_item",
        "amount": 1499,
        "amount_tax": 148,
        "livemode": false,
        "metadata": null,
        "product": null,
        "quantity": 1,
        "reference": "Pepperoni Pizza",
        "reversal": null,
        "tax_behavior": "exclusive",
        "tax_code": "txcd_40060003",
        "type": "transaction"
      }
    ],
    "has_more": false,
    "url": "/v1/tax/transactions/tax_1NaS0I2eZvKYlo2CRuMhUcmz/line_items"
  },
  "livemode": false,
  "metadata": null,
  "posted_at": 1690932566,
  "reference": "myOrder_123",
  "reversal": null,
  "shipping_cost": {
    "amount": 300,
    "amount_tax": 0,
    "tax_behavior": "exclusive",
    "tax_code": "txcd_92010001"
  },
  "ship_from_details": {
    "address": {
      "postal_code": "75001",
      "state": "TX",
      "country": "US"
    }
  },
  "tax_date": 1690932566,
  "type": "transaction"
}
```

## Attributes

- `id` (string)
  Unique identifier for the transaction.

- `object` (string)
  String representing the object’s type. Objects of the same type share the same value.

- `created` (timestamp)
  Time at which the object was created. Measured in seconds since the Unix epoch.

- `currency` (string)
  Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies.md).

- `customer` (string, nullable)
  The ID of an existing [Customer](https://docs.stripe.com/api/customers/object.md) used for the resource.

- [`customer_details`](https://docs.stripe.com/api/tax/transactions/object.md?query=customer_details) (object)
  The customer’s details, such as address and tax IDs.

- [`line_items`](https://docs.stripe.com/api/tax/transactions/object.md?query=line_items) (object, nullable, expandable (can be expanded into an object with the `expand` request parameter))
  The tax collected or refunded, by line item.

- `livemode` (boolean)
  If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.

- `metadata` (map, nullable)
  Set of [key-value pairs](https://docs.stripe.com/api/metadata.md) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

- `posted_at` (timestamp)
  The Unix timestamp representing when the tax liability is assumed or reduced.

- `reference` (string)
  A custom unique identifier, such as ‘myOrder_123’.

- [`reversal`](https://docs.stripe.com/api/tax/transactions/object.md?query=reversal) (object, nullable)
  If `type=reversal`, contains information about what was reversed.

- [`ship_from_details`](https://docs.stripe.com/api/tax/transactions/object.md?query=ship_from_details) (object, nullable)
  The details of the ship from location, such as the address.

- [`shipping_cost`](https://docs.stripe.com/api/tax/transactions/object.md?query=shipping_cost) (object, nullable)
  The shipping cost details for the transaction.

- `tax_date` (timestamp)
  The calculation uses the tax rules and rates that are in effect at this timestamp. You can use a date up to 31 days in the past or up to 31 days in the future. If you use a future date, Stripe doesn’t guarantee that the expected tax rules and rate being used match the actual rules and rate that will be in effect on that date. We deploy tax changes before their effective date, but not within a fixed window.

- `type` (enum)
  If `reversal`, this transaction reverses an earlier transaction.
Possible enum values:
  - `reversal`
    Represents a partial or full reversal of an earlier transaction.

  - `transaction`
    Represents a customer sale or order.
