Skip to main content

Order number and duplicate checking

The order number is an optional field in the <fejlec> block of the invoice request (<rendelesSzam>). It links the invoice to the order in your own system, and you can later query the invoice by order number: Query document (XML) / Request, Query document (PDF) / Request.

Disable order number repetition

Whether the same order number can appear on more than one invoice is controlled by an account setting: SettingsAccount settingsInvoicing settings, the "Disable order number repetition" (Rendelésszám ismétlődés tiltása) toggle in the invoice editor settings (Számlaszerkesztő beállítások) section. Receipts have their own, separate toggle with the same name in the receipt editor settings (Nyugtaszerkesztő beállítások) section; see Generating a receipt / Order number on the receipt.

Rendelésszám ismétlődésének tiltása – Számlaszerkesztő beállítások

If the restriction is on:

  • Within a document type, the same order number can only be used once: a new invoice with an already used order number is rejected with the error Már létező rendelésszám: XXX. Az ismétlődés engedélyezhető a Beállítások oldalon. (error code 71 or 152, see Basics / Error handling & error codes).
  • The check is applied per document type: for example, an invoice and a receipt can carry the same order number.
  • Reversal (storno) and corrective invoices are exempt from the check. When an invoice is reversed, its order number becomes reusable again.

If the restriction is off, any number of documents can be created with the same order number.

Repeated request with the same order number

When the restriction is on, the duplicate check also protects you against accidental double submission (e.g. your system did not receive the response due to a timeout and sent the same request again). In this case Számla Agent does not create a second invoice, but returns the previously issued invoice as a successful response, provided that all of the following match the earlier invoice:

  • buyer name,
  • gross total,
  • issue date (keltDatum), payment due date (fizetesiHataridoDatum) and fulfilment date (teljesitesDatum),
  • and the earlier invoice was created within the last 2 days.

If any of these differ, or the earlier invoice is older than 2 days, the request is rejected with the duplicate order number error described above.

tip

If the duplicate check is enabled, you can use the order number as an idempotency safeguard: retrying the exact same invoice creation request will not result in a duplicate invoice. If, on the other hand, your process legitimately issues multiple invoices for one order, disable the restriction.