Search by

silarhi / caf-parser

guillaume-sainthillier

A PHP parser for CAF LA44ZZ payment slips

3.2.0 2026-10-13 13:41 UTC

This package is auto-updated.

Last update: 2026-10-19 19:42:05 UTC


README

Latest Stable Version Total Downloads License PHP Version CI Status Coverage

CAF Parser

A PHP parser for CAF LA44ZZ payment slips.
Turn the plain-text "bordereau de paiement" sent by the Caisse d'Allocations Familiales into typed PHP objects.

📖 Documentation

Features

  • LA44ZZ payment slips: every payment line of the table (beneficiary, period, gross, deduction and net amounts)
  • Slip metadata: processing and payment dates, CAF name and address, recipient name and address, reference, BIC, IBAN and total
  • Typed results: dates as DateTimeInterface, amounts as float, French and English formats such as 1 298,50 or 1,298.50
  • Strict validation: malformed rows, malformed amounts and invalid or out-of-range dates throw a ParseException
  • No dependencies: plain PHP, Windows (\r\n) and Unix line endings

Requirements

  • PHP 8.2+

Installation

composer require silarhi/caf-parser

Quick start

use Silarhi\Caf\Parser\PaymentSlipParser;

$paymentSlip = (new PaymentSlipParser())->parse(file_get_contents('/path/to/LA44ZZ.txt'));

$paymentSlip->getPaymentDate(); // DateTimeInterface
$paymentSlip->getTotalAmount(); // e.g. 600.0

foreach ($paymentSlip->getLines() as $line) {
    $line->getBeneficiaryName(); // e.g. "MME EXEMPLE ALICE"
    $line->getNetAmount();       // e.g. 312.0
}

parse() throws a ParseException when the content is not a LA44ZZ payment slip, or a row, an amount or a date is invalid.

Documentation

Everything else is on caf-parser.silarhi.dev:

Contributing

See CONTRIBUTING.md. Release notes are in CHANGELOG.md.

License

Released under the MIT License.

Built with care by SILARHI.
If CAF Parser saves you time, consider giving it a star on GitHub.