Skip to main content

Use cases

Credit note linked to one invoice (1 credit note = 1 invoice)

Issue a full or partial credit note on an issued invoice

In the current Scell.io version, a credit note is strictly linked to ONE issued invoice. Endpoint `POST /api/v1/invoices/{invoice_id}/credit-notes`: specify the lines to credit (subset of the parent invoice's lines) or the total amount. The credit note inherits parent invoice data (buyer, seller, references) and receives its own fiscal number in the credit note series. The credit note PDF and fiscal chain are generated. The multi-invoice business rule (1 credit note → N invoices) is NOT yet supported — use N distinct credit notes if needed. Credit notes follow ISCA self-certification: no delete, immutability after `issued` status.

Key facts

  • 1 credit note = 1 parent invoice (current limit)
  • Full credit note (invoice amount) or partial (selected lines)
  • Independent numbering (credit note series)
  • Factur-X PDF auto-generated
  • Immutable after `issued` status (ISCA self-certification)
  • Delete FORBIDDEN: only issuing a new credit note corrects an error

Code example

use Scell\Sdk\ScellClient;

$scell = new ScellClient(getenv('SCELL_SECRET_KEY'));

// Avoir partiel : annuler la ligne 2 de la facture INV-2026-042
$creditNote = $scell->invoices()->createCreditNote('inv_42', [
    'reason' => 'Erreur de tarification ligne 2',
    'lines' => [
        ['parent_line_id' => 'line_2', 'quantity' => 1, 'unit_price' => 250.00, 'vat_rate' => 20],
    ],
    'issue_date' => '2026-05-03',
]);

echo "Avoir émis : {$creditNote->number} (PDF: {$creditNote->pdf_url})\n";

See also

Your cookie preferences

We use cookies to improve your experience. Essential cookies are always active. Cookie policy.