POST
/v1/tax/transactions/create_from_calculationCreate a Transaction from a Calculation
Creates a Tax Transaction from a calculation, if that calculation hasn’t expired. Calculations expire after 90 days.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
calculationstringrequired
Tax Calculation ID to be used as input when creating the transaction.
expandarray<string>optional
Specifies which fields in the response should be expanded.
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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
posted_atintegeroptional
The Unix timestamp representing when the tax liability is assumed or reduced, which determines the liability posting period and handling in tax liability reports. The timestamp must fall within the `tax_date` and the current time, unless the `tax_date` is scheduled in advance. Defaults to the current time.
referencestringrequired
A custom order or sale identifier, such as 'myOrder_123'. Must be unique across all transactions, including reversals.
200Successful response.
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.
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.
defaultError response.
errorobjectrequired
Error handling
Any other status is an error: Error response.