Important information
Document types
The following document types can be created through this interface. The type is set in the <fejlec> (header) block of the XML request:
- Invoice – the default type; no special field required.
- Prepayment invoice –
<elolegszamla>true</elolegszamla>(advance invoice to record a partial payment before the final invoice). - Final invoice –
<vegszamla>true</vegszamla>(issued after a prepayment invoice to settle the remaining amount).
In Számlázz.hu, one prepayment invoice can have exactly one final invoice. It is not possible to issue multiple partial invoices from a single prepayment invoice, nor to combine multiple prepayment invoices into one final invoice.
- Corrective invoice –
<helyesbitoszamla>true</helyesbitoszamla>+<helyesbitettSzamlaszam>(set to the number of the invoice being corrected). - Pro forma invoice –
<dijbekero>true</dijbekero>(a payment request; not a legally binding invoice). - Delivery note – use the
<szamlaSablon>SzlaFuvarlevelesAlap</szamlaSablon>template; shipping details go in the<fuvarlevel>block. - Reversal (storno) invoice – handled by a separate interface; see Reversing an invoice.
E-invoice or paper invoice
Számla Agent can generate both e-invoices and regular paper-based invoices. The <eszamla> field in the XML controls this: true creates an e-invoice, false creates a traditional paper-based invoice. To issue e-invoices you need your own certificate, or you can use the certificate provided by Számlázz.hu (this is the default option).
Referencing a pro forma invoice
You can issue an invoice by referencing an existing pro forma invoice. For this, set the pro forma invoice number in <dijbekeroSzamlaszam></dijbekeroSzamlaszam> in the invoice request <fejlec> block.
Recommended flow:
- Make sure you have the exact pro forma invoice number you want to reference.
- Prepare the invoice creation XML.
- In
<fejlec>, fill<dijbekeroSzamlaszam>with that pro forma invoice number. - Submit the invoice creation request based on the sample shown on Create invoice > Sample XML.
- Agent creates the invoice linked to that pro forma invoice based on the provided number.
Order number (rendelesSzam) 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: Settings → Account settings → Invoicing 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 / Important information.
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.
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.
Displaying a discount on the invoice
There is no dedicated discount field in the invoice request. A discount is represented as a separate line item with a negative amount:
- Add a new
<tetel>element and put the name or title of the discount in<megnevezes>. - Set the net unit price (
<nettoEgysegar>) to a negative value; the quantity (<mennyiseg>) stays positive. This makes the net, VAT and gross values of the line negative as well. - Use the same VAT rate (
<afakulcs>) as the item the discount applies to. - If the discount belongs to a specific item, place the discount line directly after that item so it is clear on the invoice which product or service it belongs to.
Example discount item (a 2 000 HUF net discount on a 27% VAT item):
<tetel>
<megnevezes>Kedvezmény: Minta termék</megnevezes>
<mennyiseg>1.0</mennyiseg>
<mennyisegiEgyseg>db</mennyisegiEgyseg>
<nettoEgysegar>-2000</nettoEgysegar>
<afakulcs>27</afakulcs>
<nettoErtek>-2000.0</nettoErtek>
<afaErtek>-540.0</afaErtek>
<bruttoErtek>-2540.0</bruttoErtek>
</tetel>
There is no percentage-based or invoice-total discount function in Számlázz.hu. Calculate the discount amount in your own system and send it as a negative line item as shown above.
The usual item amount checks apply to negative lines too: <nettoErtek> = <nettoEgysegar> × <mennyiseg>, <afaErtek> = <nettoErtek> × <afakulcs> / 100, <bruttoErtek> = <nettoErtek> + <afaErtek>. See Basics / Error handling & error codes (codes 259–264).
Related knowledge base article: Hogyan tudok kedvezményt adni a számlán? (page in Hungarian).
Invoice notification e-mail
Számla Agent sends the completed invoice to the buyer by e-mail if the buyer's <email> field is filled in and <sendEmail> is true (or the field is omitted). To prevent the buyer from receiving a notification, send <sendEmail>false</sendEmail>.
To provide multiple e-mail addresses, separate them with a comma (,) in the <email> field.
Customising the e-mail content
Set the subject (<emailTargy>) and body (<emailSzoveg>) in the <elado> block. The body supports the following BBCode tags for formatting:
| BBCode | Effect |
|---|---|
[b]…[/b] | bold |
[i]…[/i] | italic |
[u]…[/u] | underline |
[h1]…[/h1] – [h6]…[/h6] | headings |
[center]…[/center] | centre alignment |
For line breaks, use a manual newline directly inside <emailSzoveg>, no BBCode needed:
<emailSzoveg>first line
second line
</emailSzoveg>
For additional dynamic fields (e.g. inserting the invoice number into the e-mail body), see the knowledge base.
Attachments
You can attach up to 5 files to the notification e-mail. Send them alongside the main XML in the HTTP POST request using field names attachfile1 … attachfile5.
- Size limit per file: 2 MB
- If an attachment is invalid, the system notifies the sender separately for each bad file, but still sends the notification e-mail with the valid attachments.
- If e-mail sending is not requested (
<sendEmail>false</sendEmail>), attachments are not processed.
In a test account, the notification is not delivered to the buyer's e-mail address from the XML, but to the e-mail address configured in the account settings.
Invoice template (szamlaSablon)
To choose a specific invoice layout, set the optional <szamlaSablon> field in the <fejlec> block. If omitted, the default template is used. You can browse visual examples here (page in Hungarian).
| Code | UI name |
|---|---|
SzlaMost | Számlázz.hu ajánlott számlakép |
SzlaTomb | Retró kéziszámla |
SzlaNoEnv | Borítékbarát számlakép |
SzlaAlap | Tradicionális számlakép |
Szla8cm | Hőnyomtatós számlakép (8 cm széles) |
SzlaFuvarlevelesAlap | Fuvarleveles alap számlakép |
For receipt templates, see pdfSablon on the receipt generation page.
Languages
Invoices can be issued in 15 languages. The selected language applies not only to the invoice text itself, but also to the automatic notification e-mail sent to the buyer and to the buyer's account portal.
Specify the language in the <szamlaNyelve> field within the <fejlec> block:
| Code | Language |
|---|---|
hu | Hungarian |
en | English |
de | German |
it | Italian |
ro | Romanian |
sk | Slovak |
hr | Croatian |
fr | French |
es | Spanish |
cz | Czech |
pl | Polish |
bg | Bulgarian |
nl | Dutch |
ru | Russian |
si | Slovenian |
Data erasure code (torloKod)
Each line item in the invoice request can optionally include a data erasure code in the <torloKod> field. Place it inside every <tetel> element within the <tetelek> block. The value must be an integer (int) of 0 or greater.
For more on using the data erasure code via the API and in bulk invoice generation, see the knowledge base.
Example for one item:
<tetel>
<megnevezes>Minta termék</megnevezes>
<mennyiseg>2.0</mennyiseg>
<mennyisegiEgyseg>db</mennyisegiEgyseg>
<nettoEgysegar>10000</nettoEgysegar>
<afakulcs>27</afakulcs>
<nettoErtek>20000.0</nettoErtek>
<afaErtek>5400.0</afaErtek>
<bruttoErtek>25400.0</bruttoErtek>
<torloKod>123</torloKod>
</tetel>
You must enable the use of data erasure codes in the Számlázz.hu account under Settings (Beállítások). If it is disabled, you will receive error code 539. At most 400 data erasure codes can be assigned per item; if you exceed this, you will receive error code 537. See Error handling & error codes for these codes.