Skip to content

Mark an income transaction as a refund

POST
/transactions/{id}/refund
curl --request POST \
--url http://localhost:8000/api/v1/transactions/1/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "client_id": "example", "original_transaction_id": 1, "original_client_id": "example" }'

Mark an income transaction as a refund, optionally linking it to the original expense it refunded. Only income transactions can be refunds; the original (if provided) must be an expense owned by the same user.

id
required
integer
Media type application/json
object
client_id

Client-generated ID for the new refund row

string
nullable
original_transaction_id

Server id of the expense being refunded

integer
nullable
original_client_id

Client id of the expense being refunded (used when original has not synced yet)

string
nullable
Example generated
{
"client_id": "example",
"original_transaction_id": 1,
"original_client_id": "example"
}

Refund marked

Media type application/json
object
id

A Refund row marks an income transaction as refunding money received back from a prior expense. The original_transaction_id link is optional — users sometimes log a refund without remembering or caring which specific expense it came from. See the Refundable trait on Transaction for the query helpers.

integer
refund_transaction_id

The income transaction marked as a refund

integer
original_transaction_id

Optional link to the expense being refunded

integer
nullable
client_generated_id
string
nullable
last_synced_at
string format: date-time
nullable
created_at
string format: date-time
updated_at
string format: date-time
Example generated
{
"id": 1,
"refund_transaction_id": 1,
"original_transaction_id": 1,
"client_generated_id": "example",
"last_synced_at": "2026-04-15T12:00:00Z",
"created_at": "2026-04-15T12:00:00Z",
"updated_at": "2026-04-15T12:00:00Z"
}

Transaction not found

Only income transactions can be refunds, or invalid original