Create a Refund

Use this request to create a refund.

You can use the this request to refund a single transaction line. Use the Bulk Refunds request to refund multiple transaction lines with a single request.

To create a refund, use a POST method and the following URL:

https://services.taxamo.com/api/v2/transactions/:key/refunds/

where :key is the Transaction Key of the transaction that you want to refund.

You can also include fields like total_amount and line_key in the query. For example:

$ curl -X 'POST' 'https://services.taxamo.com/api/v2/transactions/T60YAAAABteWsHwfho8xUz1l4fuo/refunds?line_key=SQ0Kuuvp4P9VnEzq&private_token=priv_***********&total_amount=100'

Details

TypeValue
Endpoint/api/v2/transactions/:key/refunds/
MethodPOST
API ReferenceCreate a refund

Body Parameters

ParameterDescription
private_tokenPrivate token.
keyThe Transaction Key that represents the transaction that you want to refund. This is initially generated by the service when the original transaction is created.
line_keyLine identifier. If neither the line key or custom ID is provided, the refund amount will be assigned to lines in order.
custom_idLine custom identifier. If neither line key or custom id is provided, the refund amount will be assigned to lines in order.
refund_timestampRefund timestamp in the yyyy-MM-dd HH:mm:ss or yyyy-MM-dd'T'HH:mm:ss'Z' formats. No timezone conversion is applied.
amountAmount (without tax) to be refunded. Either amount or total amount is required. In case of line key and custom id missing, only total_amount can be used.
total_amountTotal amount, including tax, to be refunded. Either amount or total amount is required. In case of line key and custom id missing, only total_amount can be used.
refund_reasonRefund reason, displayed on the credit note.

Response Example

The following is an example of a successful response:

{
    "total_amount": 100,
    "tax_amount":   16.67
}