XML + XSD
- XML example
- XSD schema
In the XML file, the order of the fields is fixed, they cannot be interchanged. For currency codes in <penznem> and for foreign-currency invoices the fields <arfolyam> and <arfolyamBank>, see Supported currencies.
<?xml version="1.0" encoding="UTF-8"?>
<xmlszamla xmlns="http://www.szamlazz.hu/xmlszamla" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.szamlazz.hu/xmlszamla https://www.szamlazz.hu/szamla/docs/xsds/agent/xmlszamla.xsd">
<beallitasok>
<szamlaagentkulcs>Please fill!</szamlaagentkulcs>
<eszamla>true</eszamla>
<!-- „true" in case you need to create an e-invoice -->
<szamlaLetoltes>true</szamlaLetoltes>
<!-- „true" in case you would like to get the
PDF invoice in the response -->
<valaszVerzio>1</valaszVerzio>
<!-- 1: gives a simple text or PDF as answer.
2: xml answer, in case you asked for the PDF as well,
it will be included in the XML with base64 coding.
-->
<aggregator></aggregator>
<!-- omit this tag -->
<szamlaKulsoAzon></szamlaKulsoAzon> <!-- string --> <!-- The invoice can be identified with this key by the third party system (system which uses the Számla Agent): later the invoice can be queried with this key. Important: The invoice will only have this external identifier if you send this field when creating the invoice. -->
</beallitasok>
<fejlec>
<!-- header -->
<keltDatum>2020-01-20</keltDatum>
<!-- creating date, in this exact format -->
<teljesitesDatum>2020-01-20</teljesitesDatum>
<!-- payment date -->
<fizetesiHataridoDatum>2020-01-20</fizetesiHataridoDatum>
<!-- due date -->
<fizmod>Átutalás</fizmod>
<!-- payment type: it can be seen in case you create the invoice
from browser -->
<penznem>HUF</penznem>
<!-- currency: it can be seen in case you create the invoice
from browser -->
<szamlaNyelve>hu</szamlaNyelve>
<!-- language of invoice, can be: de, en, it, hu, fr, ro, sk, hr
-->
<megjegyzes>Invoice comment</megjegyzes>
<!-- comment of the invoice -->
<arfolyamBank>MNB</arfolyamBank>
<!-- name of bank: in case of invoice about other currency
than HUF you have to display which bank's exchange rates
did we use to calculate VAT -->
<arfolyam>0.0</arfolyam>
<!-- exchange rate: in case of invoice about other currency
than HUF you have to display which bank's exchange rates
did we use to calculate VAT -->
<rendelesSzam></rendelesSzam>
<!-- order number -->
<dijbekeroSzamlaszam></dijbekeroSzamlaszam>
<!-- reference to pro forma invoice number -->
<elolegszamla>false</elolegszamla>
<!-- deposit invoice -->
<vegszamla>false</vegszamla>
<!-- invoice (after a deposit invoice) -->
<helyesbitoszamla>false</helyesbitoszamla>
<!-- correction invoice -->
<helyesbitettSzamlaszam></helyesbitettSzamlaszam>
<!-- the number of the corrected invoice -->
<dijbekero>false</dijbekero>
<!-- proform invoice -->
<szamlaszamElotag></szamlaszamElotag>
<!-- One of the prefixes from the invoice pad menu -->
<simpleItems>false</simpleItems>
<!-- simplified invoice image for tour operators; "true" hides price
and VAT details on the invoice image, see the
"Simplified item data for tour operators" page -->
</fejlec>
<elado>
<!-- Details of the merchant-->
<bank>BB</bank>
<!-- bank name -->
<bankszamlaszam>11111111-22222222-33333333</bankszamlaszam>
<!-- bank account -->
<emailReplyto></emailReplyto>
<!-- reply e-mail address -->
<emailTargy>Invoice notification</emailTargy>
<!-- e-mail subject -->
<emailSzoveg>mail text</emailSzoveg>
<!-- text of e-mail -->
</elado>
<vevo>
<!--Buyer details -->
<nev>Kovacs Bt.</nev>
<!-- name -->
<irsz>2030</irsz>
<!-- ZIP code -->
<telepules>Érd</telepules>
<!-- city -->
<cim>Tárnoki út 23.</cim>
<!-- address -->
<!-- e-mail address, if given, we will send the invoice to this mail address -->
<sendEmail>false</sendEmail>
<!-- should we send the e-mail to the customer (by email) -->
<adoszam>12345678-1-42</adoszam>
<!-- fiscal number/tax number -->
<postazasiNev>Kovács Bt. mailing name</postazasiNev>
<!--delivery name/postal name -->
<postazasiIrsz>2040</postazasiIrsz>
<!--delivery ZIP code/postal ZIP code -->
<postazasiTelepules>Budaörs</postazasiTelepules>
<!--delivery city/postal city -->
<postazasiCim>Szivárvány utca 8.</postazasiCim>
<!--delivery address/postal address -->
<azonosito>1234</azonosito>
<!-- If you have a subscription in your billing account,
you can assign a unique identifier to your partners on their profile page
in the Beállítások -Partnerek menu. It's important that each identifier
is linked to only one partner! DO NOT use an identifier that has already
been assigned to another customer in your billing account's partner database. -->
<telefonszam>Tel:+3630-555-55-55, Fax:+3623-555-555</telefonszam>
<!-- phone number -->
<megjegyzes>Call extension 214 from the reception</megjegyzes>
<!-- comment -->
</vevo>
<fuvarlevel>
<!-- waybill/confinement note, you do not need this: omit the entire tag -->
<uticel></uticel>
<futarSzolgalat></futarSzolgalat>
</fuvarlevel>
<tetelek>
<!-- items on invoice -->
<tetel>
<!-- item 1 -->
<megnevezes>Elado izé</megnevezes>
<!-- name -->
<mennyiseg>1.0</mennyiseg>
<!-- quantity -->
<mennyisegiEgyseg>db</mennyisegiEgyseg>
<!-- unit of quantity -->
<nettoEgysegar>10000</nettoEgysegar>
<!-- unit price -->
<afakulcs>27</afakulcs>
<!-- VAT rate -->
<nettoErtek>10000.0</nettoErtek>
<!-- net price -->
<afaErtek>2700.0</afaErtek>
<!-- VAT amount -->
<bruttoErtek>12700.0</bruttoErtek>
<!-- gross amount -->
<megjegyzes>lorem ipsum</megjegyzes>
<!-- comment for item -->
<torloKod>123</torloKod>
<!-- optional: data erasure code per item -->
</tetel>
<tetel>
<!-- item 2, details are same as above -->
<megnevezes>Elado izé 2</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>
<megjegyzes>lorem ipsum 2</megjegyzes>
</tetel>
</tetelek>
</xmlszamla>
All fields shown in the example are mandatory (the tag must be present in the XML), but some may be left blank if they are not used by Számla Agent.
Számlázz.hu does not calculate amounts from item data, so all amounts shown on the invoice must be provided explicitly. The Agent validates the following per line item:
- net unit price × quantity = net value
- net value + VAT = gross value
If a discrepancy is found, the invoice is rejected with one of the following error codes: 57, 259, 260, 261, 262, 263, 264.
In the case of automatic invoicing (by using Számla Agent), DO NOT send an identifier (<azonosito>) that has already been registered to another customer in your billing account's partner database. This has two consequences: customers with a matching identifier can access all documents belonging to that customer account using the customer account link; furthermore, the partner's information will be automatically updated with the billing data you provided in the XML.
The sent XML file must comply with the following XSD schema.
Elements marked minOccurs="1" must be present in the XML (the tag cannot be omitted). Elements marked minOccurs="0" may be omitted.
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/xmlszamla" xmlns:tns="http://www.szamlazz.hu/xmlszamla" elementFormDefault="qualified">
<complexType name="vevoTipus">
<sequence>
<element name="nev" type="string" maxOccurs="1" minOccurs="1"></element>
<element name="orszag" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="irsz" type="string" maxOccurs="1" minOccurs="1"></element>
<element name="telepules" type="string" maxOccurs="1" minOccurs="1"></element>
<element name="cim" type="string" maxOccurs="1" minOccurs="1"></element>
<element name="email" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="sendEmail" type="boolean" maxOccurs="1" minOccurs="0"></element>
<!-- Possible values for the adoalany field: 7: business outside the EU, 6: business in the EU, 1: has Hungarian tax number, 0: unknown whether buyer has tax number, -1: no tax number -->
<element name="adoalany" type="int" maxOccurs="1" minOccurs="0"></element>
<element name="adoszam" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="csoportazonosito" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="adoszamEU" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="postazasiNev" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="postazasiOrszag" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="postazasiIrsz" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="postazasiTelepules" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="postazasiCim" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="vevoFokonyv" type="tns:vevoFokonyvTipus" maxOccurs="1" minOccurs="0"></element>
<element name="azonosito" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="alairoNeve" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="telefonszam" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="megjegyzes" type="string" maxOccurs="1" minOccurs="0"></element>
</sequence>
</complexType>
<complexType name="vevoFokonyvTipus">
<sequence>
<element name="konyvelesDatum" type="date" maxOccurs="1" minOccurs="0"></element>
<element name="vevoAzonosito" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="vevoFokonyviSzam" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="folyamatosTelj" type="boolean" maxOccurs="1" minOccurs="0"></element>
<element name="elszDatumTol" type="date" maxOccurs="1" minOccurs="0"></element>
<element name="elszDatumIg" type="date" maxOccurs="1" minOccurs="0"></element>
</sequence>
</complexType>
<complexType name="eladoTipus">
<sequence>
<element name="bank" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="bankszamlaszam" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="emailReplyto" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="emailTargy" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="emailSzoveg" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="alairoNeve" type="string" maxOccurs="1" minOccurs="0"></element>
</sequence>
</complexType>
<complexType name="beallitasokTipus">
<sequence>
<element name="felhasznalo" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="jelszo" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="szamlaagentkulcs" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="eszamla" type="boolean" maxOccurs="1" minOccurs="1"></element>
<element name="szamlaLetoltes" type="boolean" maxOccurs="1" minOccurs="1"></element>
<element name="szamlaLetoltesPld" type="int" maxOccurs="1" minOccurs="0"></element>
<!-- DEPRECATED: this field can be omitted, as our system no longer processes it. -->
<element name="valaszVerzio" type="int" maxOccurs="1" minOccurs="0"></element>
<element name="aggregator" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="guardian" type="boolean" maxOccurs="1" minOccurs="0"></element>
<element name="cikkazoninvoice" type="boolean" maxOccurs="1" minOccurs="0"></element>
<element name="szamlaKulsoAzon" type="string" maxOccurs="1" minOccurs="0"></element>
</sequence>
</complexType>
<complexType name="tetelTipus">
<sequence>
<element name="megnevezes" type="string" maxOccurs="1" minOccurs="1"></element>
<element name="azonosito" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="mennyiseg" type="double" maxOccurs="1" minOccurs="1"></element>
<element name="mennyisegiEgyseg" type="string" maxOccurs="1" minOccurs="1"></element>
<element name="nettoEgysegar" type="double" maxOccurs="1" minOccurs="1"></element>
<element name="afakulcs" type="string" maxOccurs="1" minOccurs="1"></element>
<element name="arresAfaAlap" type="double" maxOccurs="1" minOccurs="0"></element>
<element name="nettoErtek" type="double" maxOccurs="1" minOccurs="1"></element>
<element name="afaErtek" type="double" maxOccurs="1" minOccurs="1"></element>
<element name="bruttoErtek" type="double" maxOccurs="1" minOccurs="1"></element>
<element name="megjegyzes" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="tetelFokonyv" type="tns:tetelFokonyvTipus" maxOccurs="1" minOccurs="0"></element>
<element name="torloKod" maxOccurs="1" minOccurs="0">
<simpleType>
<restriction base="int">
<minInclusive value="0"/>
</restriction>
</simpleType>
</element>
</sequence>
</complexType>
<complexType name="tetelekTipus">
<sequence>
<element name="tetel" type="tns:tetelTipus" maxOccurs="unbounded" minOccurs="1"></element>
</sequence>
</complexType>
<complexType name="tetelFokonyvTipus">
<sequence>
<element name="gazdasagiEsem" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="gazdasagiEsemAfa" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="arbevetelFokonyviSzam" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="afaFokonyviSzam" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="elszDatumTol" type="date" maxOccurs="1" minOccurs="0"></element>
<element name="elszDatumIg" type="date" maxOccurs="1" minOccurs="0"></element>
</sequence>
</complexType>
<complexType name="fejlecTipus">
<sequence>
<element name="keltDatum" type="date" maxOccurs="1" minOccurs="0"></element>
<element name="teljesitesDatum" type="date" maxOccurs="1" minOccurs="1"></element>
<element name="fizetesiHataridoDatum" type="date" maxOccurs="1" minOccurs="1"></element>
<element name="fizmod" type="string" maxOccurs="1" minOccurs="1"></element>
<element name="penznem" type="string" maxOccurs="1" minOccurs="1"></element>
<element name="szamlaNyelve" type="tns:szamlaNyelveTipus" maxOccurs="1" minOccurs="1"></element>
<element name="megjegyzes" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="arfolyamBank" type="string" maxOccurs="1" minOccurs="0"></element>
<!-- If arfolyamBank='MNB' and arfolyam is not set, the current MNB exchange rate is used when creating the invoice (automatic MNB rate). -->
<element name="arfolyam" type="double" maxOccurs="1" minOccurs="0"></element>
<element name="rendelesSzam" type="string" maxOccurs="1" minOccurs="0"></element>
<!-- Reference to the pro forma / prepayment request. -->
<element name="dijbekeroSzamlaszam" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="elolegszamla" type="boolean" maxOccurs="1" minOccurs="0"></element>
<element name="vegszamla" type="boolean" maxOccurs="1" minOccurs="0"></element>
<!-- If the down-payment invoice to be closed cannot be identified by order number, you can specify its invoice number here. -->
<element name="elolegSzamlaszam" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="helyesbitoszamla" type="boolean" maxOccurs="1" minOccurs="0"></element>
<element name="helyesbitettSzamlaszam" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="dijbekero" type="boolean" maxOccurs="1" minOccurs="0"></element>
<element name="szallitolevel" type="boolean" maxOccurs="1" minOccurs="0"></element>
<element name="logoExtra" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="szamlaszamElotag" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="fizetendoKorrekcio" type="double" maxOccurs="1" minOccurs="0"></element>
<element name="fizetve" type="boolean" maxOccurs="1" minOccurs="0"></element>
<element name="arresAfa" type="boolean" maxOccurs="1" minOccurs="0"></element>
<!-- Invoice contains no Hungarian VAT → no data to Online Invoice. eusAfa does not replace item-level afakulcs; use proper VAT codes on items. Details: VAT rates page. -->
<element name="eusAfa" type="boolean" maxOccurs="1" minOccurs="0"></element>
<!-- Codomain: 'SzlaMost' | 'SzlaAlap' | 'SzlaNoEnv' | 'Szla8cm' | 'SzlaTomb' | 'SzlaFuvarlevelesAlap' -->
<element name="szamlaSablon" type="string" maxOccurs="1" minOccurs="0"></element>
<!-- Simplified invoice image for tour operators; hides price and VAT details on the invoice image. Details: Simplified item data for tour operators page. -->
<element name="simpleItems" type="boolean" maxOccurs="1" minOccurs="0"></element>
<!-- Preview PDF of the document (no actual document is created). -->
<element name="elonezetpdf" type="boolean" maxOccurs="1" minOccurs="0"></element>
</sequence>
</complexType>
<simpleType name="szamlaNyelveTipus">
<restriction base="string">
<enumeration value="hu"></enumeration>
<enumeration value="en"></enumeration>
<enumeration value="de"></enumeration>
<enumeration value="it"></enumeration>
<enumeration value="ro"></enumeration>
<enumeration value="sk"></enumeration>
<enumeration value="hr"></enumeration>
<enumeration value="fr"></enumeration>
<enumeration value="es"></enumeration>
<enumeration value="cz"></enumeration>
<enumeration value="pl"></enumeration>
<enumeration value="bg"></enumeration>
<enumeration value="nl"></enumeration>
<enumeration value="ru"></enumeration>
<enumeration value="si"></enumeration>
</restriction>
</simpleType>
<complexType name="transoflexTipus">
<sequence>
<!-- 5 digit number provided by TOF -->
<element name="azonosito" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="shipmentID" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="csomagszam" type="int" maxOccurs="1" minOccurs="0"></element>
<element name="countryCode" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="zip" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="service" type="string" maxOccurs="1" minOccurs="0"></element>
</sequence>
</complexType>
<complexType name="sprinterTipus">
<sequence>
<!-- 3-character abbreviation agreed with Sprinter -->
<element name="azonosito" type="string" maxOccurs="1" minOccurs="0"></element>
<!-- 10-character long "feladókód" provided by Sprinter -->
<element name="feladokod" type="string" maxOccurs="1" minOccurs="0"></element>
<!-- "Iránykód" from Sprinter is Sprinters own special parcel shipment code, eg. "106" -->
<element name="iranykod" type="string" maxOccurs="1" minOccurs="0"></element>
<!-- Number of packages, this shows how many consignment note will be attached to the receipt-->
<element name="csomagszam" type="int" maxOccurs="1" minOccurs="0"></element>
<!-- unique per receipt, 7-13 characters long identifyer -->
<element name="vonalkodPostfix" type="string" maxOccurs="1" minOccurs="0"></element>
<!-- usually this is the 1 work day note -->
<element name="szallitasiIdo" type="string" maxOccurs="1" minOccurs="0"></element>
</sequence>
</complexType>
<complexType name="pppTipus">
<sequence>
<!-- 3-character abbreviation agreed with PPP -->
<element name="vonalkodPrefix" type="string" maxOccurs="1" minOccurs="0"></element>
<!-- unique per receipt, MAX 7 characters long identifyer -->
<element name="vonalkodPostfix" type="string" maxOccurs="1" minOccurs="0"></element>
</sequence>
</complexType>
<complexType name="mplTipus">
<sequence>
<!-- MPL customer code -->
<element name="vevokod" type="string" maxOccurs="1" minOccurs="1"></element>
<!-- Bar code is generated based on thes string -->
<element name="vonalkod" type="string" maxOccurs="1" minOccurs="1"></element>
<!-- Weight of the package, can contain a decimal point, if necessary -->
<element name="tomeg" type="string" maxOccurs="1" minOccurs="1"></element>
<!-- Optional configuration for special services icons, if not defined no icon will be shown -->
<element name="kulonszolgaltatasok" type="string" maxOccurs="1" minOccurs="0"></element>
<!-- Vallue ("erteknyilvanitas") field on the consignment note -->
<element name="erteknyilvanitas" type="double" maxOccurs="1" minOccurs="0"></element>
</sequence>
</complexType>
<complexType name="fuvarlevelTipus">
<sequence>
<!-- TODO the destination ("uticel") field is not used, should be removed after 2014.05.30, sprinter/iranykod field should be used instead -->
<element name="uticel" type="string" maxOccurs="1" minOccurs="0"></element>
<!-- Codomain: TOF, PPP, SPRINTER, FOXPOST, MPL, GLS, EMPTY; omit if there is no consignment note. -->
<element name="futarSzolgalat" type="string" maxOccurs="1" minOccurs="0"></element>
<!-- General barcode value; used if carrier-specific barcode data is not provided in the child elements. -->
<element name="vonalkod" type="string" maxOccurs="1" minOccurs="0"></element>
<!-- Comment on the consignment note -->
<element name="megjegyzes" type="string" maxOccurs="1" minOccurs="0"></element>
<!-- Trans-O-Flex node to upload -->
<element name="tof" type="tns:transoflexTipus" maxOccurs="1" minOccurs="0"></element>
<!-- PickPackPoint node to upload -->
<element name="ppp" type="tns:pppTipus" maxOccurs="1" minOccurs="0"></element>
<!-- Sprinter node to upload -->
<element name="sprinter" type="tns:sprinterTipus" maxOccurs="1" minOccurs="0"></element>
<!-- MPL node to upload-->
<element name="mpl" type="tns:mplTipus" maxOccurs="1" minOccurs="0"></element>
</sequence>
</complexType>
<element name="xmlszamla">
<complexType>
<sequence>
<element name="beallitasok" type="tns:beallitasokTipus" maxOccurs="1" minOccurs="1"></element>
<element name="fejlec" type="tns:fejlecTipus" maxOccurs="1" minOccurs="1"></element>
<element name="elado" type="tns:eladoTipus" maxOccurs="1" minOccurs="1"></element>
<element name="vevo" type="tns:vevoTipus" maxOccurs="1" minOccurs="1"></element>
<!-- Consignment note (fuvarlevel) is optional; only provide it if you know what it is and use an invoice template that can display it. -->
<element name="fuvarlevel" type="tns:fuvarlevelTipus" maxOccurs="1" minOccurs="0"></element>
<element name="tetelek" type="tns:tetelekTipus" maxOccurs="1" minOccurs="1"></element>
</sequence>
</complexType>
</element>
</schema>
For detailed guidance on the eusAfa field (when to use it, conditions, common mistakes, correction path), see the VAT rates page. For the simpleItems field (simplified invoice image for tour operators, validation rules, behaviour per document type), see the Simplified item data for tour operators page.