curl --request PATCH \
--url https://api.paywise.de/mahnservice/v1/invoices/{uuid}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoice_number": "<string>",
"amount": "<string>",
"currency": "EUR",
"due_date": "2023-12-25",
"document_date": "2023-12-25",
"your_reference": "<string>",
"debtor": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.paywise.de/mahnservice/v1/invoices/{uuid}/"
payload = {
"invoice_number": "<string>",
"amount": "<string>",
"currency": "EUR",
"due_date": "2023-12-25",
"document_date": "2023-12-25",
"your_reference": "<string>",
"debtor": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invoice_number: '<string>',
amount: '<string>',
currency: 'EUR',
due_date: '2023-12-25',
document_date: '2023-12-25',
your_reference: '<string>',
debtor: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.paywise.de/mahnservice/v1/invoices/{uuid}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paywise.de/mahnservice/v1/invoices/{uuid}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'invoice_number' => '<string>',
'amount' => '<string>',
'currency' => 'EUR',
'due_date' => '2023-12-25',
'document_date' => '2023-12-25',
'your_reference' => '<string>',
'debtor' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.paywise.de/mahnservice/v1/invoices/{uuid}/"
payload := strings.NewReader("{\n \"invoice_number\": \"<string>\",\n \"amount\": \"<string>\",\n \"currency\": \"EUR\",\n \"due_date\": \"2023-12-25\",\n \"document_date\": \"2023-12-25\",\n \"your_reference\": \"<string>\",\n \"debtor\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.paywise.de/mahnservice/v1/invoices/{uuid}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invoice_number\": \"<string>\",\n \"amount\": \"<string>\",\n \"currency\": \"EUR\",\n \"due_date\": \"2023-12-25\",\n \"document_date\": \"2023-12-25\",\n \"your_reference\": \"<string>\",\n \"debtor\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paywise.de/mahnservice/v1/invoices/{uuid}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"invoice_number\": \"<string>\",\n \"amount\": \"<string>\",\n \"currency\": \"EUR\",\n \"due_date\": \"2023-12-25\",\n \"document_date\": \"2023-12-25\",\n \"your_reference\": \"<string>\",\n \"debtor\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"id": "71000000-0000-4000-8000-000000000001",
"invoice_number": "INV-2026-1042",
"amount": "250.00",
"currency": "EUR",
"due_date": "2026-09-01",
"document_date": "2026-08-18",
"your_reference": "CUSTOMER-1042",
"debtor": "72000000-0000-4000-8000-000000000001",
"access_mode": "production",
"dunning_state": "held",
"archived": false,
"has_document": false,
"document": null,
"balance": "250.00",
"paid_amount": "0.00",
"overpaid": false,
"created": "2026-09-02T08:00:00Z",
"updated": "2026-09-02T08:00:00Z"
}{
"detail": "<string>",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"detail": "<string>",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"detail": "<string>",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"detail": "<string>",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"detail": "<string>",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"detail": "<string>",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"detail": "<string>",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}Correct a held invoice
Corrects a still-held invoice (submitted, not yet released). Submit is idempotent and ignores changed fields, so this is the only way to fix a typo without inventing a second invoice_number for a number that belongs to the client’s own accounting system. Partial: only the fields present in the body change. Writable are invoice_number, amount, currency, due_date, document_date, your_reference and debtor; company and access_mode come from the token and are never writable, and the lifecycle fields (dunning_state, archived, has_document, balance) change only through their own endpoints. Renaming invoice_number moves the idempotency key with it, so a later submit of the OLD number creates a new invoice. A corrected due_date re-derives the open/overdue status. The invoice PDF is replaced through POST …/documents/, which is held-only for the same reason. 409 (codes: already_released — nothing is correctable once dunning has started, cancel it and submit a corrected invoice instead; invoice_archived; invoice_paid / invoice_cancelled / invoice_written_off; duplicate_invoice_number; not_api_invoice).
curl --request PATCH \
--url https://api.paywise.de/mahnservice/v1/invoices/{uuid}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoice_number": "<string>",
"amount": "<string>",
"currency": "EUR",
"due_date": "2023-12-25",
"document_date": "2023-12-25",
"your_reference": "<string>",
"debtor": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.paywise.de/mahnservice/v1/invoices/{uuid}/"
payload = {
"invoice_number": "<string>",
"amount": "<string>",
"currency": "EUR",
"due_date": "2023-12-25",
"document_date": "2023-12-25",
"your_reference": "<string>",
"debtor": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invoice_number: '<string>',
amount: '<string>',
currency: 'EUR',
due_date: '2023-12-25',
document_date: '2023-12-25',
your_reference: '<string>',
debtor: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.paywise.de/mahnservice/v1/invoices/{uuid}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paywise.de/mahnservice/v1/invoices/{uuid}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'invoice_number' => '<string>',
'amount' => '<string>',
'currency' => 'EUR',
'due_date' => '2023-12-25',
'document_date' => '2023-12-25',
'your_reference' => '<string>',
'debtor' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.paywise.de/mahnservice/v1/invoices/{uuid}/"
payload := strings.NewReader("{\n \"invoice_number\": \"<string>\",\n \"amount\": \"<string>\",\n \"currency\": \"EUR\",\n \"due_date\": \"2023-12-25\",\n \"document_date\": \"2023-12-25\",\n \"your_reference\": \"<string>\",\n \"debtor\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.paywise.de/mahnservice/v1/invoices/{uuid}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invoice_number\": \"<string>\",\n \"amount\": \"<string>\",\n \"currency\": \"EUR\",\n \"due_date\": \"2023-12-25\",\n \"document_date\": \"2023-12-25\",\n \"your_reference\": \"<string>\",\n \"debtor\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paywise.de/mahnservice/v1/invoices/{uuid}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"invoice_number\": \"<string>\",\n \"amount\": \"<string>\",\n \"currency\": \"EUR\",\n \"due_date\": \"2023-12-25\",\n \"document_date\": \"2023-12-25\",\n \"your_reference\": \"<string>\",\n \"debtor\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"id": "71000000-0000-4000-8000-000000000001",
"invoice_number": "INV-2026-1042",
"amount": "250.00",
"currency": "EUR",
"due_date": "2026-09-01",
"document_date": "2026-08-18",
"your_reference": "CUSTOMER-1042",
"debtor": "72000000-0000-4000-8000-000000000001",
"access_mode": "production",
"dunning_state": "held",
"archived": false,
"has_document": false,
"document": null,
"balance": "250.00",
"paid_amount": "0.00",
"overpaid": false,
"created": "2026-09-02T08:00:00Z",
"updated": "2026-09-02T08:00:00Z"
}{
"detail": "<string>",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"detail": "<string>",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"detail": "<string>",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"detail": "<string>",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"detail": "<string>",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"detail": "<string>",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"detail": "<string>",
"code": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
UUID of the invoice in this request.
Body
A Mahnservice invoice. Created held: no dunning process exists until
POST /invoices/{uuid}/release/ creates one. The debtor is referenced
by UUID and must belong to the same company. Company and environment come
from the token, never the payload. Submitting is idempotent on the
invoice number.
Your invoice number. POST with the same number within the same company and access mode returns the existing API invoice without applying changed fields. PATCH can rename a held invoice and moves this key; a conflicting number returns 409 duplicate_invoice_number. The previous number can then create a new invoice.
1 - 100Decimal string (preferred) or JSON number.
^[0-9]{1,10}(?:\.[0-9]{1,2})?$ISO 4217 currency code for the invoice amount and reported balance (EUR, USD, GBP or CHF). Input is normalized to uppercase. Omit to keep the current currency; once payments have been reported the currency is fixed (409 payments_reported).
EUR, USD, GBP, CHF Invoice payment due date (YYYY-MM-DD, between 1900-01-01 and ten years ahead, not before document_date). The first dunning level is scheduled using this date plus its configured delay; API invoices must still be explicitly released before dunning.
Issue date of the invoice, or null if unknown. On PATCH, null clears the date and omission preserves it.
Optional reference supplied by you for the invoice; this is separate from invoice_number, the submission idempotency key. Omission preserves the reference; null clears it.
255ID of a Mahnservice debtor belonging to the authenticated company and the token's access mode. Use the Mahnservice debtors endpoints to create or find it.
Response
A Mahnservice invoice. Created held: no dunning process exists until
POST /invoices/{uuid}/release/ creates one. The debtor is referenced
by UUID and must belong to the same company. Company and environment come
from the token, never the payload. Submitting is idempotent on the
invoice number.
Your invoice number. POST with the same number within the same company and access mode returns the existing API invoice without applying changed fields. Correct an existing held invoice with PATCH.
100Full invoice amount in the invoice currency, expressed in major units (for example 123.45). API submissions must be greater than zero. Partial reported payments reduce balance while dunning continues over this full amount.
^[0-9]{1,10}(?:\.[0-9]{1,2})?$Invoice payment due date (YYYY-MM-DD, between 1900-01-01 and ten years ahead, not before document_date). The first dunning level is scheduled using this date plus its configured delay; API invoices must still be explicitly released before dunning.
ID of a Mahnservice debtor belonging to the authenticated company and the token's access mode. Use the Mahnservice debtors endpoints to create or find it.
Legacy data-isolation mode inherited from the token, not the API host environment. Modern sandbox and production credentials both use production.
test, production Current dunning process state. held means an API invoice awaits release; an invoice settled while held reports paid, cancelled, or written_off. Null means a bookkeeping invoice has never been enrolled.
held, pending, active, paused, completed, paid, cancelled, written_off, inkasso Whether the invoice is archived. Archived invoices are not sendable. A held archived invoice cannot be released or corrected; repeating release after a process already exists returns its current state.
Whether a usable invoice PDF is stored. A pending, rejected, or failed upload can have a document object while this flag is false.
Current invoice-document ingestion summary, or null when no document record exists. If present, it must reach ready before the invoice can be released.
Show child attributes
Show child attributes
Remaining invoice amount in the invoice currency: amount minus reported payments, with a minimum of zero. Paid, cancelled and written-off invoices report zero. Dunning fees are not included; partial payments do not reduce the amount used in dunning notices.
^-?\d{0,12}(?:\.\d{0,2})?$Sum of all reported payments in the invoice currency. Payments beyond the invoice amount are accepted and counted here; balance never goes below zero.
^-?\d{0,12}(?:\.\d{0,2})?$True when paid_amount exceeds amount. Over-payment is recorded, not refused; reconcile it in your own system.
ISO 4217 currency code for the invoice amount and reported balance (EUR, USD, GBP or CHF). Input is normalized to uppercase. Defaults to EUR when omitted during creation. Dunning fees are charged in EUR.
EUR, USD, GBP, CHF Issue date of the invoice (YYYY-MM-DD, between 1900-01-01 and ten years ahead, not after due_date), or null if not supplied.
Optional reference supplied by you for the invoice; this is separate from invoice_number, the submission idempotency key. Blank and null are stored and returned as null.
255