Refund an invoice
curl --request POST \
--url https://api.tilta.io/v1/invoices/{external_id}/refund \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tilta.io/v1/invoices/{external_id}/refund', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tilta.io/v1/invoices/{external_id}/refund"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tilta.io/v1/invoices/{external_id}/refund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"paid_at": 1712419200
}{
"code": "BAD_REQUEST",
"error": "Request validation failed. 1 issue found.",
"issues": [
{
"code": "INVALID_TYPE",
"path": "body.registered_at",
"message": "Invalid type"
}
]
}{
"error": "Unauthorized",
"code": "UNAUTHORIZED"
}{
"error": "No Entity found",
"code": "NOT_FOUND"
}{
"error": "Invoice is already marked as refunded.",
"code": "CONFLICT"
}Invoices
Refund an invoice
Refund a captured invoice in full or partially. Use when goods are returned or cancelled post-invoice. Reverses financing and adjusts merchant payouts.
POST
/
v1
/
invoices
/
{external_id}
/
refund
Refund an invoice
curl --request POST \
--url https://api.tilta.io/v1/invoices/{external_id}/refund \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tilta.io/v1/invoices/{external_id}/refund', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tilta.io/v1/invoices/{external_id}/refund"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tilta.io/v1/invoices/{external_id}/refund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"paid_at": 1712419200
}{
"code": "BAD_REQUEST",
"error": "Request validation failed. 1 issue found.",
"issues": [
{
"code": "INVALID_TYPE",
"path": "body.registered_at",
"message": "Invalid type"
}
]
}{
"error": "Unauthorized",
"code": "UNAUTHORIZED"
}{
"error": "No Entity found",
"code": "NOT_FOUND"
}{
"error": "Invoice is already marked as refunded.",
"code": "CONFLICT"
}When a buyer returns goods, cancels an order after invoicing, or disputes a charge, you refund the invoice to reverse the financing obligation. Tilta handles the refund differently depending on the timing: if the merchant payout has not yet been disbursed, it is cancelled or reduced by the refund amount; if payout has already occurred, the refund amount is reversed and offset against future merchant payouts. Partial refunds are supported – provide an
amount smaller than the invoice total to refund only part of the financed value.
A full refund releases the entire financed amount back to the buyer’s credit facility. A partial refund releases only the
refunded portion, leaving the remaining balance active and due on the original
due_at date.Refunds cannot be undone. If you issue an incorrect refund, you must create a new order and invoice to re-finance the
transaction.
For partial shipment scenarios where only some items are returned, calculate the refund amount as the sum of the returned line
items including tax, then submit that value in the
amount field.Authorizations
Your Tilta API key, sent as Bearer <key>.
Path Parameters
Unique identifier of an invoice.
Maximum string length:
100Pattern:
^[a-zA-Z0-9-_]+$Response
The invoice was refunded; paid_at reflects the refund timestamp.
Unix timestamp in seconds for the banking update recorded for this invoice.
Example:
1712419200