POST
/v1/tax/transactions/create_reversalCreate a reversal Transaction
Partially or fully reverses a previously created Transaction.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
expandarray<string>optional
Specifies which fields in the response should be expanded.
flat_amountintegeroptional
A flat amount to reverse across the entire transaction, in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units) in negative. This value represents the total amount to refund from the transaction, including taxes.
line_itemsarray<TransactionLineItemReversal>optional
The line item amounts to reverse.
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`.
modestringrequired
If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed.
original_transactionstringrequired
The ID of the Transaction to partially or fully reverse.
referencestringrequired
A custom identifier for this reversal, such as `myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://docs.stripe.com/tax/reports).
shipping_costobjectoptional
The shipping cost to reverse.
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.