Create a refund

Use this request to create a refund.

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

Type

Value

Endpoint

/api/v2/transactions/:key/refunds/

Method

POST

API Reference

Create a refund

Body Parameters

Parameter

Description

private_token

Private token.

key

Transaction Key that is generated by Vertex.

line_key

Line identifier. If neither the line key or custom ID is provided, the refund amount will be assigned to lines in order.

custom_id

Line custom identifier. If neither line key or custom id is provided, the refund amount will be assigned to lines in order.

refund_timestamp

Refund timestamp in the yyyy-MM-dd HH:mm:ss or yyyy-MM-dd'T'HH:mm:ss'Z' formats. No timezone conversion is applied.

amount

Amount (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_amount

Total 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_reason

Refund reason, displayed on the credit note.

Response Example

The following is an example of a successful response:

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

Did this page help you?