Create a reversal Transaction

Changed on

Partially or fully reverses a previously created Transaction.

post/v1/tax/transactions/create_reversal

Request

  • Base URL: https://api.stripe.com
  • URL: https://api.stripe.com/v1/tax/transactions/create_reversal
  • Auth: one of:
    • HTTP basic
    • HTTP bearer

Request body application/x-www-form-urlencoded

expandstring[]

Specifies which fields in the response should be expanded.

flat_amountinteger

A flat amount to reverse across the entire transaction, in the smallest currency unit in negative. This value represents the total amount to refund from the transaction, including taxes.

metadataobject

Set of key-value pairs 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.

mode'full' | 'partial' required

If partial, the provided line item or shipping cost amounts are reversed. If full, the original transaction is fully reversed.

original_transactionstring required

The ID of the Transaction to partially or fully reverse.

referencestring required

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.

Response

Successful response.

createdinteger required

Time at which the object was created. Measured in seconds since the Unix epoch.

currencystring required

Three-letter ISO currency code, in lowercase. Must be a supported currency.

customerstring nullable

The ID of an existing Customer used for the resource.

idstring required

Unique identifier for the transaction.

livemodeboolean required

If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.

metadataobject nullable

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

object'tax.transaction' required

String representing the object's type. Objects of the same type share the same value.

posted_atinteger required

The Unix timestamp representing when the tax liability is assumed or reduced.

referencestring required

A custom unique identifier, such as 'myOrder_123'.

tax_dateinteger required

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'reversal' | 'transaction' required

If reversal, this transaction reverses an earlier transaction.

Changes

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////////// to the response with the status

Some revisions have not been checked yet.