Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Create a reversal Transaction


Create a reversal Transaction

POST / v1 / tax / transactions / create_reversal

Partially or fully reverses a previously created Transaction.

Parameters

  • mode enum Required If partial, the provided line item or shipping cost amounts are reversed. If full, the original transaction is fully reversed. Possible enum values full The original transaction is fully reversed. partial The provided line item amounts are reversed.
  • original _ transaction string Required The ID of the Transaction to partially or fully reverse.
  • reference string 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. The maximum length is 500 characters.
  • flat _ amount integer Required if mode=partial and line_items nor shipping_cost provided 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.
  • line _ items array of objects Required if mode=partial and neither shipping_cost nor flat_amount is provided The line item amounts to reverse.
  • metadata map 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.

More parameters

  • shipping _ cost object Required if mode=partial and neither line_items nor flat_amount is provided

Returns

A new Tax Transaction object representing the reversal.

Response

Retrieve a Transaction

GET / v1 / tax / transactions /:id

Retrieves a Tax Transaction object.

Parameters

No parameters.

Returns

A Tax Transaction object.

Response

Retrieve a Transaction's line items

GET / v1 / tax / transactions /:id / line_items

Retrieves the line items of a committed standalone transaction as a collection.

Parameters

  • ending _ before string A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list. The maximum length is 500 characters.
  • limit integer A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
  • starting _ after string A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list. The maximum length is 500 characters.

Returns

A list of Line Item objects if the Tax Transaction is found. Otherwise returns a ‘not found’ error.

Response

Last verified 2026-09-24

Is this helpful?