Record a refund
Needs a token with the write:invoices scope. Authentication
Try in Playground sends a real request to app.helvetly.com with a token you paste. It stays in this browser tab only (session storage) and goes to no one else.
Records money paid back to the buyer out of the invoice's credit balance (a credit note larger than what was paid makes refund_due > 0). Answers with the updated invoice. 409 invalid_state when nothing is due to be refunded; 422 validation_failed on amount/refunded_on/method; 409 period_closed when the month of the date is closed in the books. Not idempotent: a retry records a second refund (and fails once the due amount is covered). Undo with delete_refund.
bearerAuthAuthorizationBearer <token>A personal API token, hvt_…, with scopes such as read:* or write:invoices
id*stringThe invoice's id.
application/json- body
amount*|Greater than 0 and at most the invoice's refund_due, two decimals.
refunded_on?stringNot in the future and not before the credit note; default today.
datemethod*string"bank_transfer""cash""card""twint""other"note?|length <= 200Created
application/json- response
data*curl -X POST 'https://app.helvetly.com/api/v1/invoices/string/refunds' \ -H 'Content-Type: application/json' \ -d '{ "amount": "120.00", "method": "bank_transfer", "refunded_on": "2026-11-12"}'{ "data": { "id": "string", "kind": "invoice", "type_code": "string", "number": "string", "status": "draft", "is_overdue": true, "client_id": "string", "client": { "id": "string", "number": 0, "name": "string" }, "quote": { "id": "string", "number": "string" }, "credited_invoice": { "id": "string", "number": "string" }, "issue_date": "2019-08-24", "due_date": "2019-08-24", "service_date": "2019-08-24", "service_date_end": "2019-08-24", "currency": "string", "language": "string", "vat_mode": "exclusive", "reference": "string", "tax_currency_rate": "string", "intro": "string", "footer": "string", "note": "string", "lines": [ { "id": "string", "position": 0, "description": "string", "quantity": "string", "unit": "string", "unit_price": "1234.50", "discount_percent": "string", "vat_category": "string", "vat_rate": "string", "amount": "1234.50", "vat_exemption_code": "string", "vat_exemption_reason": "string" } ], "discount_percent": "string", "subtotal": "1234.50", "discount_amount": "1234.50", "net_total": "1234.50", "vat_breakdown": [ { "category": "string", "rate": "string", "taxable_amount": "1234.50", "vat_amount": "1234.50" } ], "vat_total": "1234.50", "total": "1234.50", "rounding_amount": "1234.50", "payable_total": "1234.50", "prepaid_total": "1234.50", "prepayments": [ { "id": "string", "number": "string", "payable_total": "1234.50", "status": "string", "vat_breakdown": [ { "category": "string", "rate": "string", "taxable_amount": "1234.50", "vat_amount": "1234.50" } ] } ], "deducted_on": { "id": "string", "number": "string" }, "amount_paid": "1234.50", "amount_credited": "1234.50", "amount_due": "1234.50", "amount_refunded": "1234.50", "refund_due": "1234.50", "payment_methods": { "qr_bill": true, "revolut": true }, "payment": { "iban": "string", "reference_type": "string", "reference": "string", "qr_bill": true, "revolut_url": "string" }, "seller": { "name": "string", "street": "string", "street_number": "string", "apt": "string", "zip": "string", "city": "string", "country": "string", "vat_number": "string", "email": "string", "phone": "string", "electronic_address": { "scheme": "string", "id": "string" }, "registration_number": "string", "region": "string" }, "buyer": { "name": "string", "street": "string", "street_number": "string", "apt": "string", "zip": "string", "city": "string", "country": "string", "vat_number": "string", "email": "string", "phone": "string", "electronic_address": { "scheme": "string", "id": "string" }, "registration_number": "string", "region": "string" }, "payments": [ { "id": "string", "amount": "1234.50", "paid_on": "2019-08-24", "method": "bank_transfer", "note": "string", "created_at": "2019-08-24T14:15:22Z", "created_by": { "id": "string", "name": "string" } } ], "refunds": [ { "id": "string", "amount": "1234.50", "refunded_on": "2019-08-24", "method": "string", "note": "string", "created_at": "2019-08-24T14:15:22Z", "created_by": { "id": "string", "name": "string" } } ], "instalments": { "interval": "string", "items": [ { "seq": 0, "due_date": "2019-08-24", "amount": "1234.50", "effective": "1234.50", "paid": "1234.50", "open": "1234.50", "status": "string", "reference": "string" } ] }, "plan": { "id": "string", "seq": 0, "count": 0 }, "reminders_enabled": true, "issued_at": "2019-08-24T14:15:22Z", "sent_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "origin": "string", "source_document_id": "string" }}