Skip to content

E-invoicing

France's e-invoicing reform routes invoices through registered platforms (PDP/PA). This page covers the legacy generic e-invoice import endpoint and read access to PA (Plateforme Agreee) registrations.

EInvoices ($client->eInvoices)

Import a legacy e-invoice: a Factur-X PDF, a UBL XML invoice, or a CII XML invoice.

Deprecated and beta. The class docblock marks this endpoint both deprecated ("superseded by the per resource e_invoices/imports endpoints", meaning the importEInvoice methods on customerInvoices and supplierInvoices) and beta ("subject to change"). Its path is also the only kebab-case path in the whole API: /e-invoices/imports, versus the snake_case used everywhere else (/customer_invoices, /pa_registrations, and so on). New integrations should prefer the per-resource import methods instead of this endpoint.

Method HTTP Scope Description
importEInvoice($file, $type) POST /e-invoices/imports e_invoices:all Import a Factur-X PDF, a UBL XML invoice or a CII XML invoice. type is one of customer, supplier. (deprecated, beta)

PaRegistrations ($client->paRegistrations)

Read PA (Plateforme Agreee) registrations.

Method HTTP Scope Description
list() GET /pa_registrations pa_registrations:readonly List PA registrations.

Example

<?php

declare(strict_types=1);

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

use Pennylane\Sdk\FileUpload;
use Pennylane\Sdk\Pennylane;

$client = new Pennylane();

foreach ($client->paRegistrations->list() as $registration) {
    echo "PA registration {$registration->id}\n";
}

// Legacy import path, kept for existing integrations only.
$ref = $client->eInvoices->importEInvoice(
    FileUpload::fromPath('/path/to/invoice.pdf'),
    'supplier',
);
echo "Imported as {$ref->id}\n";