Generate your first e-invoice
Use one store view and one representative sales document for the first check. Keep automatic processing disabled while finance and the receiving system review the output.
Before you generate
- Open Stores > Configuration > MageB2B > E-Invoice at the store view used by the sample order.
- Enable e-invoicing and choose the format named in the recipient's contract.
- Complete seller identity, contact, VAT, payment and bank fields that the selected format requires.
- Confirm the order has the buyer address, VAT data, procurement reference and payment data needed by the recipient.
- Use Test Configuration, Test XSD Schemas and Test Company Data. These are local checks, not receiver acceptance.
Invoice workflow
- Set invoice generation mode to Disabled - Manual Only and save the store view.
- Open Sales > Invoices, open the representative invoice and choose Generate E-Invoice.
- Reopen or refresh the invoice detail page and read the E-Invoice Information block.
- Confirm
generated, the selected format, generated timestamp and the available XML/PDF paths. If the status iserror, stop and correct the stored error before retrying. - Download XML and, for ZUGFeRD or Factur-X, the hybrid PDF.
- Choose Validate E-Invoice on the invoice detail page and record the local result.
- Run
einvoice:verify-amounts --file=<path>for CII totals, then submit the same file to the recipient's nominated validator.
generated means Magento completed local document generation and recorded the result. It does not mean that an access point, portal or recipient received or accepted it.
Credit memo workflow
Credit memos are independent:
- Enable Credit Memo E-Invoicing in the sample document's store view.
- Confirm the document type requested by the receiver:
381is a credit note, while384represents a corrected invoice with negative values. - Create a representative partial refund and open it under Sales > Credit Memos.
- Choose Generate E-Invoice in the E-Invoice Information block.
- Confirm the local status, format, timestamp and available downloads, then inspect the XML or hybrid PDF.
- Validate the exported file with the appropriate CLI or external validator and compare refund lines, VAT buckets and totals with Magento.
The credit-memo detail page provides generation, download and XML-content actions. It does not provide the invoice detail page's Validate E-Invoice action, so do not document or test a credit-memo validation button.
Move to automation
After the sample passes review, choose immediate, queue or cron processing and test the matching worker. Enable invoice and credit-memo email attachments separately. Keep the generated file and receiver response with the finance test record.