Read from the package's own PHP files at the commit 472e2cf40ca6: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.
ConfigclassA gateway's configuration while its factory builds it: the options given, the factory's defaults under them, and the keys that must be filled.
5 methods
GatewayclassA gateway's actions behind one door: the first action supporting a request answers it.
13 methods
GatewayFactoryclassThe Omnibus way: a gateway's factory fills a Config - its name, title, capabilities, the options it needs, its client ("omnibill.api", a closure of the Config: a provider's API, a token signer, a store) and its actions ("omnibill.action.<name>") - and the gateway is those actions, the client handed to the ones that ask for it.
3 methods
GatewayFactoryInterfaceinterfaceBuilds a gateway from its options (a platform's address, a client and its secret, a mailer's sender...).
2 methods
GatewayInterfaceinterfaceOne way to transmit and receive electronic invoices, configured - an e-mail, an approved platform, the public sector's portal: the same questions for all of them. Each typed method is a shortcut for execute() with its request; a gateway that does not do something throws NotSupportedException, and supports() says so beforehand.
12 methods
RegistryclassThe application's gateways by name, each built once from its factory and options:
8 methods
ActionInterfaceinterfaceOne thing a gateway does: answers the requests it supports.
2 methods
ApiAwareInterfaceinterfaceAn action that works through the gateway's own client: a provider's API, a signer, a store.
1 method
ApiAwareTraittrait1 method
OmnibillBundleclassOmnibill in a Symfony application: the gateway packages installed (omnibill/email, omnibill/afnor, omnibill/chorus-pro) registered, the gateways built from configuration and injectable by their name:
2 methods
InvalidConfigExceptionclassA gateway misconfigured: an option missing, an unknown factory, an invoice or a status without what the gateway needs.
InvalidKeyExceptionclassThe platform refused the application's credentials: a client, a secret, a technical account.
InvalidNotificationExceptionclassA callback that is not the provider's: its signature does not hold, or it is too old.
NotSupportedExceptionclassThe gateway does not do that: no directory behind an e-mail, no inbox for a supplier on Chorus Pro. supports() says so beforehand.
1 method
OmnibillExceptioninterfaceEvery exception Omnibill throws.
ProviderExceptionclassThe platform refused the request, or answered with an error.
1 method · 2 properties
UnreachableExceptionclassThe platform did not answer: no connection, a timeout, a server error, a quota exceeded. Nothing was transmitted, nothing was decided: try again.
AnswerclassA provider's answer, read whole: its status, headers (lower-case names) and body. send() is the one place the family's gateways call through: no connection, a timeout, a server error or a quota exceeded is an UnreachableException - the provider said nothing about the request - and anything else comes back for the gateway to read. The request's secrets stay out of what it throws: the HTTP client's message with the key's parameters masked (Redaction::text(), api_key=***), its exception wrapped as a copy (Redaction::copy()), no trace keeping the arguments where the options stood.
4 methods · 3 properties
ClientCredentialsclassAn OAuth 2.0 access token by the client credentials grant - what the platforms' APIs ask (XP Z12-013's, PISTE's): asked once, kept until a minute before it lapses.
3 methods
RedactionclassWhat a failed call may carry of its credentials, taken out before the failure leaves the package: an HTTP client's exception quotes the URL called (a key in its query, a password in its user part), and every exception's trace keeps the arguments of the calls under it (the request options, headers and query with the key) unless PHP runs with zend.exception_ignore_args.
5 methods · 1 constant
AddressingclassWhere a company receives its invoices, as a directory answers: a line of the national directory - a SIREN, maybe a SIRET and a routing code, the electronic address to send to, the kind of platform behind it.
2 methods · 8 properties
CapabilitiesclassWhat a gateway carries and how, said before anything is sent. The operations it answers are asked of the gateway itself (supports()).
3 methods · 4 properties
Directionenum2 cases
EReportclassAn e-reporting file: the transactions with private persons or abroad, and their payments, as the tax administration asks them - already produced, like an invoice.
1 method · 4 properties
Eventenum3 cases
FlowclassOne transmission on a gateway: an invoice, a status, a report, sent or received. The platform's reference is what to keep, to ask about it again.
2 methods · 13 properties
FlowKindenumWhat a flow carries.
4 cases
FlowStateenumWhether the platform took the file - its technical acknowledgement, not what the recipient did with the invoice (LifecycleStatus).
3 cases
InboxclassWhat receive() found, and where to start next time: keep the cursor and give it back to the next receive().
3 methods · 3 properties
InvoiceclassAn invoice to transmit, or one received: its file, already conformant (Factur-X, UBL, CII - the application's to produce: horstoeko/zugferd), and what the application knows of it. The family reads nothing inside the file; what a gateway needs beyond it - a number to follow it by, a recipient's e-mail - is given here.
4 methods · 11 properties
LifecycleStatusenumWhere an invoice stands, in the words of the French reform: the lifecycle statuses of the DGFiP's external specifications (general file v3.2, 2026-04-30), each with its code - 200, 210, 212 and 213 are mandatory, the others optional. SENT is the family's own: an invoice handed to its recipient outside any platform (by e-mail).
5 methods · 15 cases
NotificationclassWhat a platform told the application's webhook, its signature checked: an event about one flow. Fetch or receive what it announces.
1 method · 5 properties
PartyclassA company on an invoice: who issues it, who receives it. Identifiers only - a name for the people who read it, an e-mail for the gateway that sends by e-mail.
1 method · 7 properties
ReceivedclassOne thing a gateway received for the application: an invoice from a supplier, or a status about an invoice - the flow it came in, and its file.
2 methods · 3 properties
StatusChangeclassOne step of an invoice's lifecycle: told by a platform, or declared by the application (setStatus: "paid", "refused"). Where a platform carries statuses as files (CDAR), the file is given: the family does not write one.
1 method · 8 properties
SyntaxenumThe syntax of a file a gateway carries - the names XP Z12-013's Flow Service gives them. The family reads none: a file arrives conformant.
2 methods · 5 cases
FetchStatusclassWhere a flow stands now: the platform's acknowledgement, the invoice's status. Result: the Flow, updated.
2 methods · 1 property
LookupclassWhere a company receives its invoices: the directory's lines for a SIREN (9 digits) or a SIRET (14). Result: a list of Addressing, empty when the company is not in the directory.
2 methods · 1 property
NotifyclassWhat the provider sent to the application's webhook: the raw body and the request's headers, for the signature. Result: the Notification, or InvalidNotificationException when the signature does not hold.
3 methods · 2 properties
ReceiveclassWhat arrived for the application since the cursor given: invoices from suppliers, statuses about its own invoices. Result: an Inbox, with the cursor to give next time.
2 methods · 2 properties
ReportclassTransmit an e-reporting file. Result: its Flow.
2 methods · 2 properties
RequestclassA question put to a gateway. The action that supports it answers by setting the result; the gateway hands the request back.
3 methods
SetStatusclassDeclare a status: a supplier's invoice refused or approved, one's own invoice paid. Result: the Flow that carried it, or the invoice's, updated.
2 methods · 2 properties
SubmitclassTransmit an invoice. Result: its Flow, PENDING until the platform checked it.
2 methods · 2 properties
Omnibill
Config class
final class Config extends ArrayObject Config.php:13
A gateway's configuration while its factory builds it: the options given, the factory's defaults under them, and the keys that must be filled.
Config::defaults()
public function defaults(array $defaults): selfSets each key not set yet.
Config::validateNotEmpty()
public function validateNotEmpty(array $keys): voidConfig::get()
public function get(string $key, mixed $default = null): mixedConfig::bool()
public function bool(string $key): boolA boolean option, as an environment variable gives it too: "1", "true", "yes", "on".
Config::list()
public function list(string $key): arrayA list given as one environment variable arrives as a single comma-separated string: split here, at run time.
Gateway class
final class Gateway implements GatewayInterface Gateway.php:17
A gateway's actions behind one door: the first action supporting a request answers it.
Gateway::__construct()
public function __construct(readonly string $name, readonly string $title, readonly Capabilities $capabilities, readonly array $actions)Gateway::getName()
public function getName(): stringGateway::getTitle()
public function getTitle(): stringGateway::capabilities()
public function capabilities(): CapabilitiesGateway::supports()
public function supports(string $request): boolGateway::execute()
public function execute(Request\Request $request): Request\RequestGateway::submit()
public function submit(Invoice $invoice, ?string $trackingId = null): FlowGateway::fetchStatus()
public function fetchStatus(Flow $flow): FlowGateway::receive()
public function receive(?string $cursor = null, int $limit = 25): InboxGateway::setStatus()
public function setStatus(StatusChange $change, ?Flow $flow = null): FlowGateway::lookup()
public function lookup(string $identifier): arrayGateway::report()
public function report(EReport $report, ?string $trackingId = null): FlowGateway::notify()
public function notify(string $body, array $headers = []): NotificationGatewayFactory class
abstract class GatewayFactory implements GatewayFactoryInterface GatewayFactory.php:20
The Omnibus way: a gateway's factory fills a Config - its name, title, capabilities, the options it needs, its client ("omnibill.api", a closure of the Config: a provider's API, a token signer, a store) and its actions ("omnibill.action.<name>") - and the gateway is those actions, the client handed to the ones that ask for it.
Nothing here calls anything: a factory whose provider is reached over HTTP takes its client in its own constructor.
GatewayFactory::getName()
public function getName(): stringGatewayFactory::create()
public function create(array $options = []): GatewayInterfaceGatewayFactory::createConfig()
public function createConfig(array $options = []): ConfigGatewayFactoryInterface interface
interface GatewayFactoryInterface GatewayFactoryInterface.php:6
Builds a gateway from its options (a platform's address, a client and its secret, a mailer's sender...).
GatewayFactoryInterface::getName()
public function getName(): stringThe name gateways are configured with: "email", "afnor", "chorus-pro".
..
GatewayFactoryInterface::create()
public function create(array $options = []): GatewayInterfaceGatewayInterface interface
interface GatewayInterface GatewayInterface.php:26
One way to transmit and receive electronic invoices, configured - an e-mail, an approved platform, the public sector's portal: the same questions for all of them. Each typed method is a shortcut for execute() with its request; a gateway that does not do something throws NotSupportedException, and supports() says so beforehand.
A gateway carries files already conformant. It produces none, reads none beyond what it must to route them (a lifecycle message's status), and keeps no books: the application does.
GatewayInterface::getName()
public function getName(): stringGatewayInterface::getTitle()
public function getTitle(): stringGatewayInterface::capabilities()
public function capabilities(): CapabilitiesWhat it carries, and whether it is an approved platform's channel.
GatewayInterface::supports()
public function supports(string $request): boolGatewayInterface::execute()
public function execute(Request $request): Request- Returns
answered
- Throws
Exception\NotSupportedException
- Throws
Exception\ProviderException
GatewayInterface::submit()
public function submit(Invoice $invoice, ?string $trackingId = null): FlowTransmit an invoice: its flow, to keep.
GatewayInterface::fetchStatus()
public function fetchStatus(Flow $flow): FlowThe flow as the platform has it now.
GatewayInterface::receive()
public function receive(?string $cursor = null, int $limit = 25): InboxWhat arrived since the cursor: invoices, statuses.
GatewayInterface::setStatus()
public function setStatus(StatusChange $change, ?Flow $flow = null): FlowDeclare a status: paid, refused, approved.
..
GatewayInterface::lookup()
public function lookup(string $identifier): arrayWhere a company receives its invoices (SIREN or SIRET).
GatewayInterface::report()
public function report(EReport $report, ?string $trackingId = null): FlowTransmit an e-reporting file.
GatewayInterface::notify()
public function notify(string $body, array $headers = []): NotificationWhat the platform is telling us (a webhook): checked against its signature, read as one event.
- Throws
Exception\InvalidNotificationException when the signature does not hold
Registry class
final class Registry Registry.php:16
The application's gateways by name, each built once from its factory and options:
new Registry([new EmailGatewayFactory($mailer), new AfnorGatewayFactory($http)], [ 'email' => ['factory' => 'email', 'options' => ['from' => 'factures@example.org']], 'platform' => ['factory' => 'afnor', 'options' => ['flow_url' => 'https://api.flow.example-pa.fr/flow-service', 'token_url' => '...', 'client_id' => '...', 'client_secret' => '...']], ]);
Registry::__construct()
public function __construct(iterable $factories, readonly array $config)Registry::get()
public function get(string $name): GatewayInterfaceRegistry::has()
public function has(string $name): boolRegistry::options()
public function options(string $name): array- Returns
the options a gateway is configured with
Registry::create()
public function create(string $name, array $overrides = []): GatewayInterfaceA gateway built afresh, its configured options with $overrides over them - an instance typed in a back office, say. Not kept: get() still gives the configured one.
Registry::names()
public function names(): array- Returns
the configured gateways' names
Registry::all()
public function all(): arrayRegistry::factories()
public function factories(): array- Returns
the factories installed: what
factory:may name
Omnibill\Action
ActionInterface interface
interface ActionInterface ActionInterface.php:8
One thing a gateway does: answers the requests it supports.
ActionInterface::supports()
public function supports(Request $request): boolActionInterface::execute()
public function execute(Request $request): voidSets the request's result, or throws an Omnibill\Exception\OmnibillException.
ApiAwareInterface interface
interface ApiAwareInterface ApiAwareInterface.php:6
An action that works through the gateway's own client: a provider's API, a signer, a store.
ApiAwareInterface::setApi()
public function setApi(object $api): voidApiAwareTrait trait
trait ApiAwareTrait ApiAwareTrait.php:10
ApiAwareTrait::setApi()
public function setApi(object $api): voidOmnibill\Bridge\Symfony
OmnibillBundle class
final class OmnibillBundle extends AbstractBundle OmnibillBundle.php:48
Omnibill in a Symfony application: the gateway packages installed (omnibill/email, omnibill/afnor, omnibill/chorus-pro) registered, the gateways built from configuration and injectable by their name:
omnibill: gateways: email: factory: email options: { from: 'factures@example.org' } platform: factory: afnor options: { flow_url: '%env(PA_FLOW_URL)%', directory_url: '%env(PA_DIRECTORY_URL)%', token_url: '%env(PA_TOKEN_URL)%', client_id: '%env(PA_CLIENT_ID)%', client_secret: '%env(PA_CLIENT_SECRET)%' } public: factory: chorus-pro options: { client_id: '%env(PISTE_CLIENT_ID)%', client_secret: '%env(PISTE_CLIENT_SECRET)%', login: '%env(CPRO_LOGIN)%', password: '%env(CPRO_PASSWORD)%' }
public function __construct(GatewayInterface $email, GatewayInterface $platform) }Nothing is built, nor checked, when the container compiles: a gateway is built the first time it is asked for, and an option left empty only shows then (InvalidConfigException).
A factory is autowired: what its constructor asks for - omnibill/email's mailer and status store - is the application's service of that type, when it has one; the application's http_client is given to those that call a platform. An application's own factories (a GatewayFactoryInterface) are registered too, autoconfigured.
OmnibillBundle::configure()
public function configure(DefinitionConfigurator $definition): voidOmnibillBundle::loadExtension()
public function loadExtension(array $config, ContainerConfigurator $container, ContainerBuilder $builder): voidOmnibill\Exception
InvalidConfigException class
final class InvalidConfigException extends LogicException implements OmnibillException InvalidConfigException.php:6
A gateway misconfigured: an option missing, an unknown factory, an invoice or a status without what the gateway needs.
InvalidKeyException class
final class InvalidKeyException extends ProviderException InvalidKeyException.php:6
The platform refused the application's credentials: a client, a secret, a technical account.
InvalidNotificationException class
final class InvalidNotificationException extends ProviderException InvalidNotificationException.php:6
A callback that is not the provider's: its signature does not hold, or it is too old.
NotSupportedException class
final class NotSupportedException extends LogicException implements OmnibillException NotSupportedException.php:11
The gateway does not do that: no directory behind an e-mail, no inbox for a supplier on Chorus Pro. supports() says so beforehand.
NotSupportedException::for()
public static function for(Request $request, string $gateway): selfOmnibillException interface
interface OmnibillException extends Throwable OmnibillException.php:6
Every exception Omnibill throws.
ProviderException class
class ProviderException extends RuntimeException implements OmnibillException ProviderException.php:6
The platform refused the request, or answered with an error.
public readonly string $providerpublic readonly ?string $providerCodeThe provider's own error code, when it gave one
ProviderException::__construct()
public function __construct(public readonly string $provider, string $message, public readonly ?string $providerCode = null, ?\Throwable $previous = null)UnreachableException class
final class UnreachableException extends ProviderException UnreachableException.php:9
The platform did not answer: no connection, a timeout, a server error, a quota exceeded. Nothing was transmitted, nothing was decided: try again.
Omnibill\Http
Answer class
final readonly class Answer Answer.php:21
A provider's answer, read whole: its status, headers (lower-case names) and body. send() is the one place the family's gateways call through: no connection, a timeout, a server error or a quota exceeded is an UnreachableException - the provider said nothing about the request - and anything else comes back for the gateway to read. The request's secrets stay out of what it throws: the HTTP client's message with the key's parameters masked (Redaction::text(), api_key=***), its exception wrapped as a copy (Redaction::copy()), no trace keeping the arguments where the options stood.
public int $statuspublic array $headerspublic string $body
Answer::__construct()
public function __construct(public int $status, public array $headers, public string $body, string $provider)Answer::send()
public static function send(HttpClientInterface $http, string $provider, string $method, string $url, array $options = []): self$optionsthe HTTP client's options: body, json, query, headers, timeout
Answer::header()
public function header(string $name): ?stringAnswer::json()
public function json(): arrayThe body as a JSON object.
ClientCredentials class
final class ClientCredentials ClientCredentials.php:13
An OAuth 2.0 access token by the client credentials grant - what the platforms' APIs ask (XP Z12-013's, PISTE's): asked once, kept until a minute before it lapses.
ClientCredentials::__construct()
public function __construct(readonly HttpClientInterface $http, readonly string $provider, readonly string $tokenUrl, readonly string $clientId, readonly string $clientSecret, readonly ?string $scope = null, readonly ?\Closure $clock = null)ClientCredentials::token()
public function token(): stringClientCredentials::reset()
public function reset(): voidForget the token: the next call asks for a new one (after a 401).
Redaction class
final class Redaction Redaction.php:22
What a failed call may carry of its credentials, taken out before the failure leaves the package: an HTTP client's exception quotes the URL called (a key in its query, a password in its user part), and every exception's trace keeps the arguments of the calls under it (the request options, headers and query with the key) unless PHP runs with zend.exception_ignore_args.
copy() gives the previous exception to wrap instead of the client's own: the same class and code, its message with the key's parameters, the user part and every secret value replaced by ***, its trace without arguments, its own previous copied the same way. Properties of the client's class beyond those of \Exception are not copied (a Symfony HttpException's response, a PSR-18 exception's request: their URL holds the key). withoutArguments() takes the arguments out of the trace of the exception thrown in its place.
const MASK = '***'
Redaction::secrets()
public static function secrets(string $url, array $options = []): arrayThe secrets a request carries: the values of its query parameters, headers and body fields named as credentials (key, token, secret, password, signature, auth...), a bearer token, a basic password, the URL's user part.
$optionsthe HTTP client's options
Redaction::sensitive()
public static function sensitive(string $name): boolWhether a parameter, header or field of this name holds a credential.
Redaction::text()
public static function text(string $text, array $secrets = []): stringA text without credentials: in every address, the user part and the parameters named as credentials masked (api_key=***); then every secret given, raw or URL-encoded, masked wherever it stands.
Redaction::copy()
public static function copy(\Throwable $failure, array $secrets = []): \ThrowableA copy of a failure to wrap in its place: its class, code, file and line, its message through text(), its trace without arguments, its previous copied the same way.
Redaction::withoutArguments()
public static function withoutArguments(\Throwable $failure): \ThrowableThe failure given, the arguments out of its trace (and out of its previous ones'), as zend.exception_ignore_args would have left it.
Omnibill\Model
Addressing class
final readonly class Addressing Addressing.php:10
Where a company receives its invoices, as a directory answers: a line of the national directory - a SIREN, maybe a SIRET and a routing code, the electronic address to send to, the kind of platform behind it.
public string $sirenpublic ?string $siretpublic ?string $routingCodepublic ?string $electronicAddresspublic ?string $namepublic ?string $platformWK: an approved platform (PA); DFH: the public portal (PPF), as the directory codes them
public ?string $statusEnabled, Disabled, Upcoming
public array $data
Addressing::__construct()
public function __construct(public string $siren, public ?string $siret = null, public ?string $routingCode = null, public ?string $electronicAddress = null, public ?string $name = null, public ?string $platform = null, public ?string $status = null, public array $data = [])$platformWK: an approved platform (PA); DFH: the public portal (PPF), as the directory codes them
$statusEnabled, Disabled, Upcoming
Addressing::isEnabled()
public function isEnabled(): boolCapabilities class
final readonly class Capabilities Capabilities.php:9
What a gateway carries and how, said before anything is sent. The operations it answers are asked of the gateway itself (supports()).
public array $syntaxesthe files it carries
public bool $approvedwhether it is an approved platform's channel (plateforme agréée): what the reform asks of B2B invoices
public bool $publicSectorwhether it reaches public entities (B2G)
public ?int $maxSizebytes a file may weigh
Capabilities::__construct()
public function __construct(public array $syntaxes = [Syntax::FACTURX, Syntax::UBL, Syntax::CII], public bool $approved = false, public bool $publicSector = false, public ?int $maxSize = null)$syntaxesthe files it carries
$approvedwhether it is an approved platform's channel (plateforme agréée): what the reform asks of B2B invoices
$publicSectorwhether it reaches public entities (B2G)
$maxSizebytes a file may weigh
Capabilities::carries()
public function carries(Syntax $syntax): boolCapabilities::toArray()
public function toArray(): arrayDirection enum
enum Direction Direction.php:5
case OUT = 'out'Sent by the application
case IN = 'in'Received by the application
EReport class
final readonly class EReport EReport.php:10
An e-reporting file: the transactions with private persons or abroad, and their payments, as the tax administration asks them - already produced, like an invoice.
public string $contentpublic string $filenamepublic Syntax $syntaxpublic ?string $ruleB2C, B2BInt... where the platform asks
EReport::__construct()
public function __construct(public string $content, public string $filename, public Syntax $syntax = Syntax::FRR, public ?string $rule = null)$ruleB2C, B2BInt... where the platform asks
Event enum
enum Event Event.php:5
case FLOW_UPDATED = 'flow_updated'A flow was taken or rejected by the platform
case RECEIVED = 'received'Something arrived for the application: an invoice, a status
case OTHER = 'other'
Flow class
final readonly class Flow Flow.php:10
One transmission on a gateway: an invoice, a status, a report, sent or received. The platform's reference is what to keep, to ask about it again.
public string $referencethe gateway's name for it: a flow id, a deposit number, a message id
public FlowKind $kindpublic Direction $directionpublic FlowState $statepublic ?string $trackingIdthe application's own, where the platform keeps one
public ?string $invoiceNumberthe invoice it is about
public ?\DateTimeImmutable $submittedAtpublic ?\DateTimeImmutable $updatedAtpublic ?LifecycleStatus $statusthe invoice's latest status, as far as the gateway knows
public array $historythe statuses known, oldest first
public array $errorswhy the platform rejected it
public ?string $namepublic array $datawhat else the platform answered
Flow::__construct()
public function __construct(public string $reference, public FlowKind $kind = FlowKind::INVOICE, public Direction $direction = Direction::OUT, public FlowState $state = FlowState::PENDING, public ?string $trackingId = null, public ?string $invoiceNumber = null, public ?\DateTimeImmutable $submittedAt = null, public ?\DateTimeImmutable $updatedAt = null, public ?LifecycleStatus $status = null, public array $history = [], public array $errors = [], public ?string $name = null, public array $data = [])$referencethe gateway's name for it: a flow id, a deposit number, a message id
$trackingIdthe application's own, where the platform keeps one
$invoiceNumberthe invoice it is about
$statusthe invoice's latest status, as far as the gateway knows
$historythe statuses known, oldest first
$errorswhy the platform rejected it
$datawhat else the platform answered
Flow::with()
public function with(?FlowState $state = null, ?LifecycleStatus $status = null, ?array $history = null, ?array $errors = null, ?\DateTimeImmutable $updatedAt = null, ?array $data = null): selfFlowKind enum
enum FlowKind FlowKind.php:6
What a flow carries.
case INVOICE = 'invoice'case LIFECYCLE = 'lifecycle'case REPORT = 'report'case OTHER = 'other'
FlowState enum
enum FlowState FlowState.php:9
Whether the platform took the file - its technical acknowledgement, not what the recipient did with the invoice (LifecycleStatus).
case PENDING = 'pending'Received, not checked yet
case ACCEPTED = 'accepted'Checked and taken
case REJECTED = 'rejected'Refused by the platform's checks: see the flow's errors
Inbox class
final readonly class Inbox Inbox.php:9
What receive() found, and where to start next time: keep the cursor and give it back to the next receive().
public array $itemspublic ?string $cursorpublic bool $more
Inbox::__construct()
public function __construct(public array $items = [], public ?string $cursor = null, public bool $more = false)Inbox::invoices()
public function invoices(): arrayInbox::statuses()
public function statuses(): arrayInvoice class
final readonly class Invoice Invoice.php:12
An invoice to transmit, or one received: its file, already conformant (Factur-X, UBL, CII - the application's to produce: horstoeko/zugferd), and what the application knows of it. The family reads nothing inside the file; what a gateway needs beyond it - a number to follow it by, a recipient's e-mail - is given here.
public string $contentthe file's bytes
public string $filenamewith its extension: what the platform and the recipient see
public Syntax $syntaxpublic ?string $numberthe invoice's number: what its statuses are followed by
public ?Party $sellerpublic ?Party $buyerpublic ?\DateTimeImmutable $issuedAtpublic ?string $totalthe amount due, as a decimal string: "1234.50"
public ?string $currencypublic ?string $profileBasic, CIUS, Extended-CTC-FR, where the platform asks
public ?string $rulethe processing rule, where the platform asks: B2B, B2BInt, B2C, B2G...
Invoice::__construct()
public function __construct(public string $content, public string $filename, public Syntax $syntax, public ?string $number = null, public ?Party $seller = null, public ?Party $buyer = null, public ?\DateTimeImmutable $issuedAt = null, public ?string $total = null, public ?string $currency = 'EUR', public ?string $profile = null, public ?string $rule = null)$contentthe file's bytes
$filenamewith its extension: what the platform and the recipient see
$numberthe invoice's number: what its statuses are followed by
$totalthe amount due, as a decimal string: "1234.50"
$profileBasic, CIUS, Extended-CTC-FR, where the platform asks
$rulethe processing rule, where the platform asks: B2B, B2BInt, B2C, B2G...
Invoice::fromFile()
public static function fromFile(string $path, ?Syntax $syntax = null, ?string $number = null, ?Party $buyer = null): selfAn invoice from a file on disk, its syntax told by the extension unless given.
Invoice::sha256()
public function sha256(): stringInvoice::size()
public function size(): intLifecycleStatus enum
enum LifecycleStatus LifecycleStatus.php:12
Where an invoice stands, in the words of the French reform: the lifecycle statuses of the DGFiP's external specifications (general file v3.2, 2026-04-30), each with its code - 200, 210, 212 and 213 are mandatory, the others optional. SENT is the family's own: an invoice handed to its recipient outside any platform (by e-mail).
case SENT = 'sent'case DEPOSITED = 'deposited'case ISSUED = 'issued'case RECEIVED = 'received'case MADE_AVAILABLE = 'made_available'case TAKEN_OVER = 'taken_over'case APPROVED = 'approved'case PARTIALLY_APPROVED = 'partially_approved'case DISPUTED = 'disputed'case SUSPENDED = 'suspended'case COMPLETED = 'completed'case REFUSED = 'refused'case PAYMENT_SENT = 'payment_sent'case PAID = 'paid'case REJECTED = 'rejected'
LifecycleStatus::code()
public function code(): ?intThe reform's code: 200 to 213; null for SENT.
LifecycleStatus::label()
public function label(): stringIts name in the DGFiP's specifications.
LifecycleStatus::isMandatory()
public function isMandatory(): boolWhether the reform makes it mandatory: Déposée, Refusée, Encaissée, Rejetée.
LifecycleStatus::isFinal()
public function isFinal(): boolWhether nothing follows it: refused, rejected, paid.
LifecycleStatus::fromCode()
public static function fromCode(int|string $code): ?selfFrom a code, "212" or "fr:212" as some platforms write it; null when it is not one.
Notification class
final readonly class Notification Notification.php:9
What a platform told the application's webhook, its signature checked: an event about one flow. Fetch or receive what it announces.
public Event $eventpublic ?Flow $flowpublic ?\DateTimeImmutable $atpublic ?string $idthe same for a callback sent twice: what to deduplicate on
public array $datathe platform's payload
Notification::__construct()
public function __construct(public Event $event, public ?Flow $flow = null, public ?\DateTimeImmutable $at = null, public ?string $id = null, public array $data = [])$idthe same for a callback sent twice: what to deduplicate on
$datathe platform's payload
Party class
final readonly class Party Party.php:10
A company on an invoice: who issues it, who receives it. Identifiers only - a name for the people who read it, an e-mail for the gateway that sends by e-mail.
public ?string $namepublic ?string $sirenthe legal unit (9 digits), France
public ?string $siretthe establishment (14 digits), France
public ?string $electronicAddressthe electronic invoicing address the directory gives (addressing identifier)
public ?string $routingCodea service, a cost centre: the routing code under the SIRET
public ?string $emailwhere an e-mail gateway sends
public ?string $countryISO 3166-1 alpha-2
Party::__construct()
public function __construct(public ?string $name = null, public ?string $siren = null, public ?string $siret = null, public ?string $electronicAddress = null, public ?string $routingCode = null, public ?string $email = null, public ?string $country = 'FR')$sirenthe legal unit (9 digits), France
$siretthe establishment (14 digits), France
$electronicAddressthe electronic invoicing address the directory gives (addressing identifier)
$routingCodea service, a cost centre: the routing code under the SIRET
$emailwhere an e-mail gateway sends
$countryISO 3166-1 alpha-2
Received class
final readonly class Received Received.php:10
One thing a gateway received for the application: an invoice from a supplier, or a status about an invoice - the flow it came in, and its file.
public Flow $flowpublic ?Invoice $invoicepublic ?StatusChange $status
Received::__construct()
public function __construct(public Flow $flow, public ?Invoice $invoice = null, public ?StatusChange $status = null)Received::isInvoice()
public function isInvoice(): boolStatusChange class
final readonly class StatusChange StatusChange.php:11
One step of an invoice's lifecycle: told by a platform, or declared by the application (setStatus: "paid", "refused"). Where a platform carries statuses as files (CDAR), the file is given: the family does not write one.
public LifecycleStatus $statuspublic ?string $invoiceNumberpublic ?\DateTimeImmutable $atpublic ?string $reasonpublic ?string $amountfor PAID or PARTIALLY_APPROVED, the amount, as a decimal string
public ?string $codethe platform's own code, as it gave it
public ?string $filethe lifecycle message itself (CDAR), where the platform carries one
public ?string $filename
StatusChange::__construct()
public function __construct(public LifecycleStatus $status, public ?string $invoiceNumber = null, public ?\DateTimeImmutable $at = null, public ?string $reason = null, public ?string $amount = null, public ?string $code = null, public ?string $file = null, public ?string $filename = null)$codethe platform's own code, as it gave it
$amountfor PAID or PARTIALLY_APPROVED, the amount, as a decimal string
$filethe lifecycle message itself (CDAR), where the platform carries one
Syntax enum
enum Syntax Syntax.php:9
The syntax of a file a gateway carries - the names XP Z12-013's Flow Service gives them. The family reads none: a file arrives conformant.
case FACTURX = 'Factur-X'A PDF/A-3 with its CII XML inside (Factur-X, ZUGFeRD)
case UBL = 'UBL'UBL 2.1
case CII = 'CII'UN/CEFACT Cross Industry Invoice
case CDAR = 'CDAR'UN/CEFACT Cross Domain Acknowledgement and Response: a lifecycle status
case FRR = 'FRR'An e-reporting file (transactions, payments)
Syntax::mimeType()
public function mimeType(): stringSyntax::extension()
public function extension(): stringOmnibill\Request
FetchStatus class
final class FetchStatus extends Request FetchStatus.php:8
Where a flow stands now: the platform's acknowledgement, the invoice's status. Result: the Flow, updated.
public readonly Flow $flow
FetchStatus::__construct()
public function __construct(public readonly Flow $flow)FetchStatus::getFlow()
public function getFlow(): ?FlowLookup class
final class Lookup extends Request Lookup.php:12
Where a company receives its invoices: the directory's lines for a SIREN (9 digits) or a SIRET (14). Result: a list of Addressing, empty when the company is not in the directory.
public readonly string $identifier
Lookup::__construct()
public function __construct(public readonly string $identifier)Lookup::getAddressings()
public function getAddressings(): ?arrayNotify class
final class Notify extends Request Notify.php:12
What the provider sent to the application's webhook: the raw body and the request's headers, for the signature. Result: the Notification, or InvalidNotificationException when the signature does not hold.
public readonly string $bodypublic readonly array $headers
Notify::__construct()
public function __construct(public readonly string $body, public readonly array $headers = [])Notify::header()
public function header(string $name): ?stringA header, whatever the case it came in.
Notify::getNotification()
public function getNotification(): ?NotificationReceive class
final class Receive extends Request Receive.php:12
What arrived for the application since the cursor given: invoices from suppliers, statuses about its own invoices. Result: an Inbox, with the cursor to give next time.
public readonly ?string $cursorpublic readonly int $limit
Receive::__construct()
public function __construct(public readonly ?string $cursor = null, public readonly int $limit = 25)Receive::getInbox()
public function getInbox(): ?InboxReport class
final class Report extends Request Report.php:9
Transmit an e-reporting file. Result: its Flow.
public readonly EReport $reportpublic readonly ?string $trackingId
Report::__construct()
public function __construct(public readonly EReport $report, public readonly ?string $trackingId = null)Report::getFlow()
public function getFlow(): ?FlowRequest class
abstract class Request Request.php:9
A question put to a gateway. The action that supports it answers by setting the result; the gateway hands the request back.
Request::setResult()
public function setResult(mixed $result): voidRequest::getResult()
public function getResult(): mixedRequest::isAnswered()
public function isAnswered(): boolSetStatus class
final class SetStatus extends Request SetStatus.php:12
Declare a status: a supplier's invoice refused or approved, one's own invoice paid. Result: the Flow that carried it, or the invoice's, updated.
public readonly StatusChange $changepublic readonly ?Flow $flow
SetStatus::__construct()
public function __construct(public readonly StatusChange $change, public readonly ?Flow $flow = null)SetStatus::getFlow()
public function getFlow(): ?FlowSubmit class
final class Submit extends Request Submit.php:9
Transmit an invoice. Result: its Flow, PENDING until the platform checked it.
public readonly Invoice $invoicepublic readonly ?string $trackingId
Submit::__construct()
public function __construct(public readonly Invoice $invoice, public readonly ?string $trackingId = null)Submit::getFlow()
public function getFlow(): ?Flow