Refund an invoice

POST https://api.tamio.com/v2/invoices/refund/{uuid}

Processes a full or partial refund for a paid invoice. Supports refunding specific products, custom amounts, and includes reason tracking for accounting and analytics.

Path Parameters

uuid string*

UUID of the paid invoice to refund

Body Parameters

reason string*

Reason for the refund

requested_by_customerduplicatefraudulentother
amount integer

Custom refund amount in smallest currency unit (full amount if omitted)

instalment_invoice_id string

Instalment invoice ID for partial instalment refunds

products array of object

Specific products to refund (all products if omitted)

Responses

200 Invoice refunded successfully

Invoice refunded successfully

status integer
invoice Invoice
400 Bad request. Possible `error_code` values:
401 Missing or invalid API key
/invoices/refund/{uuid}
1const response = await fetch("https://api.tamio.com/v2/invoices/refund/{uuid}", {
2 method: "POST",
3 headers: {
4 "Authorization": "Bearer YOUR_API_KEY",
5 "Content-Type": "application/json"
6 },
7 body: JSON.stringify({
8 // ... request body
9 })
10});
11const data = await response.json();
Responses
{
  "status": 200,
  "invoice": {
    "id": "string",
    "object": "invoice",
    "currency": "EUR",
    "paid": false,
    "processing_payment": false,
    "prefix": "INV-",
    "number": 1001,
    "total": 5000,
    "payment": "stripe_creditcard",
    "date": 1700000000,
    "status": "paid",
    "subscription": "string",
    "locale": "en",
    "payment_retried": false,
    "payment_charge_date": 0,
    "3d_secure_failure": false,
    "authorization_expiry": 0,
    "affiliate_program": "string",
    "affiliate": "string",
    "late_failure": false,
    "has_subscriptions": false,
    "is_instalment": false,
    "fortnox_submitted": false,
    "start_date": 0,
    "end_date": 0,
    "has_notes": false,
    "customer_information": {},
    "products": [],
    "shipping": {},
    "totals": {}
  }
}