Documentation for 4.0 (pre-release). Using 3.x? See the README on main.
Skip to content

Reminder Levels (Mahnstufen) ​

Billomat models reminder (dunning) levels via /reminder-texts. The SDK exposes them through ReminderTextsApi:

APIEndpointContent
ReminderTextsApi/reminder-textsText blocks per reminder level (subject, header, footer, fees) — matches the official Mahnstufen page.

The endpoint is read-only in the SDK. The former DunningLevelsApi was removed in 4.0; use $billomat->reminderTexts instead.

Access ​

php
$billomat->reminderTexts   // Justpilot\Billomat\Api\ReminderTextsApi

Endpoints ​

ReminderTextsApi ​

MethodHTTPPath
list($filters?)GET/reminder-texts
get($id)GET/reminder-texts/{id}
getOrFail($id)GET/reminder-texts/{id}

Billomat supports create/update/delete (POST/PUT/DELETE on /reminder-texts), but the SDK doesn't expose them as methods.

Methods ​

ReminderTextsApi::list(array $filters = []): list<ReminderText> ​

php
foreach ($billomat->reminderTexts->list() as $rt) {
    printf("Level %d: %s — '%s'\n",
        $rt->sort ?? 0,
        $rt->name ?? '(no name)',
        $rt->subject ?? '',
    );
}

ReminderTextsApi::get(int $id): ?ReminderText ​

Returns null on 404.

ReminderTextsApi::getOrFail(int $id): ReminderText ​

Like get(), but throws NotFoundException instead of returning null.

Read model ​

ReminderText ​

final readonly class ReminderText.

PropertyBillomat fieldTypePurpose
ididint
namename?stringName of the reminder level (internal)
subjectsubject?stringSubject of the reminder e-mail/letter
headerheader?stringIntroduction
footerfooter?stringClosing note
sortsorting (fallback sort)?intOrder of the level
chargeNamecharge_name?stringName of the reminder fee
chargeDescriptioncharge_description?stringDescription of the reminder fee
chargeAmountcharge_amount?MoneyAmount of the reminder fee (see Money)
customfieldcustomfield?stringFree extra field, see Custom meta attributes
extra—array<string,mixed>Fields the SDK doesn't map yet, raw (see Read models)

Pitfalls ​

  • sort instead of sorting. Billomat returns the order as sorting (formerly sort); the SDK keeps exposing it as ReminderText::$sort, and toArray() writes it under the key sort.
  • Reminder level of a reminder. Reminder::$reminderLevel and Reminder::$reminderLevelName refer to the levels configured here, and Reminder::$reminderTextId to the text used; see Reminders.
  • Single-item list quirk. list() normalizes via listResource(), even if Billomat returns a single level as an object instead of a list.

End-to-end example ​

php
<?php

declare(strict_types=1);

require __DIR__ . '/vendor/autoload.php';

use Justpilot\Billomat\BillomatClient;

$billomat = BillomatClient::create(
    billomatId: 'mycompany',
    apiKey: getenv('BILLOMAT_API_KEY'),
);

// Reminder levels in order
$texts = $billomat->reminderTexts->list();
usort($texts, static fn ($a, $b) => ($a->sort ?? 0) <=> ($b->sort ?? 0));

foreach ($texts as $rt) {
    printf("Level %d: %s\n  Subject: %s\n  Fee: %s EUR (%s)\n",
        $rt->sort ?? 0,
        $rt->name ?? '',
        $rt->subject ?? '',
        $rt->chargeAmount?->format(2) ?? '0.00',
        $rt->chargeName ?? 'none',
    );
}

Unofficial SDK, not affiliated with Billomat GmbH. Released under the Apache License 2.0.