Sample - Stripe API
GET/v1/tax/transactions/{transaction}

Retrieve a tax transaction

Retrieves a Tax Transaction object by its identifier. Use expand to request expanded response fields, and use the transaction details to inspect tax collected or refunded for the customer.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
transactionstringrequired
The unique identifier of the Tax Transaction. Maximum 5000 characters.
expandarray<string>optional
Fields to expand in the response. Each expansion name can be up to 5000 characters.

2 status codes
200Returns a Tax Transaction object containing its currency, customer details, tax date, posting time, reference, line items, metadata, and transaction type.
createdintegerrequired
Time at which the object was created. Measured in seconds since the Unix epoch.
currencystringrequired
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
customerstringoptional
The ID of an existing [Customer](https://docs.stripe.com/api/customers/object) used for the resource.
customer_detailsobjectrequired
idstringrequired
Unique identifier for the transaction.
line_itemsobjectoptional
The tax collected or refunded, by line item.
livemodebooleanrequired
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadataobjectoptional
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
Allowed:tax.transaction
posted_atintegerrequired
The Unix timestamp representing when the tax liability is assumed or reduced.
referencestringrequired
A custom unique identifier, such as 'myOrder_123'.
reversalobjectoptional
If `type=reversal`, contains information about what was reversed.
ship_from_detailsobjectoptional
The details of the ship from location, such as the address.
shipping_costobjectoptional
The shipping cost details for the transaction.
tax_dateintegerrequired
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.
typestringrequired
If `reversal`, this transaction reverses an earlier transaction.
Allowed:reversaltransaction
defaultReturned when the API reports an error. The response contains an `error` object with an error type and may include a message, code, parameter, or related resource.
errorobjectrequired

Error handling

transaction must be a string no longer than 5000 characters and must identify an existing Tax Transaction. Each expand value can be up to 5000 characters.