Response
Expected results of generating receipts
The response always contains the generated receipt data in XML (the <nyugta> block). The PDF (<nyugtaPdf>, base64-encoded) is only included in the response if <pdfLetoltes>true</pdfLetoltes> was set in the request.
You should use <hivasAzonosito/> in the posted XML to make the call fault tolerant. If this field is in use, it needs to be unique, otherwise the API call will be unsuccessful. This ensures that if the same XML is posted multiple times, it will not duplicate an existing receipt.
Every successful call contains <sikeres>true</sikeres>, followed by the <nyugta> block with the receipt data. On failure (<sikeres>false</sikeres>), <hibakod/> and <hibauzenet/> are also returned.
Apart from the general error messages, you may also receive:
| Error code | Description |
|---|---|
336 | Prefix already used for invoices; use a receipt-only prefix (hidden on the front end). |
337 | Prefix format invalid: only capital letters and numbers allowed. |
338 | Caller ID (hivasAzonosito) already exists on the server. |
339 | Receipt number does not exist (query, send or delete). |
340 | Paid amount differs from gross amount. |
For foreign currency (<penznem/> other than Ft/HUF), supply exchange rate and bank. See Supported currencies.
If the response indicates an error, look up the code on the Error handling & error codes page. If you cannot find the code or experience an unexpected issue, contact support.
- XML response
- XSD schema
<?xml version="1.0" encoding="UTF-8"?>
<xmlnyugtavalasz xmlns="http://www.szamlazz.hu/xmlnyugtavalasz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.szamlazz.hu/xmlnyugtavalasz https://www.szamlazz.hu/szamla/docs/xsds/nyugtavalasz/xmlnyugtavalasz.xsd">
<sikeres>true</sikeres> <!-- REQ boolean -->
<hibakod></hibakod> <!-- string --> <!-- error code (if any) -->
<hibauzenet></hibauzenet> <!-- string --> <!-- error message (if any) -->
<nyugtaPdf>...</nyugtaPdf> <!-- string --> <!--receipt PDF with base64 encoding -->
<nyugta> <!-- REQ -->
<alap> <!-- REQ -->
<id>123456</id> <!-- REQ id -->
<hivasAzonosito></hivasAzonosito> <!-- string --> <!-- If the call ID were defined during the creation of the receipt-->
<nyugtaszam>NYGT-2017-123</nyugtaszam> <!-- REQ string -->
<tipus>NY</tipus> <!-- REQ string --> <!-- type of the receipt: NY - "receipt", SN - "receipt cancellation" -->
<stornozott>false</stornozott> <!-- REQ boolean --> <!-- true if the receipt is cancelled, otherwise false (interesting if the receipt type is NY (receipt)) -->
<stornozottNyugtaszam>NYGT-2017-100</stornozottNyugtaszam> <!-- string --> <!-- If the receipt is cancelled, then the ID of the cancelled receipt (shows which receipt was cancelled in case of SN ("receipt cancellation") type) -->
<kelt>2015-12-01</kelt> <!-- REQ date --> <!-- date of the receipt -->
<fizmod>cash</fizmod> <!-- REQ string -->
<penznem>EUR</penznem> <!-- REQ string --> <!-- empty, Ft, HUF, EUR, CHF, USD, ... -->
<devizabank></devizabank> <!-- string -->
<devizaarf>210</devizaarf> <!-- double -->
<megjegyzes></megjegyzes> <!-- string -->
<fokonyvVevo></fokonyvVevo> <!-- string --> <!-- accounting information -->
<teszt>false</teszt> <!-- REQ boolean --> <!-- The receipt was created by a test company (true) or a real company (false)-->
<rendelesSzam></rendelesSzam> <!-- string --> <!-- order number on receipt -->
</alap>
<tetelek>
<tetel>
<azonosito></azonosito> <!-- string --> <!-- item ID -->
<megnevezes>Kitten doormat</megnevezes> <!-- REQ string --> <!-- item name -->
<mennyiseg>2.0</mennyiseg> <!-- REQ double --> <!-- item quantity -->
<mennyisegiEgyseg>db</mennyisegiEgyseg> <!-- REQ string --> <!-- unit of quantity -->
<nettoEgysegar>10000</nettoEgysegar> <!-- REQ double --> <!-- net unit price -->
<netto>20000.0</netto> <!-- REQ double --> <!-- item net value (net unit price * item quantity) -->
<afakulcs>27</afakulcs> <!-- REQ double --> <!-- VAT rate, values: `TAHK` : Not subject to VAT , `TAM` : supply exempt from VAT / exempt supply, `AAM` : person exempt from VAT / exempt person, `EUT` : Within EU (former 'EU'), `EUKT` : Outside EU (former 'EUK'), `MAA` : exempt from tax, `F.AFA` : reverse VAT, `K.AFA` : differential VAT, HO, EUE, EUFADE, EUFAD37, ATK, NAM, EAM, KBAUK, KBAET (translation WIP), `0, 5, 7, 18, 19, 20, 25, 27` : exact VAT rate -->
<afa>5400.0</afa> <!-- REQ double --> <!-- VAT total value -->
<brutto>25400.0</brutto> <!-- REQ double --> <!-- gross total value -->
<fokonyv> <!-- --> <!-- general ledger information -->
<arbevetel></arbevetel> <!-- string --> <!-- sales general ledger ID -->
<afa></afa> <!-- string --> <!-- VAT general ledger ID -->
</fokonyv>
</tetel>
<tetel>
<megnevezes>Puppy doormat</megnevezes>
<mennyiseg>2.0</mennyiseg>
<mennyisegiEgyseg>db</mennyisegiEgyseg>
<nettoEgysegar>10000</nettoEgysegar>
<nettoErtek>20000.0</nettoErtek>
<afakulcs>27</afakulcs>
<afaErtek>5400.0</afaErtek>
<bruttoErtek>25400.0</bruttoErtek>
</tetel>
</tetelek>
<kifizetesek>
<kifizetes>
<fizetoeszkoz>voucher</fizetoeszkoz>
<osszeg>1000.0</osszeg>
<leiras>OTP SZÉP kártya</leiras>
</kifizetes>
<kifizetes>
<fizetoeszkoz>debit card</fizetoeszkoz>
<osszeg>3000.0</osszeg>
</kifizetes>
</kifizetesek>
<osszegek>
<afakulcsossz> <!-- REQ int -->
<afatipus>ÁKK</afatipus> <!-- string --> <!-- `TAHK` : Not subject to VAT , `TAM` : supply exempt from VAT / exempt supply, `AAM` : person exempt from VAT / exempt person, `EUT` : Within EU (former 'EU'), `EUKT` : Outside EU (former 'EUK'), `MAA` : exempt from tax, `F.AFA` : reverse VAT, `K.AFA`, HO, EUE, EUFADE, EUFAD37, ATK, NAM, EAM, KBAUK, KBAET (translation WIP) : differential VAT, `0, 5, 7, 18, 19, 20, 25, 27` : exact VAT rate -->
<afakulcs>0</afakulcs> <!-- REQ double -->
<netto>200</netto> <!-- REQ double -->
<afa>54</afa> <!-- REQ double -->
<brutto>254</brutto> <!-- REQ double -->
</afakulcsossz>
<totalossz> <!-- REQ -->
<netto>200</netto> <!-- REQ double -->
<afa>54</afa> <!-- REQ double -->
<brutto>254</brutto> <!-- REQ double -->
</totalossz>
</osszegek>
</nyugta>
</xmlnyugtavalasz>
Elements marked minOccurs="1" are always present in the response. Elements marked minOccurs="0" may not always be included.
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/xmlnyugtavalasz" xmlns:tns="http://www.szamlazz.hu/xmlnyugtavalasz" elementFormDefault="qualified">
<simpleType name="afatipusTipus">
<restriction base="string">
<enumeration value="TAM"></enumeration>
<enumeration value="AAM"></enumeration>
<enumeration value="EU"></enumeration>
<enumeration value="EUK"></enumeration>
<enumeration value="MAA"></enumeration>
<enumeration value="F.AFA"></enumeration>
<enumeration value="K.AFA"></enumeration>
<enumeration value="ÁKK"></enumeration>
<enumeration value="TAHK"></enumeration>
<enumeration value="EUT"></enumeration>
<enumeration value="EUKT"></enumeration>
<enumeration value="HO"></enumeration>
<enumeration value="EUE"></enumeration>
<enumeration value="EUFADE"></enumeration>
<enumeration value="EUFAD37"></enumeration>
<enumeration value="ATK"></enumeration>
<enumeration value="NAM"></enumeration>
<enumeration value="EAM"></enumeration>
<enumeration value="KBAUK"></enumeration>
<enumeration value="KBAET"></enumeration>
</restriction>
</simpleType>
<simpleType name="nyugtatipusTipus">
<restriction base="string">
<enumeration value="NY"></enumeration> <!-- receipt -->
<enumeration value="SN"></enumeration> <!-- receipt cancellation -->
</restriction>
</simpleType>
<!-- receipt details -->
<complexType name="alapTipus">
<all>
<element name="id" type="int" maxOccurs="1" minOccurs="1"></element>
<element name="hivasAzonosito" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="nyugtaszam" type="string" maxOccurs="1" minOccurs="1"></element>
<element name="tipus" type="tns:nyugtatipusTipus" maxOccurs="1" minOccurs="1"></element>
<element name="stornozott" type="boolean" maxOccurs="1" minOccurs="1"></element>
<element name="stornozottNyugtaszam" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="kelt" 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="devizabank" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="devizaarf" type="double" maxOccurs="1" minOccurs="0"></element>
<element name="megjegyzes" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="fokonyvVevo" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="teszt" type="boolean" maxOccurs="1" minOccurs="1"></element>
<element name="rendelesSzam" type="string" maxOccurs="1" minOccurs="0"></element>
</all>
</complexType>
<!-- receipt items -->
<complexType name="fokonyvtetelTipus">
<all>
<element name="arbevetel" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="afa" type="string" maxOccurs="1" minOccurs="0"></element>
</all>
</complexType>
<complexType name="tetelTipus">
<all>
<element name="megnevezes" type="string" maxOccurs="1" minOccurs="1"></element>
<element name="azonosito" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="nettoEgysegar" type="double" maxOccurs="1" minOccurs="1"></element>
<element name="mennyiseg" type="double" maxOccurs="1" minOccurs="1"></element>
<element name="mennyisegiEgyseg" type="string" maxOccurs="1" minOccurs="1"></element>
<element name="netto" type="double" maxOccurs="1" minOccurs="1"></element>
<element name="afatipus" type="tns:afatipusTipus" maxOccurs="1" minOccurs="0"></element>
<element name="afakulcs" maxOccurs="1" minOccurs="1">
<simpleType>
<restriction base="double">
<minInclusive value="0"></minInclusive>
</restriction>
</simpleType>
</element>
<element name="afa" type="double" maxOccurs="1" minOccurs="1"></element>
<element name="brutto" type="double" maxOccurs="1" minOccurs="1"></element>
<element name="fokonyv" type="tns:fokonyvtetelTipus" maxOccurs="1" minOccurs="0"></element>
</all>
</complexType>
<complexType name="tetelekTipus">
<sequence>
<element name="tetel" type="tns:tetelTipus" maxOccurs="unbounded" minOccurs="1"></element>
</sequence>
</complexType>
<!-- summary by VAT rate-->
<complexType name="afakulcsosszTipus">
<all>
<element name="afatipus" type="tns:afatipusTipus" maxOccurs="1" minOccurs="0"></element>
<element name="afakulcs" maxOccurs="1" minOccurs="1">
<simpleType>
<restriction base="double">
<minInclusive value="0"></minInclusive>
</restriction>
</simpleType>
</element>
<element name="netto" type="double" maxOccurs="1" minOccurs="1"></element>
<element name="afa" type="double" maxOccurs="1" minOccurs="1"></element>
<element name="brutto" type="double" maxOccurs="1" minOccurs="1"></element>
</all>
</complexType>
<!-- receipt totam summary -->
<complexType name="totalosszTipus">
<all>
<element name="netto" type="double" maxOccurs="1" minOccurs="1"></element>
<element name="afa" type="double" maxOccurs="1" minOccurs="1"></element>
<element name="brutto" type="double" maxOccurs="1" minOccurs="1"></element>
</all>
</complexType>
<!-- receipt summaries (by VAT rates and total)-->
<complexType name="osszegekTipus">
<sequence>
<element name="afakulcsossz" type="tns:afakulcsosszTipus" maxOccurs="unbounded" minOccurs="1"></element>
<element name="totalossz" type="tns:totalosszTipus" maxOccurs="1" minOccurs="1"></element>
</sequence>
</complexType>
<!-- credit notes -->
<complexType name="kifizetesTipus">
<all>
<element name="fizetoeszkoz" type="string" maxOccurs="1" minOccurs="1"></element>
<element name="osszeg" type="double" maxOccurs="1" minOccurs="1"></element>
<element name="leiras" type="string" maxOccurs="1" minOccurs="0"></element>
</all>
</complexType>
<complexType name="kifizetesekTipus">
<sequence>
<element name="kifizetes" type="tns:kifizetesTipus" maxOccurs="unbounded" minOccurs="1"></element>
</sequence>
</complexType>
<complexType name="nyugtaTipus">
<all>
<element name="alap" type="tns:alapTipus" maxOccurs="1" minOccurs="1"></element>
<element name="tetelek" type="tns:tetelekTipus" maxOccurs="1" minOccurs="1"></element>
<element name="kifizetesek" type="tns:kifizetesekTipus" maxOccurs="1" minOccurs="0"></element>
<element name="osszegek" type="tns:osszegekTipus" maxOccurs="1" minOccurs="1"></element>
</all>
</complexType>
<element name="xmlnyugtavalasz">
<complexType>
<all>
<element name="sikeres" type="boolean" maxOccurs="1" minOccurs="1"></element>
<element name="hibakod" type="int" maxOccurs="1" minOccurs="0"></element>
<element name="hibauzenet" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="nyugtaPdf" type="string" maxOccurs="1" minOccurs="0"></element>
<element name="nyugta" type="tns:nyugtaTipus" maxOccurs="1" minOccurs="0"></element>
</all>
</complexType>
</element>
</schema>