NAV Navbar

Introduction

Üdvözlünk a Számlázz.hu API dokumentáció oldalán!

Amennyiben a korábbi, teljesen magyar nyelvű dokumentációnkat keresed, itt megtalálod! (Utolsó frissítés: 2019.03.13.)

A jövőben kizárólag az angol nyelvű dokumentáció bővítésére és frissítésére fogunk koncentrálni, így a magyar nyelvű pdf elavulttá válhat. Amennyiben kérdésed lenne a dokumentációval kapcsolatban, vedd fel velünk a kapcsolatot a Számlázz.hu - Kapcsolat oldalon keresztül.


Welcome to the Szamlazz.hu API! (version: 3.72, updated on 25.07.2019.)

Just in case you're looking for our old, zip based documentation, you can find it here. (last updated on: 13.03.2019.)

Basics

First we would like to share some basic information about Számla Agent calls, after that we will specify each call.

What is Számla Agent?

Számla Agent is a non-browser-based interface of the Számlázz.hu system. It receives XML messages and depending on the received information it can:

How does Számla Agent work?

The working mechanism of the system is shown on the following picture:

  1. Customer wants to purchase something in web shop.
  2. The webshop sends an XML file in a post request to the Számlázz.hu system.
  3. Számla Agent receives the XML file and generates the invoice and according to configuration it sends back the PDF invoice, a message like xmlagentresponse=DONE;invoicenumber or if there was an error, the description of the error.
  4. If necessary, Számlázz.hu can send e-mails with PDF invoices as well.

Agent User

A company using Számla Agent can be accessed by multiple users. We recommend to create a separate user for the Agent with „accounting” privileges. The e-mail address of this user will receive Agent usage error messages.

Agent Key

It is possible to use a generated Agent key to authenticate instead of using a username/password in the sent XML. This means that it's no longer mandatory to use the username/password field, instead you can simply use the <szamlaagentkulcs> tag.

In order to generate an Agent key, the owner or administrator of the account needs to login to the Szamlazz.hu website and on the dashboard scroll down to the bottom. There's a section called Számla Agent kulcsok, and on the right side you can generate a key by clicking the key button. The key is generated immediately and is ready to use. You can copy it directly by clicking the icon next to it.

You can provide the key in the <szamlaagentkulcs> tag, or if you're using a webshop where you cannot use this tag, you can also supply the key in the <felhasznalo> and <jelszo> tags (both should contain the same key).

Error handling

Therefore if a call is unsuccessful then recalling is prohibited. The maximum limit to send the same request to Számla Agent is five. If all of those requests are unsuccessful then please send an e-mail to the operator of your webshop and wait for their answer.

Számla Agent cannot be held responsible in case an invoice could not be generated. If someone does not comply with these rules, or causes heavy server load without any reasons, then the parties who call the Agent will be banned.

In case the Számlázz.hu system is unavailable for whatever reason (application error, or system upgrade that requires downtime), the return call will be served by our CMS. You can check the response header for the szlahu_down: true attribute. If you see this header in the HTTP response, it indicates that it's not possible to create/query invoices from the system at the moment.

Do I need to handle session cookies?

Yes, Számla Agent is optimized in a way that the caller side must take care of storing the session cookie and make sure that it is sent to Számla Agent during the call. One single user has to handle all Agent related actions in the webshop so all the requests have to be handled by the same user.

Process details:

  1. First call towards Számla Agent, there is no session cookie stored for the webshop. XML file is sent to Számla Agent. Számla Agent perceives that there is no cookie yet so it generates a new session and a session cookie, reads the XML, etc.

  2. First answer: single PDF file in response body, few other info in response header that contains the cookie as well as the JSESSIONID in the session cookie. The received pdf and session cookie has to be saved for later use.

  3. Second call towards Számla Agent: send the XML as for the first time and include the session cookie as well in the request header.

  4. Second answer: one PDF in the response body, and the same session cookie in the header, there is no action needed with the cookie. After that only the 3rd and 4th steps get repeated. In case there is no Számla Agent calls from a session cookie for 90 minutes, the Számlázz.hu system deletes this cookie. For the next time there will be a call towards Számla Agent, a new cookie will be generated. In light of these the following working mechanism is recommended in the codes calling.

Számla Agent:

  1. To call Számla Agent you need an XML file and a cookie file, if there is no cookie yet, call the Agent without it.

  2. When the answer gets back, you need to save the cookie file and the PDF invoice.

How can I test Számla Agent?

During testing you have to make sure not to generate a huge amount of invoices in the testing environment (100 invoices per hour, tops). For test accounts please contact the customer service at Számlázz.hu (info@szamlazz.hu) or via our contact form here.

What are the requirements for my system?

Your system needs to send an XML file in an HTTPS POST request to Számlázz.hu. This XML file has to contain the controlling parameters and the data that is necessary to perform the given Számla Agent function. Do not forget to handle session cookies.

The request/response pairs of the given Számla Agent call types (new invoice, reverse invoice, query pdf, etc.) will be described later.

What kind of error messages can I receive (error codes)?

CODE DESCRIPTION TRANSLATION
1 Rendszerkarbantartás, kérem próbálja meg pár perc múlva. System Maintenance, please try again in a few minutes. Internal error in Számla Agent. The webshop does not have to do anything, the maintenance team of Számlázz.hu is notified and will take action.
3 Sikertelen bejelentkezés Login error. Invalid login name or password.
49 Elektronikus számla készítéséhez kérem adja meg a kulcstartót nyitó titkos jelszavát. To issue an electronic invoice, please give your secret password which opens the keystore. To issue the invoice please provide the secret password for key.
53 Hiányzó XML fájl. Missing XML file. Probably the XML was not sent as a file, but as an input content of an HTML.
54 E-számla készítés nincs engedélyezve. Issuing e-invoice is not permitted. Probably your subscription package does not contain it, or there is no own certificate uploaded, in that case you have to accept that KBOSS.hu Kft. can use its own certificate for the invoices.
55 E-számla aláírása sikertelen. E-invoice signature was unsuccessful. Either your certificate expired or the timestamp server could not be reached.
57 XML beolvasási hiba. XML reading error. There is an error in the sent XML file. The response body contains more information.
135 Számla Agent futtatásához kérjük böngészőkében lépjen ki a Számlázz.hu rendszerből In order to run Számla Agent, please log out from Számlázz.hu in your browser. This can happen in case you are logged in to Számlázz.hu in one browser window and in another you are testing the XML with the test HTML file or with a curl POST request.
136 Bejelentkezési hiba ... Kérjük lépjen be a Számlázz.hu rendszérbe böngészőn keresztül. Login error ... Please log in to Számlázz.hu's system via browser. For some reason you cannot use Számla Agent. Reasons might be the following:
- subscription expired
- there is a pending invoice towards Számlázz.hu
- there is a delay in payment
In these cases please log in to the Számlázz.hu and check your subscription in the menu “Díjcsomagom”.
164 Ezt a funkciót csak olyan felhasználó veheti igénybe, aki egyetlen Számlázz.hu-s fiókhoz férhet hozzá. Több fiókhoz történő hozzáférés kizárja a funkció használatát. “The user is allowed to access only one company’s billing account. If the user got access to more than one billing account, the operation will fail.”
The username given in the xml file should have access to only one company’s billing account.
202 A megadott számlaszám előtag nem megfelelő. Agent használat során, csak a Számlázz.hu rendszerében korábban regisztrált előtagokat lehet használni. “The given invoice prefix is not usable. You can only use those prefixes for Számla Agent that were previously registered in Szamlazz.hu’s system.”
You need to login to the website and add the desired prefixes before you could use them with Számla Agent.
259 A tétel nettó értéke nem megfelelő; nettó érték = nettó egységár x mennyiség. Termék: ** The NET value of the item is not correct; NET value = NET unit price * quantity. Product:
Your values don’t fit into this formula, please verify and fix the NET value. The response body contains the name of the wrong product after the “Termék” word.
260 A tétel áfa értéke nem megfelelő; áfa érték = tétel nettó értéke x áfakulcs mértéke / 100. Termék: ** The VAT value of the item is not correct; VAT value = NET price of item * VAT rate / 100. Product:
Your values don’t fit into this formula, please verify and fix the VAT value. The response body contains the name of the wrong product after the “Termék” word.
261 A tétel bruttó értéke nem megfelelő; bruttó érték = tétel nettó értéke + tétel áfa értéke. Termék: ** The gross value of the item is not correct; gross value = NET value of item + VAT value of item. Product:
Your values don’t fit into this formula, please verify and fix the gross value. The response body contains the name of the wrong product after the “Termék” word.
262 A tétel nettó értéke nem megfelelő; nettó érték = nettó egységár x mennyiség. Termék: ** The NET value of the item is not correct; NET value = NET unit price * quantity. Product:
Your values don’t fit into this formula, please verify and fix the NET value. The response body contains the row number of the wrong product after the “Termék” word.
263 A tétel áfa értéke nem megfelelő; áfa érték = tétel nettó értéke x áfakulcs mértéke / 100. Termék: ** The VAT value of the item is not correct; VAT value = NET price of item * VAT rate / 100. Product:
Your values don’t fit into this formula, please verify and fix the VAT value. The response body contains the row number of the wrong product after the “Termék” word.
264 A tétel bruttó értéke nem megfelelő; bruttó érték = tétel nettó értéke + tétel áfa értéke. Termék: ** The gross value of the item is not correct; gross value = NET value of item + VAT value of item. Product:
Your values don’t fit into this formula, please verify and fix the gross value. The response body contains the row number of the wrong product after the “Termék” word.

How secure is this connection?

The connection is built up on a 256 bit encrypted SSL connection.

Can one XML file contain details of other invoices as well?

No. Each XML file contains the information of a single invoice only.

What is necessary to issue e-invoices?

In order to issue e-invoices you need your own certificate, or you can also use the certificate provided by Számlázz.hu (this is the default option).

XML validation using XSD

You can validate the content of the XML file with an XSD file. In the XSD file there is a description that describes the content of the given file. For validation we use the xmllint software that can be installed as a package on Linux and can be downloaded for Windows on the following link: https://code.google.com/archive/p/xmllint/

How can I provide more e-mail addresses?

In case you would like to provide more e-mail addresses in the XML file’s e-mail field, they must be separated by “,” (comma).

In which cases does Szamlazz.hu actually send notifications by email?

In case of a test account the system will send an invoice note, but not to the e-mail address given in the XML, but rather to the e-mail address set in the settings page (the “Email cím” value in this form: https://www.szamlazz.hu/szamla/?action=directlogin&targetpage=beallitasokstep1).

If you set an e-mail address in the buyer's data, then the system will send the invoice to this address. Obviously if you did not set any e-mail address, the system won't send the invoice. This is the default behavior.

You can define the buyer's e-mail address in the XML and ask Számla Agent NOT to send the invoice to the buyer. In this case you have to add this line just after the e-mail address: <sendEmail>false</sendEmail>

How can I send the XML in the given requests?

You need to send the requests to the same URL every time. This is the following: https://www.szamlazz.hu/szamla/. Számla Agent decides which function to perform via the name of the field which contains the XML file in the HTTPS request. The following table contains the names which you can use to perform a given function.

FUNCTION FIELD NAME
Generate invoice action-xmlagentxmlfile
Reverse invoice action-szamla_agent_st
Register credit entry action-szamla_agent_kifiz
Query invoice pdf action-szamla_agent_pdf
Create receipt action-szamla_agent_nyugta_create
Reverse receipt action-szamla_agent_nyugta_storno
Query receipt action-szamla_agent_nyugta_get
Send receipt action-szamla_agent_nyugta_send

Use for multiple websites

Multiple websites can use the same Számlázz.hu user for the Agent. If you'd like to separate invoices by webshop please configure a separate invoice „prefix” for each of them.

Generating invoice

Post request

The post request looks like the following code (html only):

<html>
  <head><meta content="text/html; CHARSET=UTF-8"></head>
    <body>
      <form action="https://www.szamlazz.hu/szamla/" method="post" enctype="multipart/form-data">
        XML file: <input type="file" name="action-xmlagentxmlfile"><br><br>
        E-mail attachments if applies:<br>
        attached file 1. <input type="file" name="attachfile1"><br>
        attached file 2. <input type="file" name="attachfile2"><br>
        attached file 3. <input type="file" name="attachfile3"><br>
        attached file 4. <input type="file" name="attachfile4"><br>
        attached file 5. <input type="file" name="attachfile5"><br><br>
        <input type="submit" name="generate" value="Issue invoice">
      </form>
    </body>
</html>

You can also try out the same HTML code here:

<= XML file

<= Attached file 1.
<= Attached file 2.
<= Attached file 3.
<= Attached file 4.
<= Attached file 5.

It's probably easier to stick with curl and simply post the xml than clicking a button on a sample html page.

curl -v -F action-xmlagentxmlfile=@agent.xml -c ./cookies.txt -o response.pdf https://www.szamlazz.hu/szamla/

The request must be “multiform/form-data” type and must contain one file on the name action-xmlagentxmlfile

Example XML file with explanation

<?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>
        <!-- settings -->
        <felhasznalo>teszt01</felhasznalo>
        <!-- a Számlázz.hu user -->
        <jelszo>teszt01</jelszo>
        <!-- a Számlázz.hu’s user password -->
        <szamlaagentkulcs>Please fill!</szamlaagentkulcs>
        <eszamla>true</eszamla>
        <!-- „true” in case you need to create an e-invoice -->
        <kulcstartojelszo>teszt01</kulcstartojelszo>
        <!-- in case of e-invoice this is the password 
                                                    for the keyholder. Otherwise omit tis tag -->
        <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 -->
    </beallitasok>
    <fejlec>
        <!-- header -->
        <keltDatum>2010-09-12</keltDatum>
        <!-- creating date, in this exact format -->
        <teljesitesDatum>2010-09-10</teljesitesDatum>
        <!-- payment date -->
        <fizetesiHataridoDatum>2010-09-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>Számla megjegyzés</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  -->
    </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>Számla értesítő</emailTargy>
        <!-- e-mail subject -->
        <emailSzoveg>mail text</emailSzoveg>
        <!-- text of e-mail -->
    </elado>
    <vevo>
        <!--Buyer details -->
        <nev>Kovacs Bt.</nev>
        <!-- name -->
        <azonosito></azonosito>
        <!-- identification -->
        <irsz>2030</irsz>
        <!-- ZIP code -->
        <telepules>Érd</telepules>
        <!-- city -->
        <cim>Tárnoki út 23.</cim>
        <!-- address -->
        <email>buyer@example.com</email>
        <!-- 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. postázási név</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 -->
        <telefonszam>Tel:+3630-555-55-55, Fax:+3623-555-555</telefonszam>
        <!-- phone number -->
        <megjegyzes>A portáról felszólni a 214-es mellékre.</megjegyzes>
        <!-- comment -->
    </vevo>
    <fuvarlevel>
        <!-- waybill, 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 -->
        </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>

In the below example all fields are mandatory, but some of them can be left blank, as they are not used in Számla Agent only in other interfaces of Számlázz.hu. Számlázz.hu does not make any calculations on the given amount so it is mandatory to provide all amount that must be shown on the invoice.

Számla Agent will run some checking:
quantity * net unit price == net price

the calculated VAT amount
net price + VAT == gross price

If it finds an error, it will send a notification (possible error codes: 57, 259, 260, 261, 262, 263, 264) and it won’t generate the invoice.

In the XML the order of the fields is strict, they cannot be interchanged.

VAT rates

In the XML file into the <afakulcs></afakulcs> field you have to write one of the following values:

Value in XML field Description
TAM supply exempt from VAT / exempt supply
AAM person exempt from VAT / exempt person
EU Within EU
EUK Outside EU
MAA exempt from tax
F.AFA reverse VAT
K.AFA differential VAT
0, 5, 7, 18, 19, 20, 25, 27 exact VAT rate

XSD scheme compliance

The sent XML file must comply with the following XSD scheme. The fields where you see minOccurs=”0” are not mandatory.

<?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>
            <element name="adoalany" type="int" maxOccurs="1" minOccurs="0"></element>            
            <element name="adoszam" 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="kulcstartojelszo" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="szamlaLetoltes" type="boolean" maxOccurs="1" minOccurs="1"></element>
            <element name="szamlaLetoltesPld" type="int" maxOccurs="1" minOccurs="0"></element>
            <element name="valaszVerzio" type="int" maxOccurs="1" minOccurs="0"></element>
            <element name="aggregator" 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>
        </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="1"></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>
            <!-- Ha az arfolyamBank MNB és nincs megadva az arfolyam, akkor az MNB aktuális árfolyamát használjuk a számlakészítéskor -->
            <element name="arfolyamBank" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="arfolyam" type="double" maxOccurs="1" minOccurs="0"></element>
            <element name="rendelesSzam" type="string" maxOccurs="1" minOccurs="0"></element>
        <element name="dijbekeroSzamlaszam" type="string" maxOccurs="1" minOccurs="0"></element> <!-- reference to pro forma invoice number -->
            <element name="elolegszamla" type="boolean" maxOccurs="1" minOccurs="0"></element>
            <element name="vegszamla" type="boolean" 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>
        </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>
        </restriction>
    </simpleType>
    <complexType name="transoflexTipus">
        <sequence>
            <!-- a TOF-tól kapott 5 jegyű szám -->
            <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>
            <!-- Sprinterrel egyeztetett 3 karakteres rövidítés -->
            <element name="azonosito" type="string" maxOccurs="1" minOccurs="0"></element>
            <!-- Sprintertől kapott feladókód, 10 jegyű szám -->
            <element name="feladokod" type="string" maxOccurs="1" minOccurs="0"></element>
            <!-- Sprinteres iránykód, az a sprinter saját "irányítószáma", pl. "106" -->
            <element name="iranykod" type="string" maxOccurs="1" minOccurs="0"></element>
            <!-- Csomagok száma, ennyi fuvarlevél lesz a számlához összesen -->
            <element name="csomagszam" type="int" maxOccurs="1" minOccurs="0"></element>
            <!-- számlánként egyedi, 7-13 karakteres azonosító -->
            <element name="vonalkodPostfix" type="string" maxOccurs="1" minOccurs="0"></element>
            <!-- ez az 1 munkanapos szöveg, többnyire -->
            <element name="szallitasiIdo" type="string" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>
    <complexType name="pppTipus">
        <sequence>
            <!-- PPP-vel egyeztetett 3 karakteres rövidítés -->
            <element name="vonalkodPrefix" type="string" maxOccurs="1" minOccurs="0"></element>
            <!-- számlánként egyedi, maximum 7 karakteres azonosító -->
            <element name="vonalkodPostfix" type="string" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>
    <complexType name="mplTipus">
        <sequence>
            <!-- MPL vevőkód -->
            <element name="vevokod" type="string" maxOccurs="1" minOccurs="1"></element>
            <!-- A vonalkód ezen string alapján készül -->
            <element name="vonalkod" type="string" maxOccurs="1" minOccurs="1"></element>
            <!-- A csomag tömege, tartalmazhat tizedes pontot, ha szükséges -->
            <element name="tomeg" type="string" maxOccurs="1" minOccurs="1"></element>
            <!-- A különszolgáltatásokhoz megadható ikonok konfigurációja, ha nincs megadva, akkor egy ikon sem jelenik meg -->
            <element name="kulonszolgaltatasok" type="string" maxOccurs="1" minOccurs="0"></element>
            <!-- A fuvarlevélen az értéknyilvánítás mező értéke -->
            <element name="erteknyilvanitas" type="double" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>
    <complexType name="fuvarlevelTipus">
        <sequence>
            <!-- TODO az "uticel" nem használt, 2014.05.30. után eltávolítandó, helyette a sprinter/iranykod mező használandó -->
            <element name="uticel" type="string" maxOccurs="1" minOccurs="0"></element>
            <!-- TOF, PPP, SPRINTER, FOXPOST, EMPTY lehet az értéke, ha nincs fuvarlevél, akkor nem kell megadni -->
            <element name="futarSzolgalat" type="string" maxOccurs="1" minOccurs="0"></element>
            <!-- Általános vonalkód megadási lehetőség, ha az alágban nem adjuk meg az adott futárszolgálat 
                 vonalkódjának előállításához szükséges adatokat akkor ezt használja a rendszer. -->
            <element name="vonalkod" type="string" maxOccurs="1" minOccurs="0"></element>
            <!-- A fuvarlevélen ez a megjegyzés jelenik meg. -->
            <element name="megjegyzes" type="string" maxOccurs="1" minOccurs="0"></element>
            <!-- Trans-O-Flex futárszolgálat esetén feltöltendő csomópont -->
            <element name="tof" type="tns:transoflexTipus" maxOccurs="1" minOccurs="0"></element>
            <!-- PickPackPoint-ra szállítás esetén kitöltendő csomópont -->
            <element name="ppp" type="tns:pppTipus" maxOccurs="1" minOccurs="0"></element>
            <!-- Sprinter futárszolgálat esetén feltöltendő csomópont -->
            <element name="sprinter" type="tns:sprinterTipus" maxOccurs="1" minOccurs="0"></element>
            <!-- MPL esetén feltöltendő csomópont -->
            <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>
                <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>

What answers do I receive during the invoice creation?

The received response depends on the value of the valaszVerzio variable sent in the request.

Text response

[ERR] Számla mentés sikertelen. Már létező rendelésszám: XX. ---------- t.getMessage(): Már létező rendelésszám: XX. ---------- [CEG:978] 
[MODUL:SZAMLAZZGUI] [INSTANCE:hu.kboss.szamlazz.gui.action.AcXmlSzamla] Már létező rendelésszám: XX.
[LOCATION:hu.kboss.szamlazz.api.bean.SzFej.insert (SzFej.java) #1700]
hu.kboss.szamlazz.api.bean.SzFej.insert(SzFej.java:1700)
hu.kboss.szamlazz.gui.action.AcXmlSzamla.performAction(AcXmlSzamla.java:242)
hu.kboss.szamlazz.controller.Controller.executeAction(Controller.java:715)
hu.kboss.szamlazz.controller.Controller.doGet(Controller.java:468)
hu.kboss.szamlazz.controller.Controller.doPost(Controller.java:639)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:662)

There might be three different kind of answers. In the XML you can choose to receive the invoice in PDF format <szamlaLetoltes>true/false</szamlaLetoltes>:

In case there was an error during invoice creation, you will receive one or more error messages.

The format of the error message will be as it can be seen below. The part between [ERR] and ------------ is important.

XML response

XML response in case of success when <szamlaletoltes> is FALSE:

<?xml version="1.0" encoding="UTF-8"?>
<xmlszamlavalasz xmlns="http://www.szamlazz.hu/xmlszamlavalasz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <sikeres>true</sikeres>
  <szamlaszam>XXX-2012-3</szamlaszam>
  <szamlanetto>30000</szamlanetto>
  <szamlabrutto>38100</szamlabrutto>
</xmlszamlavalasz>

XML response in case of success when <szamlaletoltes> is TRUE:

<?xml version="1.0" encoding="UTF-8"?>
<xmlszamlavalasz xmlns="http://www.szamlazz.hu/xmlszamlavalasz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <sikeres>true</sikeres>
  <szamlaszam>XXX-2012-3</szamlaszam>
  <szamlanetto>30000</szamlanetto>
  <szamlabrutto>38100</szamlabrutto>
  <pdf>JVBERi0xLjQKJdDUxdgKMSAwIG9iago8PCAvUyAvR29UbyAvRCBbMiAwIFIgIC9GaXQgXSA+Pgpl
bmRvYmoKNCAwIG9iaiA8PAovTGVuZ3RoIDE4MDggICAgICAKL0ZpbHRlciAvRmxhdGVEZWNvZGUK Pj4Kc3RyZWFtCnjaxVjLbttGFN37K7gpQAHlZN4P72zUTpvATVu72aRZqBLtKHqlEm0jAor8es88
RJESLduRgXoRTTjDO+fee+6LNLvJaPb66PTq6NU5c5kjTnOdXV1nmhJnMqMEMUJkV8PsQ85I7+PV
m1fntnGMCSKEg4xw4kuP2/wvykVPGp6Xk2FYK0rz/sxvfe0VQgicULRclMOyGmHJegVXxtH8crU5
Pp30l83/HvcKxrH66fXrglPGC+GxHNGEf/sXyuiMS2KsYQGmsUQLmxVcE6VtRHu56iW0SqlwZafM
....
MDAwMDg2NTIxIDAwMDAwIG4gCjAwMDAwODY2NTcgMDAwMDAgbiAKMDAwMDA4NjY5MyAwMDAwMCBu
IAowMDAwMDg2Nzk4IDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgNDIKL1Jvb3QgNDAgMCBSCi9J
bmZvIDQxIDAgUgovSUQgWzxENDhERjNFQTdFM0MwQ0QyNDY0RUIzNzYwRTJBQzdBRj4gPEQ0OERG
M0VBN0UzQzBDRDI0NjRFQjM3NjBFMkFDN0FGPl0gPj4Kc3RhcnR4cmVmCjg3MTIzCiUlRU9G</pdf>
</xmlszamlavalasz>

XML response in case of unsuccessful creation:

<?xml version="1.0" encoding="UTF-8"?>
<xmlszamlavalasz xmlns="http://www.szamlazz.hu/xmlszamlavalasz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <sikeres>false</sikeres>
  <hibakod>3</hibakod>
  <hibauzenet><![CDATA[Bejelentkezési hiba - a megadott login név és jelszó pároshoz nem létezik
felhasználó]]></hibauzenet>
</xmlszamlavalasz>

The response complies with the following XSD scheme:

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/xmlszamlavalasz" xmlns:tns="http://www.szamlazz.hu/xmlszamlavalasz" elementFormDefault="qualified">
  <complexType name="szamlavalasz">
    <sequence>
      <element name="sikeres" type="boolean" maxOccurs="1" minOccurs="1"></element>
      <element name="hibakod" type="string" maxOccurs="1" minOccurs="0"></element>
      <element name="hibauzenet" type="string" maxOccurs="1" minOccurs="0"></element>
      <element name="szamlaszam" type="string" maxOccurs="1" minOccurs="0"></element>
      <element name="szamlanetto" type="double" maxOccurs="1" minOccurs="0"></element>
      <element name="szamlabrutto" type="double" maxOccurs="1" minOccurs="0"></element>
      <element name="pdf" type="base64Binary" maxOccurs="1" minOccurs="0"></element>
    </sequence>
  </complexType>
  <element name="xmlszamlavalasz" type="tns:szamlavalasz"></element>
</schema>

The structure of the response is very different, but the logic behind it is similar.

In the header of the XML response you still get the information described above. In case the <szamlaletoltes> value is set to TRUE, then the invoice PDF will appear within the <PDF></PDF> tags with base64 encryption.

Net, Gross and VAT values shown on invoice

Notions:

Rounding

Rounding based on NET value (HUF invoice)

In case you are issuing invoice for a business partner and not a natural person (B2B), then you have to use this method in the following way:

Rounding based on GROSS value (HUF invoice)

In case you are issuing an invoice to a natural person (B2C) you have to use this method.

Example: I sold 3 pieces of a book that has a 500 HUF GROSS price:

Rounding this amount will mean that the VAT amount of the invoice is 319 HUF.

The “Total net value of item” can be calculated by extracting the VAT amount from the “Total gross value of item”. Since both values are integers, the result will be an integer as well.
In case you do not keep these rules Számla Agent will do the roundings in order to comply with the law.

How do I know the number, GROSS and NET value of an invoice?

All HTTP response consists two parts. First one is the header the second one is the body. In case you asked for the invoice the body will be the PDF. The header is always a name=value pair. In all programming languages that support HTTP requests there is an option to get the values in the header. In Számla Agent you can put data in the header on the following names, that always start with szlahu_:

If there are error codes in the header then the other data (invoice number, gross and net value) will not be present in the header. In case of XML response besides the header the XML will include that information as well.

Can I issue electronic invoices?

Yes. Számla Agent can generate both e-invoice and regular, paper based invoice. The type of the invoice depends on the value of the eszamla variable. In case of TRUE e-invoice will be created, in case of FALSE regular invoice will be created.

Referencing a pro forma invoice

It's possible to reference pro forma invoices to issue a regular invoice. This was not possible until recently (06.06.2019). Before this it was not possible to issue a regular invoice based on the pro forma if there was no order number present on the invoice. Right now it's possible by referencing the pro forma by its invoice number using the <dijbekeroSzamlaszam></dijbekeroSzamlaszam> tag.

Agent output types

The Agent can make documents of the following types:

Will the system send an e-mail notification after an invoice was generated by Számla Agent?

Only if the e-mail address of the buyer is provided in the XML. Here you can also set the subject and content text of the notification e-mail. Also, there are a few options to format the text with the help of some BBCode tags.

Accepted BBCodes are the following:

You can also attach files to the e-mail notification. This could be useful if for e.g. you are selling electronics, and you'd like to attach the warranty to the invoice.

In order to do this, you need to post the XML file to the action-xmlagentxmlfile form, and also the attachment to attachfile1. The maximum number of attachents are 5, and you can only post a single file to a single form. To attach for e.g. 2 files, you need to post one file to attachfile1, and another to attachfile2.

Are there any example codes for Számla Agent calls?

Yes, PHP and Joomla Virtuemart example code is attached to the following ZIP file, called szamla_agent_minta.php (or you can download here).

.NET example is available here, and Woocommerce here.

You can also check out our FAQ page about Szamla Agent integration with existing web shops by following this link.

Reversing an invoice (storno)

Post request data

Here is a short HTML code example of the invoice storno call for Számla Agent.

So the request must be “multiform/form-data” type and must contain one file on the name action-szamla_agent_st.

<html>
  <head><meta content="text/html; CHARSET=UTF-8"></head>
  <body>
    <form action="https://www.szamlazz.hu/szamla/" method="post" enctype="multipart/form-data">
      <input type="file" name="action-szamla_agent_st"><br>
      <input type="submit" name="generate" value="Reverse invoice">
    </form>
  </body>
</html>

You can also try out the same HTML code here:



Example XML

<?xml version="1.0" encoding="UTF-8"?>
<xmlszamlast xmlns="http://www.szamlazz.hu/xmlszamlast" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.szamlazz.hu/xmlszamlast https://www.szamlazz.hu/szamla/docs/xsds/agentst/xmlszamlast.xsd">
    <beallitasok>
        <!-- settings -->
        <felhasznalo>Test123</felhasznalo>
        <!-- a Számlázz.hu user -->
        <jelszo>Test123</jelszo>
        <!-- a Számlázz.hu password -->
        <!-- You can also use the Agent key instead of username/password -->
        <szamlaagentkulcs>Please fill!</szamlaagentkulcs>
        <eszamla>false</eszamla>
        <!-- e-invoice (true/false) -->
        <szamlaLetoltes>true</szamlaLetoltes>
        <!-- download PDF -->
        <szamlaLetoltesPld>1</szamlaLetoltesPld>
        <!-- download PDF copy or original -->
    </beallitasok>
    <fejlec>
        <!-- header -->
        <szamlaszam>E-TST-2011-1</szamlaszam>
        <!-- invoice number -->
        <keltDatum>2010-09-12</keltDatum>
        <!-- date of issue -->
        <teljesitesDatum>2010-09-10</teljesitesDatum>
        <!-- date of fulfillment -->
        <tipus>SS</tipus>
        <!-- type -->
    </fejlec>
    <elado>
        <!-- seller -->
        <emailReplyto>elado@example.com</emailReplyto>
        <emailTargy>Email tárgya</emailTargy>
        <!-- e-mail subject -->
        <emailSzoveg>Lorem ipsum</emailSzoveg>
        <!-- e-mail content -->
    </elado>
    <vevo>
        <!-- buyer -->
        <email>buyer@example.com</email>
    </vevo>
</xmlszamlast>

XSD scheme compliance

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/xmlszamlast" xmlns:tns="http://www.szamlazz.hu/xmlszamlast" elementFormDefault="qualified">
    <complexType name="vevoTipus">
        <sequence>
            <element name="email" type="string" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>
    <complexType name="eladoTipus">
        <sequence>
            <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>
        </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="kulcstartojelszo" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="szamlaLetoltes" type="boolean" maxOccurs="1" minOccurs="1"></element>
            <element name="szamlaLetoltesPld" type="int" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>
    <complexType name="fejlecTipus">
        <sequence>
            <element name="szamlaszam" type="string" maxOccurs="1" minOccurs="1"></element>
            <element name="keltDatum" type="date" maxOccurs="1" minOccurs="0"></element>
            <element name="teljesitesDatum" type="date" maxOccurs="1" minOccurs="0"></element>
            <element name="tipus" type="string" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>
    <element name="xmlszamlast">
        <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="0"></element>
                <element name="vevo" type="tns:vevoTipus" maxOccurs="1" minOccurs="0"></element>
            </sequence>
        </complexType>
    </element>
</schema>

The sent XML file must comply with the following XSD scheme. The fields where you see minOccurs=”0” are not mandatory.

How do I know the number, GROSS and NET value of a storno invoice?

All HTTP response consists of two parts. First is the header the second one is the body. In case you asked for the Invoice the body will be the PDF. The header is always a name=value pair. In all programming languages that support HTTP requests there is an option to get the values in the header. In Számla Agent you can put data in the header on the following names, that always start with szlahu_:

What answers do I receive during the storno invoice creation?

[ERR] Számla mentés sikertelen. Már létező rendelésszám: XX. ---------- t.getMessage(): Már létező rendelésszám:XX. ---------- [CEG:978] 
[MODUL:SZAMLAZZGUI] [INSTANCE:hu.kboss.szamlazz.gui.action.AcXmlSzamla] Már
létező rendelésszám: XX.[LOCATION:hu.kboss.szamlazz.api.bean.SzFej.insert (SzFej.java) #1700] 
hu.kboss.szamlazz.api.bean.SzFej.insert(SzFej.java:1700)
hu.kboss.szamlazz.gui.action.AcXmlSzamla.performAction(AcXmlSzamla.java:242)
hu.kboss.szamlazz.controller.Controller.executeAction(Controller.java:715)
hu.kboss.szamlazz.controller.Controller.doGet(Controller.java:468)
hu.kboss.szamlazz.controller.Controller.doPost(Controller.java:639)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:662)

There might be three different kind of answers. In the XML you can choose to receive the invoice in PDF format <szamlaLetoltes>true/false</szamlaLetoltes>:

The format of the error message will be as it can be seen below. The part between the [ERR] and ------------ is important:

Registering a credit entry

Data of post request

Here is a short example HTML code for the invoice storno call for Számla Agent:

<html>
  <head><meta content="text/html; CHARSET=UTF-8"></head>
  <body>
    <form action="https://www.szamlazz.hu/szamla/" method="post" enctype="multipart/form-data">
      <input type="file" name="action-szamla_agent_kifiz"><br>
      <input type="submit" name="generate" value="Set invoice to paid">
    </form>
  </body>
</html>

You can also try out the same HTML code here:



So the request must be “multiform/form-data” type and must contain one file on the name action-szamla_agent_kifiz.

Example XML

You have to use the following simple XML in the request in which you can register maximum 5 credit entry.

<?xml version="1.0" encoding="UTF-8"?>
<xmlszamlakifiz xmlns="http://www.szamlazz.hu/xmlszamlakifiz" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xsi:schemaLocation="http://www.szamlazz.hu/xmlszamlakifiz https://www.szamlazz.hu/szamla/docs/xsds/agentkifiz/xmlszamlakifiz.xsd">
  <beallitasok> <!-- settings -->
    <felhasznalo>Test123</felhasznalo><!-- a Számlázz.hu user -->
    <jelszo>Test123</jelszo><!-- a Számlázz.hu’s user password -->
    <!-- You can also use the Agent key instead of username/password -->
    <szamlaagentkulcs>Please fill!</szamlaagentkulcs>
    <szamlaszam>E-TST-2011-1</szamlaszam> <!-- invoice number -->
    <additiv>false</additiv> <!-- if it is true, then the former credit entries will be retained -->
  </beallitasok>
  <kifizetes> <!-- payment -->
    <datum>2012-01-01</datum><!-- date -->
    <jogcim>készpénz</jogcim><!-- payment type --> 
    <osszeg>1000</osszeg><!-- amount -->
  </kifizetes>
  <kifizetes><!-- an other payment -->
    <datum>2012-01-15</datum>
    <jogcim>átutalás</jogcim>
    <osszeg>2000</osszeg>
    <leiras>Test description</leiras>   <!-- Description, not required -->
  </kifizetes>
</xmlszamlakifiz>

XSD scheme compliance

The sent XML file must comply with the following XSD scheme. The fields where you see minOccurs=”0” are not mandatory.

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/xmlszamlakifiz" xmlns:tns="http://www.szamlazz.hu/xmlszamlakifiz" elementFormDefault="qualified">
<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="szamlaszam" type="string" maxOccurs="1" minOccurs="1"></element>
    <element name="additiv" type="boolean" maxOccurs="1" minOccurs="1"></element>
  </sequence>
</complexType>
<complexType name="kifizetesTipus">
  <sequence>
    <element name="datum" type="date" maxOccurs="1" minOccurs="1"></element>
    <element name="jogcim" 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>
  </sequence>
</complexType>
<complexType name="szamlaKifizTipus">
  <sequence>
    <element name="beallitasok" type="tns:beallitasokTipus" maxOccurs="1" minOccurs="1"></element>
    <element name="kifizetes" type="tns:kifizetesTipus" maxOccurs="5" minOccurs="0"></element>
  </sequence>
</complexType>
<element name="xmlszamlakifiz" type="tns:szamlaKifizTipus"></element>
</schema>

What answers do I receive during registering a credit entry?

All HTTP respons consist of two parts. First is the header the second one is the body. In case you asked for the Invoice the body will be the PDF. The header is always a name=value pair. In all programming languages that support HTTP requests there is an option to get the values in the header. In Számla Agent you can put data in the header on the following names, that always start with szlahu_:

If there are error codes in the header, then the other date (invoice number, gross and net value) will not be present in the header. In case of XML response besides the header the XML will include these information as well.

There are two possible answers:

The format of the error message will be as it can be seen below. The part between the [ERR] and ------------ is important.

[ERR] Számla mentés sikertelen. Már létező rendelésszám: XX. ---------- t.getMessage(): Már létező rendelésszám:
XX. ---------- [CEG:978] [MODUL:SZAMLAZZGUI] [INSTANCE:hu.kboss.szamlazz.gui.action.AcXmlSzamla] Már
létező rendelésszám: XX.[LOCATION:hu.kboss.szamlazz.api.bean.SzFej.insert (SzFej.java) #1700]
hu.kboss.szamlazz.api.bean.SzFej.insert(SzFej.java:1700)
hu.kboss.szamlazz.gui.action.AcXmlSzamla.performAction(AcXmlSzamla.java:242)
hu.kboss.szamlazz.controller.Controller.executeAction(Controller.java:715)
hu.kboss.szamlazz.controller.Controller.doGet(Controller.java:468)
hu.kboss.szamlazz.controller.Controller.doPost(Controller.java:639)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:662)

Invoice payment feedback for the webshop

If you need feedback, you can set it on the settings page by following this link after logging in.

In that case, if the state of payment changes then Számlázz.hu sends the following data:

Example: http://www.webaruhaz.hu/kifizetettszamla?szlahu_szamlaszam=E-2015-123&szlahu_rendelesszam=RND-1234&szlahu_bruttovegosszeg=10000&szlahu_kifizetettbrutto=10000

Querying the invoice PDF

There exist two different types of the requested pdf:

Data of post request

Here is a short HTML code example of the invoice storno call for Számla Agent:

<html>
<head><meta content="text/html; CHARSET=UTF-8"></head>
<body>
  <form action="https://www.szamlazz.hu/szamla/" method="post" enctype="multipart/form-data">
    <input type="file" name="action-szamla_agent_pdf"><br>
    <input type="submit" name="generate" value="Query invoice pdf">
  </form>
</body>
</html>

You can also try out the same HTML code here:



So the request must be “multiform/form-data” type and must contain one file on the name action-szamla_agent_pdf.

Example XML

<xmlszamlapdf xmlns="http://www.szamlazz.hu/xmlszamlapdf" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xsi:schemaLocation="http://www.szamlazz.hu/xmlszamlapdf https://www.szamlazz.hu/szamla/docs/xsds/agentpdf/xmlszamlapdf.xsd">
  <felhasznalo>Test123</felhasznalo><!-- a Számlázz.hu user -->
  <jelszo>Test123</jelszo><!-- a Számlázz.hu password -->
  <szamlaagentkulcs>Please fill!</szamlaagentkulcs>
  <szamlaszam>E-TST-2011-1</szamlaszam><!-- invoice number -->
  <valaszVerzio>2</valaszVerzio><!-- response type (see details below) -->
</xmlszamlapdf>

XSD scheme compliance

The sent XML file must comply to the following XSD scheme. The fields where you see minOccurs=”0”are not mandatory.

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/xmlszamlapdf"
xmlns:tns="http://www.szamlazz.hu/xmlszamlapdf" elementFormDefault="qualified">
  <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="szamlaszam" type="string" maxOccurs="1" minOccurs="1"></element>
      <element name="valaszVerzio" type="int" maxOccurs="1" minOccurs="1"></element>
    </sequence>
  </complexType>
  <element name="xmlszamlapdf" type="tns:beallitasokTipus"></element>
</schema>

What answers do I receive during the PDF request?

The type of response depends on the value of the <valaszVerzio> variable sent in the request.

In both cases the parameters will be in the header.

PDF response

There are two kind of answers:

The format of the error message will be as it can be seen below. The part between the [ERR] and ------------ is important.

[ERR] Számla mentés sikertelen. Már létező rendelésszám: XX. ---------- t.getMessage(): Már létező rendelésszám:
XX. ---------- [CEG:978] [MODUL:SZAMLAZZGUI] [INSTANCE:hu.kboss.szamlazz.gui.action.AcXmlSzamla] Már létező rendelésszám: XX.[LOCATION:hu.kboss.szamlazz.api.bean.SzFej.insert (SzFej.java) #1700]
hu.kboss.szamlazz.api.bean.SzFej.insert(SzFej.java:1700)
hu.kboss.szamlazz.gui.action.AcXmlSzamla.performAction(AcXmlSzamla.java:242)
hu.kboss.szamlazz.controller.Controller.executeAction(Controller.java:715)
hu.kboss.szamlazz.controller.Controller.doGet(Controller.java:468)
hu.kboss.szamlazz.controller.Controller.doPost(Controller.java:639)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:662)

XML response

The structure of the response will be way different since it is an XML but the logic behind it is similar. Besides the XML in the header the above mentioned parameters are included as well. The invoice PDF is in the XML between the <pdf></pdf> tags with base64 encoding. An example XML response in case of successful request:

<?xml version="1.0" encoding="UTF-8"?>
<xmlszamlavalasz xmlns="http://www.szamlazz.hu/xmlszamlavalasz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <sikeres>true</sikeres>
  <szamlaszam>XXX-2012-3</szamlaszam>
  <szamlanetto>30000</szamlanetto>
  <szamlabrutto>38100</szamlabrutto>
  <pdf>JVBERi0xLjQKJdDUxdgKMSAwIG9iago8PCAvUyAvR29UbyAvRCBbMiAwIFIgIC9GaXQgXSA+Pgpl
bmRvYmoKNCAwIG9iaiA8PAovTGVuZ3RoIDE4MDggICAgICAKL0ZpbHRlciAvRmxhdGVEZWNvZGUK
Pj4Kc3RyZWFtCnjaxVjLbttGFN37K7gpQAHlZN4P72zUTpvATVu72aRZqBLtKHqlEm0jAor8es88
RJESLduRgXoRTTjDO+fee+6LNLvJaPb66PTq6NU5c5kjTnOdXV1nmhJnMqMEMUJkV8PsQ85I7+PV
m1fntnGMCSKEg4xw4kuP2/wvykVPGp6Xk2FYK0rz/sxvfe0VQgicULRclMOyGmHJegVXxtH8crU5
Pp30l83/HvcKxrH66fXrglPGC+GxHNGEf/sXyuiMS2KsYQGmsUQLmxVcE6VtRHu56iW0SqlwZafM
....
MDAwMDg2NTIxIDAwMDAwIG4gCjAwMDAwODY2NTcgMDAwMDAgbiAKMDAwMDA4NjY5MyAwMDAwMCBu
IAowMDAwMDg2Nzk4IDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgNDIKL1Jvb3QgNDAgMCBSCi9J
bmZvIDQxIDAgUgovSUQgWzxENDhERjNFQTdFM0MwQ0QyNDY0RUIzNzYwRTJBQzdBRj4gPEQ0OERG
M0VBN0UzQzBDRDI0NjRFQjM3NjBFMkFDN0FGPl0gPj4Kc3RhcnR4cmVmCjg3MTIzCiUlRU9G</pdf>
</xmlszamlavalasz>

An example response in case of unsuccessful request

<?xml version="1.0" encoding="UTF-8"?>
<xmlszamlavalasz xmlns="http://www.szamlazz.hu/xmlszamlavalasz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <sikeres>false</sikeres>
  <hibakod>3</hibakod>
  <hibauzenet><![CDATA[Bejelentkezési hiba - a megadott login név és jelszó pároshoz nem létezik
felhasználó]]></hibauzenet>
</xmlszamlavalasz>

The response complies with the following XSD

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/xmlszamlavalasz" xmlns:tns="http://www.szamlazz.hu/xmlszamlavalasz" elementFormDefault="qualified">
    <complexType name="szamlavalasz">
        <sequence>
            <element name="sikeres" type="int" maxOccurs="1" minOccurs="1"></element>
            <element name="hibakod" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="hibauzenet" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="szamlaszam" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="szamlanetto" type="double" maxOccurs="1" minOccurs="0"></element>
            <element name="szamlabrutto" type="double" maxOccurs="1" minOccurs="0"></element>
            <element name="pdf" type="base64Binary" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>
    <element name="xmlszamlavalasz" type="tns:szamlavalasz"></element>
</schema>

Querying the invoice XML

Post request data

<html>
  <head><meta content="text/html; CHARSET=UTF-8"></head>
  <body>
    <form action="https://www.szamlazz.hu/szamla/" method="post" enctype="multipart/form-data">
      <input type="file" name="action-szamla_agent_xml"><br>
      <input type="submit" name="generate" value="Query invoice xml">
    </form>
  </body>
</html>

You can also try out the same HTML code here:



Example XML

<?xml version="1.0" encoding="UTF-8"?>
<xmlszamlaxml xmlns="http://www.szamlazz.hu/xmlszamlaxml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.szamlazz.hu/xmlszamlaxml http://www.szamlazz.hu/docs/xsds/agentpdf/xmlszamlaxml.xsd">
    <felhasznalo>Test123</felhasznalo>
    <jelszo>Test123</jelszo>
        <szamlaagentkulcs>Please fill!</szamlaagentkulcs>
    <szamlaszam>E-TST-2011-1</szamlaszam>
    <rendelesSzam>123</rendelesSzam>
    <pdf>true</pdf>
</xmlszamlaxml>

XSD scheme compliance

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/xmlszamlaxml" xmlns:tns="http://www.szamlazz.hu/xmlszamlaxml" elementFormDefault="qualified">
    <element name="xmlszamlaxml">
        <complexType>
            <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="szamlaszam" type="string" maxOccurs="1" minOccurs="0"></element>
                <element name="rendelesSzam" type="string" maxOccurs="1" minOccurs="0"></element>
                <element name="pdf" type="boolean" maxOccurs="1" minOccurs="0"></element>
            </sequence>
        </complexType>
    </element>
</schema>

Expected invoice data results

Example XML response in case of an unsuccessful request

<?xml version="1.0" encoding="UTF-8"?>
<szamla xmlns="http://www.szamlazz.hu/szamla" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.szamlazz.hu/szamla szamla.xsd ">
    <szallito>
        <id>201</id>
        <nev>DEVE-1966 Lorem ipsum dolor sit amet, consectetur cs amet., 512356234</nev>
        <cim>
            <orszag>Magyarorsz&#225;g</orszag>
            <irsz>1086</irsz>
            <telepules>Budapest</telepules>
            <cim>Szerdahelyi utca 4-8</cim>
        </cim>
        <adoszam>202 336 0856</adoszam>
        <adoszameu>I&#268;DPH:SK2023360856, I&#268;O:46393218</adoszameu>
        <bank>                                                             
            <nev>UniCredit Bank Hungary Zrt.</nev>
            <bankszamla></bankszamla>                                                     
        </bank>
    </szallito>                                                                                                 
    <alap>
        <id>529992</id>
        <szamlaszam>D-LOLO-66</szamlaszam>
        <tipus>D</tipus>
        <eszamla>0</eszamla>
        <kelt>2017-10-09</kelt>
        <telj>2017-10-09</telj>
        <fizh>2017-10-09</fizh>
        <fizmod>credit_card</fizmod>
        <fizmodunified>egy&#233;b</fizmodunified>
        <nyelv>hu</nyelv>
        <devizanem>HUF</devizanem>
        <devizaarf>0</devizaarf>
        <megjegyzes></megjegyzes>
        <penzforg>false</penzforg>
        <kata>true</kata>
        <teszt>false</teszt>
    </alap>
    <vevo>
        <id>221216</id>
        <nev>Ez nem &amp; fog menni</nev>
        <cim>
            <orszag>Magyarorsz&#225;g</orszag>
            <irsz>1324</irsz>
            <telepules>Vesz&#337;Teszt,</telepules>
            <cim>1234</cim>
        </cim>
        <adoszam></adoszam>
        <fokonyv>
            <vevo></vevo>
            <vevoazon></vevoazon>
        </fokonyv>
    </vevo>
    <tetelek>
        <tetel>
            <nev>Alma</nev>
            <mennyiseg>1</mennyiseg>
            <mennyisegiegyseg>db</mennyisegiegyseg>
            <nettoegysegar>380</nettoegysegar>
            <afakulcs>20</afakulcs>
            <netto>380</netto>
            <arresafaalap>0</arresafaalap>
            <afa>76</afa>
            <brutto>456</brutto>
            <megjegyzes>Alma megjegyzés</megjegyzes>
            <fokonyv>
                <arbevetel></arbevetel>
                <afa></afa>
                <gazdasagiesemeny></gazdasagiesemeny>
                <gazdasagiesemenyafa></gazdasagiesemenyafa>
            </fokonyv>
        </tetel>
    </tetelek>
    <osszegek>
        <afakulcsossz>
            <afakulcs>20</afakulcs>
            <netto>464</netto>
            <afa>93</afa>
            <brutto>557</brutto>
        </afakulcsossz>
        <totalossz>
            <netto>464</netto>
            <afa>93</afa>
            <brutto>557</brutto>
        </totalossz>
    </osszegek>
    <pdf>BASE64 formátumban található itt a számla PDF</pdf>
</szamla>

The response complies with the following XSD

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/xmlszamlavalasz" xmlns:tns="http://www.szamlazz.hu/xmlszamlavalasz" elementFormDefault="qualified">
    <complexType name="szamlavalasz">
        <sequence>
            <element name="sikeres" type="int" maxOccurs="1" minOccurs="1"></element>
            <element name="hibakod" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="hibauzenet" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="szamlaszam" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="szamlanetto" type="double" maxOccurs="1" minOccurs="0"></element>
            <element name="szamlabrutto" type="double" maxOccurs="1" minOccurs="0"></element>
            <element name="vevoifiokurl" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="pdf" type="base64Binary" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>
    <element name="xmlszamlavalasz" type="tns:szamlavalasz"></element>
</schema>

Deleting a pro forma invoice

Post request data

multipart/form-data based post

<html>
  <head><meta content="text/html; CHARSET=UTF-8"></head>
  <body>
    <form action="https://www.szamlazz.hu/szamla/" method="post" enctype="multipart/form-data">
      <input type="file" name="action-szamla_agent_dijbekero_torlese"><br>
      <input type="submit" name="generate" value="Delete Pro forma invoice">
    </form>
  </body>
</html>

You can also try out the same HTML code here:



Regular HTTP Post based method

Example XML

<?xml version="1.0" encoding="UTF-8"?>
<xmlszamladbkdel xmlns="http://www.szamlazz.hu/xmlszamladbkdel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.szamlazz.hu/xmlszamladbkdel http://www.szamlazz.hu/docs/xsds/szamladbkdel/xmlszamladbkdel.xsd ">
  <beallitasok>
    <felhasznalo>Test123</felhasznalo>
    <jelszo>Test123</jelszo>
    <szamlaagentkulcs>Please fill!</szamlaagentkulcs>
  </beallitasok>
  <fejlec>
    <szamlaszam>D-43</szamlaszam>
  </fejlec>
</xmlszamladbkdel>

The following XML structure has to be used to delete a pro forma invoice with the given order number:

<?xml version="1.0" encoding="UTF-8"?>
<xmlszamladbkdel xmlns="http://www.szamlazz.hu/xmlszamladbkdel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.szamlazz.hu/xmlszamladbkdel http://www.szamlazz.hu/docs/xsds/szamladbkdel/xmlszamladbkdel.xsd ">
  <beallitasok>
    <felhasznalo>Test123</felhasznalo>
    <jelszo>Test123</jelszo>
    <szamlaagentkulcs>Please fill!</szamlaagentkulcs>
  </beallitasok>
  <fejlec>
    <rendelesszam>XXX</rendelesszam>
  </fejlec>
</xmlszamladbkdel>

XSD scheme compliance

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/xmlszamladbkdel" xmlns:tns="http://www.szamlazz.hu/xmlszamladbkdel" elementFormDefault="qualified">
    <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>
        </sequence>
    </complexType>
    <complexType name="fejlecTipus">
        <sequence>
            <element name="szamlaszam" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="rendelesszam" type="string" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>
    <element name="xmlszamladbkdel">
      <complexType>
     <sequence>
        <element name="beallitasok" type="tns:beallitasokTipus" maxOccurs="1" minOccurs="1"></element>
        <element name="fejlec" type="tns:fejlecTipus" maxOccurs="1" minOccurs="1"></element>
     </sequence>
      </complexType>
    </element>
</schema>

Expected results of deleting pro forma invoice

Deleting a pro forma invoice results in an XML response. In case there was a critical error, you will receive the error message as regular text/html. Expected XML response in case the deletion was succesful:

<?xml version="1.0" encoding="UTF-8"?>
<xmlszamladbkdelvalasz xmlns="http://www.szamlazz.hu/xmlszamladbkdelvalasz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.szamlazz.hu/xmlszamladbkdelvalasz http://www.szamlazz.hu/docs/xsds/szamladbkdel/xmlszamladbkdelvalasz.xsd ">
  <sikeres>true</sikeres>
</xmlszamladbkdelvalasz>

Expected XML response in case the deletion was unsuccesful:

<?xml version="1.0" encoding="UTF-8"?>
<xmlszamladbkdelvalasz xmlns="http://www.szamlazz.hu/xmlszamladbkdelvalasz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.szamlazz.hu/xmlszamladbkdelvalasz http://www.szamlazz.hu/docs/xsds/szamladbkdel/xmlszamladbkdelvalasz.xsd ">
  <sikeres>false</sikeres>
  <hibakod>335</hibakod>
  <hibauzenet><![CDATA[nincs ilyen díjbekérő a rendszerben, már törlésre került vagy nem is létezett]]></hibauzenet>
</xmlszamladbkdelvalasz>

XML response scheme

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/xmlszamladbkdelvalasz" xmlns:tns="http://www.szamlazz.hu/xmlszamladbkdelvalasz" elementFormDefault="qualified">
    <element name="xmlszamladbkdelvalasz">
        <complexType>
            <sequence>
                <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>
            </sequence>
        </complexType>
    </element>
</schema>

Generating a receipt

Post request data

multipart/form-data based post

<html>
  <head><meta content="text/html; CHARSET=UTF-8"></head>
  <body>
    <form action="https://www.szamlazz.hu/szamla/" method="post" enctype="multipart/form-data">
      <input type="file" name="action-szamla_agent_nyugta_create"><br>
      <input type="submit" name="generate" value="Create receipt">
    </form>
  </body>
</html>

You can also try out the same HTML code here:



Regular HTTP Post based method

Example XML

<?xml version="1.0" encoding="UTF-8"?>
<xmlnyugtacreate xmlns="http://www.szamlazz.hu/xmlnyugtacreate" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.szamlazz.hu/xmlnyugtacreate http://www.szamlazz.hu/docs/xsds/nyugta/xmlnyugtacreate.xsd">
  <beallitasok>                                                      <!-- REQ         -->
    <felhasznalo>Test123</felhasznalo>      <!-- REQ string  --> <!-- a felhasználó loginneve -->
    <jelszo>Test123</jelszo>                      <!-- REQ string  --> <!-- a felhasználó jelszva -->
    <szamlaagentkulcs>Please fill!</szamlaagentkulcs>
    <pdfLetoltes>false</pdfLetoltes>                       <!-- REQ boolean --> <!-- PDF formátum letöltése -->
  </beallitasok>
  <fejlec>                                                <!-- REQ         -->
    <hivasAzonosito></hivasAzonosito>     <!--     string  --> <!-- a létrehozás egyedi azonosítója, duplikáció elkerülése -->
    <elotag>NYGTA</elotag>                    <!-- REQ string  --> <!-- nyugtaszám előtag, kötelező ==> NYGTA-2017-111 -->
    <fizmod>készpénz</fizmod>               <!-- REQ string  --> <!-- fizetési mód. bármilyen szöveg lehet, a felületen használt értékek: átutalás, készpénz, bankkártya, csekk, utánvét, ajándékutalvány, barion, barter, csoportos beszedés, OTP Simple, kompenzáció, kupon, PayPal,PayU, SZÉP kártya, utalvány -->
    <penznem>Ft</penznem>                   <!-- REQ string  --> <!-- pénznem: Ft, HUF, EUR, USD stb. -->
    <devizabank>MNB</devizabank>         <!--     string  --> <!-- deviza (nem Ft/HUF) pénznem esetén az árfolyamot jegyző bank neve -->
    <devizaarf>0.0</devizaarf>                 <!--     string  --> <!-- devizaárfolyam -->
    <megjegyzes></megjegyzes>             <!--     string  --> <!-- általános szöveges megjegyzés, nyugtán megjelenik -->
    <pdfSablon></pdfSablon>                   <!--     string  --> <!-- egyedi PDF sablon esetén annak azonosítója -->
    <fokonyvVevo></fokonyvVevo>                      <!--     string  --> <!-- vevő főkönyvi azonosítója -->
  </fejlec>
  <tetelek>                                        <!-- REQ         -->
    <tetel>                                         <!-- REQ         --> <!-- legalább egy tételre szükség van a nyugta kiállításához -->
      <megnevezes>Kiscicás lábtörlő</megnevezes>         <!-- REQ string  --> <!-- nyugta megnevezése -->
      <azonosito></azonosito>                                        <!--     string  --> <!-- nyugta azonosítója -->
      <mennyiseg>2.0</mennyiseg>                               <!-- REQ double  --> <!-- tétel mennyisége -->
      <mennyisegiEgyseg>db</mennyisegiEgyseg>          <!-- REQ string  --> <!-- tétel mennyiségi egysége -->
      <nettoEgysegar>10000</nettoEgysegar>                <!-- REQ double  --> <!-- nettó egységár -->
      <netto>20000.0</netto>                                 <!-- REQ double  --> <!-- nettó érték (mennyiség * nettó egységár) -->
      <afakulcs>27</afakulcs>                                 <!-- REQ string  --> <!-- áfakulcs, értékek: 0, 5, 10, 27, AAM, TAM, EU, EUK, MAA, F.AFA, K.AFA, ÁKK -->
      <afa>5400.0</afa>                                                <!-- REQ double  --> <!-- áfa összérték -->
      <brutto>25400.0</brutto>                                      <!-- REQ double  --> <!-- bruttó összérték -->
      <fokonyv>                                                             <!--             --> <!-- főkönyvi információ -->
        <arbevetel>...</arbevetel>                                   <!--     string  --> <!-- árbevétel főkönyvi szám -->
        <afa>...</afa>                                                     <!--     string  --> <!-- áfa főkönyvi szám -->
      </fokonyv>
    </tetel>
    <tetel>
      <megnevezes>Kiskutyás lábtörlő</megnevezes>
      <mennyiseg>2.0</mennyiseg>
      <mennyisegiEgyseg>db</mennyisegiEgyseg>
      <nettoEgysegar>10000</nettoEgysegar>
      <netto>20000.0</netto>
      <afakulcs>ÁKK</afakulcs>
      <afa>5400.0</afa>
      <brutto>25400.0</brutto>
    </tetel>
  </tetelek>
  <!--
    A kifizetesek nem kötelező, de ha meg van adva,
    akkor az összegeknek meg kell egyezniük a számla végösszegével.
  -->
  <kifizetesek>                                                             <!--     string  --> <!-- fizetési mód részletezése -->
    <kifizetes>
      <fizetoeszkoz>utalvány</fizetoeszkoz>                    <!-- REQ string  --> <!-- fizetőeszköz megnevezése -->
      <osszeg>30000.0</osszeg>                                    <!-- REQ double  --> <!-- fizetőeszközzel kiegyenlített összeg -->
      <leiras>OTP SZÉP kártya</leiras>                            <!--     double  --> <!-- fizetőeszköz egyedi leírás -->
    </kifizetes>
    <kifizetes>
      <fizetoeszkoz>bankkártya</fizetoeszkoz>
      <osszeg>20800.0</osszeg>
    </kifizetes>
  </kifizetesek>
</xmlnyugtacreate>

XSD scheme compliance

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/xmlnyugtacreate" xmlns:tns="http://www.szamlazz.hu/xmlnyugtacreate" elementFormDefault="qualified">
    <complexType name="beallitasokTipus">
        <all>
            <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="pdfLetoltes" type="boolean" maxOccurs="1" minOccurs="1"></element>
        </all>
    </complexType>
    <complexType name="fejlecTipus">
        <all>
            <element name="hivasAzonosito" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="elotag" type="string" 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="devizaarf" type="double" maxOccurs="1" minOccurs="0"></element>
            <element name="devizabank" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="megjegyzes" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="pdfSablon" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="fokonyvVevo" 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="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="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>
            <element name="fokonyv" type="tns:tetelFokonyvTipus" maxOccurs="1" minOccurs="0"></element>
        </all>
    </complexType>
    <complexType name="tetelFokonyvTipus">
        <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="tetelekTipus">
        <sequence>
            <element name="tetel" type="tns:tetelTipus" maxOccurs="unbounded" minOccurs="1"></element>
        </sequence>
    </complexType>
    <!-- jóváírások -->
    <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>
    <element name="xmlnyugtacreate">
        <complexType>
            <all>
                <element name="beallitasok" type="tns:beallitasokTipus" maxOccurs="1" minOccurs="1"></element>
                <element name="fejlec" type="tns:fejlecTipus" 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>
            </all>
        </complexType>
    </element>
</schema>

Expected results of generating receipts

The response contains everything about the generated receipt, and it can also include the PDF as well.

You should use <hivasAzonosito/> in the posted XML to make the the call fault tolerant. If this field is in use then it needs to be unique, otherwise the API call will be unsuccessful. This ensures that if the same XML is posted multiple times then it won’t duplicate an existing receipt.

Every successful call contains the <sikeres>true</sikeres> field in the response. In case the receipt generation failed and the result field is false: <sikeres>false</sikeres>, two additional fields will be included in the response, <hibakod/> for the error code and <hibauzenet/> for the error message itself.

Apart from the general error messages described in the previous chapters, you may also receive one of the followings:

Error code Description
336 “This prefix is already used to create invoices, and cannot be used to generate receipts.”
You need to use a prefix that is not already in use to create invoices. Please keep in mind that these prefixes that are used to create receipts are not visible on the frontend, which means that these prefixes used by Számla Agent will remain hidden.
337 Prefix is not in the expected format: it can only contain capital letters and numbers
338 The caller ID (unique field) you just used already exists on the server.
339 Receipt number does not exist (receipt query, send or delete).
340 The paid amount of the receipt differs from the gross amount of the receipt.
When you try to create a foreign currency receipt, and the currency field <penznem/> differs from either “Ft” or “HUF”, then you also need to supply the exchange rate and the name of the bank providing the rates.

XML response example

<?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 http://www.szamlazz.hu/docs/xsds/nyugta/xmlnyugtavalasz.xsd">
  <sikeres>true</sikeres>                                               <!-- REQ boolean -->
  <hibakod></hibakod>                                                   <!--     string  --> <!-- hiba esetén a hibakód -->
  <hibauzenet></hibauzenet>                                          <!--     string  --> <!-- hiba esetén a hibaüzenet -->
  <nyugtaPdf>...</nyugtaPdf>                                         <!--     string  --> <!-- nyugta PDF base64 enkódolással -->
  <nyugta>                                                               <!-- REQ         -->
    <alap>                                                                 <!-- REQ         -->
      <id>123456</id>                                               <!-- REQ id      -->
      <hivasAzonosito></hivasAzonosito>                    <!--     string  -->
      <nyugtaszam>NYGT-2017-123</nyugtaszam>     <!-- REQ string  -->
      <tipus>NY</tipus>                                             <!-- REQ string  --> <!-- Nyugta típusa: NY esetén "Nyugta", SN esetén "Nyugta sztornó" -->
      <stornozott>false</stornozott>                           <!-- REQ boolean --> <!-- true ha a nyugta stornózott, false egyébként (NY típus esetén érdekes) -->
      <stornozottNyugtaszam>NYGT-2017-100</stornozottNyugtaszam>         <!--     string  --> <!-- Ha a nyugta sztornózó, akkor a sztornózott számla száma (SN típus esetén jelzi melyik nyugta lett sztornózva) -->
      <kelt>2015-12-01</kelt>                                   <!-- REQ date    --> <!-- Nyugta kelte -->
      <fizmod>készpénz</fizmod>                               <!-- REQ string  -->
      <penznem>EUR</penznem>                               <!-- REQ string  --> <!-- üres, Ft, HUF, EUR, CHF, USD, ... -->
      <devizabank></devizabank>                               <!--     string  -->
      <devizaarf>210</devizaarf>                               <!--     double  -->
      <megjegyzes></megjegyzes>                             <!--     string  -->
      <fokonyvVevo></fokonyvVevo>                          <!--     string  --> <!-- könyvelési információ -->
      <teszt>false</teszt>                         <!-- REQ boolean --> <!-- Teszt vagy valós céggel lett létrehozva a nyugta -->
    </alap>
    <tetelek>
      <tetel>
        <azonosito></azonosito>                                 <!--     string  --> <!-- tétel azonosítója -->
        <megnevezes>Kiscicás lábtörlő</megnevezes>  <!-- REQ string  --> <!-- tétel megnevezése -->
        <mennyiseg>2.0</mennyiseg>                         <!-- REQ double  --> <!-- tétel mennyisége -->
        <mennyisegiEgyseg>db</mennyisegiEgyseg>    <!-- REQ string  --> <!-- tétel mennyiségi egysége -->
        <nettoEgysegar>10000</nettoEgysegar>         <!-- REQ double  --> <!-- tétel nettó egységár -->
        <netto>20000.0</netto>                             <!-- REQ double  --> <!-- tétel nettó érték (egységár * mennyiség) -->
        <afakulcs>27</afakulcs>                                 <!-- REQ double  --> <!-- áfakulcs -->
        <afa>5400.0</afa>                                         <!-- REQ double  --> <!-- áfa értéke -->
        <brutto>25400.0</brutto>                              <!-- REQ double  --> <!-- bruttó érték -->
        <fokonyv>                                                      <!--             --> <!-- tétel főkönyvi információk -->
          <arbevetel></arbevetel  >                            <!--     string  --> <!-- árbevétel főkönyvi száma -->
          <afa></afa>                                                <!--     string  --> <!-- áfa főkönyvi száma -->
        </fokony>
      </tetel>
      <tetel>
        <megnevezes>Kiskutyás lábtörlő</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>utalvány</fizetoeszkoz>
        <osszeg>1000.0</osszeg>
        <leiras>OTP SZÉP kártya</leiras>
      </kifizetes>
      <kifizetes>
        <fizetoeszkoz>bankkártya</fizetoeszkoz>
        <osszeg>3000.0</osszeg>
      </kifizetes>
    </kifizetesek>
    <osszegek>
      <afakulcsossz>                                                     <!-- REQ int     -->
        <afatipus>ÁKK</afatipus>                                  <!--     string  --> <!--  ÁKK: áfakörön kívüli, K.AFA: különbözeti áfa, F.AFA: fordított áfa fizetés, MAA: Mentes az adó alól, EUK: EU-n kívül, EU: EU-n belül, AAM: Alanyi adómentes, TAM: Tárgyi adómentes -->
        <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>

XML response scheme

<?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>
        </restriction>
    </simpleType>
    <simpleType name="nyugtatipusTipus">
        <restriction base="string">
            <enumeration value="NY"></enumeration>          <!-- nyugta -->
            <enumeration value="SN"></enumeration>          <!-- nyugta sztornó -->
        </restriction>
    </simpleType>
    <!-- számla alapadatai -->
    <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>
        </all>
    </complexType>
    <!-- számla tételek -->
    <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="int">
                        <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="tetelFokonyvTipus">
        <all>
            <element name="arbevetelFokonyviSzam" type="string"                maxOccurs="1" minOccurs="0"></element>
            <element name="afaFokonyviSzam"          type="string"                maxOccurs="1" minOccurs="0"></element>
        </all>
    </complexType>
    <complexType name="tetelekTipus">
        <sequence>
            <element name="tetel"                 type="tns:tetelTipus"   maxOccurs="unbounded" minOccurs="1"></element>
        </sequence>
    </complexType>
    <!-- áfakulcsonkénti összesítés -->
    <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="int">
                        <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>
    <!-- számla teljes összesítés -->
    <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>
    <!-- számla összesítők (áfakulcsonként és 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>
    <!-- jóváírások -->
    <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>

Reversing a receipt (storno)

Post request data

multipart/form-data based post

<html>
  <head><meta content="text/html; CHARSET=UTF-8"></head>
  <body>
    <form action="https://www.szamlazz.hu/szamla/" method="post" enctype="multipart/form-data">
      <input type="file" name="action-szamla_agent_nyugta_storno"><br>
      <input type="submit" name="generate" value="Reverse receipt">
    </form>
  </body>
</html>

You can also try out the same HTML code here:



Regular HTTP Post based method

Example XML

<?xml version="1.0" encoding="UTF-8"?>
<xmlnyugtast xmlns="http://www.szamlazz.hu/xmlnyugtast" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.szamlazz.hu/xmlnyugtast http://www.szamlazz.hu/docs/xsds/nyugtast/xmlnyugtast.xsd">
  <beallitasok>
    <felhasznalo>Test123</felhasznalo>
    <jelszo>Test123</jelszo>
    <szamlaagentkulcs>Please fill!</szamlaagentkulcs>
    <pdfLetoltes>false</pdfLetoltes>                    <!-- PDF számla letöltése -->
  </beallitasok> 
  <fejlec>
    <nyugtaszam>NYGT-2020-1</nyugtaszam>    <!-- stornózandó számla száma -->
    <!-- Egyedi PDF sablon (nyugtakép) azonosítója -->
    <!--
    <pdfSablon></pdfSablon>
     -->
  </fejlec>
</xmlnyugtast>

XSD scheme compliance

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/xmlnyugtast" xmlns:tns="http://www.szamlazz.hu/xmlnyugtast" elementFormDefault="qualified">
    <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="pdfLetoltes" type="boolean" maxOccurs="1" minOccurs="1"></element>
        </sequence>
    </complexType>
    <complexType name="fejlecTipus">
        <sequence>
            <element name="nyugtaszam" type="string" maxOccurs="1" minOccurs="1"></element>
            <element name="pdfSablon" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="hivasAzonosito" type="string" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>
    <element name="xmlnyugtast">
        <complexType>
            <sequence>
                <element name="beallitasok" type="tns:beallitasokTipus" maxOccurs="1" minOccurs="1"></element>
                <element name="fejlec" type="tns:fejlecTipus" maxOccurs="1" minOccurs="1"></element>
            </sequence>
        </complexType>
    </element>
</schema>

Expected results of reversing a receipt

The expected result matches the response when generating new receipts.

Querying a receipt

Post request data

multipart/form-data based post

<html>
  <head><meta content="text/html; CHARSET=UTF-8"></head>
  <body>
    <form action="https://www.szamlazz.hu/szamla/" method="post" enctype="multipart/form-data">
      <input type="file" name="action-szamla_agent_nyugta_get"><br>
      <input type="submit" name="generate" value="Query receipt">
    </form>
  </body>
</html>

You can also try out the same HTML code here:



Regular HTTP Post based method

Example XML

<?xml version="1.0" encoding="UTF-8"?>
<xmlnyugtaget xmlns="http://www.szamlazz.hu/xmlnyugtaget" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.szamlazz.hu/xmlnyugtaget http://www.szamlazz.hu/docs/xsds/nyugtaget/xmlnyugtaget.xsd">
  <beallitasok>
    <felhasznalo>Test123</felhasznalo>            <!-- REQ string  --> <!-- felhasználó loginneve -->
    <jelszo>Test123</jelszo>                            <!-- REQ string  --> <!-- felhasználó jelszava -->
    <szamlaagentkulcs>Please fill!</szamlaagentkulcs>
    <pdfLetoltes>false</pdfLetoltes>                             <!-- REQ string  --> <!-- PDF formátum letöltése -->
  </beallitasok>
  <fejlec>
    <nyugtaszam>NYGT-2020-1</nyugtaszam>          <!-- REQ string  --> <!-- a letölteni kívánt számla azonosítója -->
    <!-- Egyedi PDF sablon (nyugtakép) azonosítója -->
    <!--
    <pdfSablon></pdfSablon>
     -->
  </fejlec>
</xmlnyugtaget>

XSD scheme compliance

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/xmlnyugtaget" xmlns:tns="http://www.szamlazz.hu/xmlnyugtaget" elementFormDefault="qualified">
    <complexType name="beallitasokTipus">
        <all>
            <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="pdfLetoltes" type="boolean" maxOccurs="1" minOccurs="1"></element>
        </all>
    </complexType>
    <complexType name="fejlecTipus">
        <all>
            <element name="nyugtaszam" type="string" maxOccurs="1" minOccurs="1"></element>
            <element name="pdfSablon" type="string" maxOccurs="1" minOccurs="0"></element>
        </all>
    </complexType>
    <element name="xmlnyugtaget">
        <complexType>
            <all>
                <element name="beallitasok" type="tns:beallitasokTipus" maxOccurs="1" minOccurs="1"></element>
                <element name="fejlec" type="tns:fejlecTipus" maxOccurs="1" minOccurs="1"></element>
            </all>
        </complexType>
    </element>
</schema>

Expected results of querying a receipt

The expected result matches the response when generating new receipts.

Sending a receipt

Post request data

multipart/form-data based post

<html>
  <head><meta content="text/html; CHARSET=UTF-8"></head>
  <body>
    <form action="https://www.szamlazz.hu/szamla/" method="post" enctype="multipart/form-data">
      <input type="file" name="action-szamla_agent_nyugta_send"><br>
      <input type="submit" name="generate" value="Send receipt">
    </form>
  </body>
</html>

You can also try out the same HTML code here:



Regular HTTP Post based method

Example XML

<?xml version="1.0" encoding="UTF-8"?>
<xmlnyugtasend xmlns="http://www.szamlazz.hu/xmlnyugtasend" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.szamlazz.hu/xmlnyugtasend http://www.szamlazz.hu/docs/xsds/nyugtasend/xmlnyugtasend.xsd">
  <beallitasok>                                                            <!-- REQ string -->
    <felhasznalo>Test123</felhasznalo>            <!--REQ string --> <!-- felhasználó belépési neve -->
    <jelszo>Test123</jelszo>                            <!-- REQ string --> <!-- felhasználó jelszava -->
    <szamlaagentkulcs>Please fill!</szamlaagentkulcs>
  </beallitasok>
  <fejlec>
    <!-- csak már elkészített számlához lehet e-mail értesítőt küldeni -->
    <nyugtaszam>NYGT-2020-1</nyugtaszam>             <!-- REQ string --> <!-- nyugtaszám -->
  </fejlec>
  <!-- e-mail tartalma -->
  <emailKuldes>
    <!-- e-mail adatai, ha nincs megadva akkor a korábbi e-mail lesz kiküldve -->
    <email>vevo@example.com</email>                       <!--     string --> <!-- vevő e-mail címe (ide megy ki a levél) -->
    <emailReplyto>elado@example.com</emailReplyto> <!--     string --> <!-- reply-to cím, erre a címre válaszol a vevő -->
    <emailTargy>Email tárgya</emailTargy>                 <!--     string --> <!-- e-mail tárgya -->
    <emailSzoveg>                                                       <!--     string --> <!-- e-mail szövege -->
Ez az e-mail szövege.
Aláírás
    </emailSzoveg>
  </emailKuldes>
</xmlnyugtasend>

XSD scheme compliance

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/xmlnyugtasend" xmlns:tns="http://www.szamlazz.hu/xmlnyugtasend" elementFormDefault="qualified">
    <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>
        </sequence>
    </complexType>
    <complexType name="fejlecTipus">
        <sequence>
            <element name="nyugtaszam" type="string" maxOccurs="1" minOccurs="1"></element>
        </sequence>
    </complexType>
    <complexType name="emailKuldes">
        <sequence>
            <element name="email" 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>
        </sequence>
    </complexType>
    <element name="xmlnyugtasend">
        <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="emailKuldes" type="tns:emailKuldes" maxOccurs="1" minOccurs="0"></element>
            </sequence>
        </complexType>
    </element>
</schema>

Expected results of sending a receipt

Whether sending the receipt was successful or not depends on received response:

<sikeres>true</sikeres> or <sikeres>false</sikeres>. If the sending was unsuccessful, you will receive an error code and one of the following error messages.

Example response: success

<?xml version="1.0" encoding="UTF-8"?>
<xmlnyugtasendvalasz xmlns="http://www.szamlazz.hu/xmlnyugtasendvalasz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.szamlazz.hu/xmlnyugtasendvalasz http://www.szamlazz.hu/docs/xsds/nyugta/xmlnyugtasendvalasz.xsd">
  <sikeres>true</sikeres>
  <hibakod></hibakod>
  <hibauzenet></hibauzenet>
</xmlnyugtasendvalasz>

Example response: failed

<?xml version="1.0" encoding="UTF-8"?>
<xmlnyugtasendvalasz xmlns="http://www.szamlazz.hu/xmlnyugtasendvalasz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.szamlazz.hu/xmlnyugtasendvalasz http://www.szamlazz.hu/docs/xsds/nyugta/xmlnyugtasendvalasz.xsd">
  <sikeres>false</sikeres
  <hibakod>7</hibakod>
  <hibauzenet>Hiányzó adat: emailtargy elem.</hibauzenet>
</xmlnyugtasendvalasz>

XML response scheme

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/xmlnyugtasendvalasz" xmlns:tns="http://www.szamlazz.hu/xmlnyugtasendvalasz" elementFormDefault="qualified">
    <element name="xmlnyugtasendvalasz">
        <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>
            </all>
        </complexType>
    </element>
</schema>

Querying taxpayers

The interface is for querying the validity of a VAT number. The data is from the Hungarian National Tax and Customs Administration’s Online Invoice Platform.

POST request data

multipart/form-data based post

<html> 
  <head><meta content="text/html; CHARSET=UTF-8"></head> 
  <body> 
    <form action="https://www.szamlazz.hu/szamla/" method="post" enctype="multipart/form-data"> 
      <input type="file" name="action-szamla_agent_taxpayer"><br> 
      <input type="submit" name="generate" value="Query taxpayer"> 
    </form> 
  </body> 
</html>

You can also try out the same HTML code here:



Regular HTTP Post based method

Example XML

<?xml version="1.0" encoding="UTF-8"?>
<xmltaxpayer xmlns="http://www.szamlazz.hu/xmltaxpayer" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.szamlazz.hu/xmltaxpayer http://www.szamlazz.hu/docs/xsds/agent/xmltaxpayer.xsd">
    <beallitasok>
        <felhasznalo>Test123</felhasznalo>
        <jelszo>Test123</jelszo>
        <szamlaagentkulcs>Please fill!</szamlaagentkulcs>
    </beallitasok>
    <torzsszam>12345678</torzsszam>
</xmltaxpayer>  

XSD scheme compliance

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/xmltaxpayer" xmlns:tns="http://www.szamlazz.hu/xmltaxpayer" elementFormDefault="qualified">
    <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>
        </sequence>
    </complexType>
    <simpleType name="torszszamTipus">
        <restriction base="string">
            <length value="8" />
            <pattern value="[0-9]{8}" />
        </restriction>
    </simpleType>
    <element name="xmltaxpayer">
        <complexType>
            <sequence>
                <element name="beallitasok" type="tns:beallitasokTipus"maxOccurs="1" minOccurs="1"></element>
                <element name="torzsszam" type="tns:torszszamTipus"maxOccurs="1" minOccurs="1"></element>
            </sequence>
        </complexType>
    </element>
</schema>

Expected results of querying a taxpayer

The response always matches the Hungarian National Tax and Customs Administration’s Online Invoice Platform’s QueryTaxPayerResponse type.

Example response: success

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<QueryTaxpayerResponse xmlns="http://schemas.nav.gov.hu/OSA/1.0/api" xmlns:ns2="http://schemas.nav.gov.hu/OSA/1.0/data">
    <header>
        <requestId>170_k8knfskxnjdn24p97errf7</requestId>
        <timestamp>2018-07-05T10:57:46.810Z</timestamp>
        <requestVersion>1.0</requestVersion>
    </header>
    <result>
        <funcCode>OK</funcCode>
    </result>
    <taxpayerValidity>true</taxpayerValidity>
    <taxpayerData>
        <taxpayerName>KBOSS.HU KERESKEDELMI ÉS SZOLGÁLTATÓ KORLÁTOLT FELELŐSSÉGŰ TÁRSASÁG</taxpayerName>
        <taxpayerAddress>
            <countryCode>HU</countryCode>
            <postalCode> 1031 </postalCode>
            <city>BUDAPEST</city>
            <streetName>ZÁHONY</streetName>
            <publicPlaceCategory>UTCA</publicPlaceCategory>
            <number>7.</number>
        </taxpayerAddress>
    </taxpayerData>
</QueryTaxpayerResponse>

or

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<QueryTaxpayerResponse xmlns="http://schemas.nav.gov.hu/OSA/1.0/api" xmlns:ns2="http://schemas.nav.gov.hu/OSA/1.0/data">
    <header>
        <requestId>170_9ugu5pcfyiuu8kdsimcfyi</requestId>
        <timestamp>2018-07-05T11:01:56.582Z</timestamp>
        <requestVersion>1.0</requestVersion>
    </header>
    <result>
        <funcCode>OK</funcCode>
    </result>
    <taxpayerValidity>false</taxpayerValidity>
</QueryTaxpayerResponse>

Example response: failed

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<QueryTaxpayerResponse xmlns="http://schemas.nav.gov.hu/OSA/1.0/api" xmlns:ns2="http://schemas.nav.gov.hu/OSA/1.0/data">
    <header>
        <requestId>170_eiq6ffnzhcyrcwc7w5qj84</requestId>
        <timestamp>2018-07-05T11:03:54.326Z</timestamp>
        <requestVersion>1.0</requestVersion>
    </header>
    <result>
        <funcCode>ERROR</funcCode>
        <errorCode>374</errorCode>
        <message>A NAV rendszere szerint: Helytelen kérés!</message>
    </result>
</QueryTaxpayerResponse>

XML response scheme

The response scheme is in the Hungarian National Tax and Customs Administration’s Online Invoice Platform’s documentation.

Self-billing

Introduction

Számlázz.hu supports self billing between companies registered in the system. This means that one of the users belonging to the customer can get access to the supplier's company with accounting privileges.

In case you're looking for the Hungarian, zip based documentation regarding self-billing, you can find it here.

Things to consider

Before setting this up you have to enter into an agreement with your supplier. You'll both need to sign a self-billing agreement. This is outside the scope of Számlázz.hu. For more information please contact your accountant or your lawyer.

There is a connection between the customer's and the supplier's invoicing account. Establishing this relationship between these accounts is very important. The way these accounts are connected depends on whether the supplier is already a member of Számlázz.hu or not.

Creating a suppliers' account via Számla Agent

It's possible to create the suppliers' account by the customer via Számla Agent. In order to do this you need to post a specifically crafted API call towards Számla Agent.

You need to provide the details of the supplier during the call. It's important to provide the actual data - especially the e-mail address, that will be important later.

As a result of this call apart from the suppliers' account a special user account will be created as well that has access to the suppliers. Because of this you need to provide a new username, password and other details for this account.

It's important to note that the suppliers' account is NOT ready to issue invoices just as yet. In order to do this, the owner of the account (aka supplier) has to occupy their account, and enable issuing invoices for the customer.

When an account is created Számlázz.hu sends a notification email automatically to the official email address of the supplier provided in the API call, for the owner/CEO of the company. This email contains instructions on how to occupy their account, and as a result enables issuing invoices for their customer. When this is done the customer receives an email as well stating that their account is ready for self-billing.

In case the customer wants to re-send this email to the supplier, then the customer needs to login to the freshly created account (that is not usable yet) with the given user they will use to access the supplier's account in the future. The login attempt will be unsuccessful, since the supplier didn't grant access to their account yet for the customer, but this triggers an event which causes the Számlázz.hu system to re-send the notification email.

Joining an existing supplier's account as a customer

It's also possible that the supplier already has a Számlázz.hu account, and would like to provide access to their customer for self-billing. Giving access can be provided through the control panel:

  1. Customer creates a login ID to use to access suppliers' account.
  2. Login to their own account using this user ID (customer's account).
  3. Send a join request to the account of the supplier's account. You can do this by clicking the grey Csatlakozni szeretnék egy céghez button. Don't forget to check the 'Megbízott számlakibocsátás' checkbox before sending the request.

The customer receives an email stating that the join request has been accepted. When sending the request, you need to use the same login name that you'll use for issuing invoices. If you're planning to use Számla Agent instead of issuing invoices manually, then you need to create a new user ID before sending the join request (details here: https://www.szamlazz.hu/blog/2013/06/hozzaferesek-es-jogosultsagok/). Before accepting the join request this user ID will be 'detached' from the customer's account - this makes it possible for Számla Agent to work.

Sending a join request to the supplier via Számla Agent

It's now possible to send a join request to a supplier via Számla Agent. There are different scenarios depending on whether the supplier already has an account or not.

If the supplier doesn't have an account yet, then you can create one as described here.

Basically, this means that sending the same XML to create the supplier's account triggers a join request. The supplier receives an email notification about this and can approve the join request on the control panel.

E-invoicing and pricing

As a customer you'll be joining the supplier's account with the same subscription as the supplier's. This means that the supplier can stay in the #free subscription, in case only the supplier issues e-invoices. It's not possible to issue e-invoices in the #free subscription, unless the customer has a paid subscription. In this case the customer can self-bill from the supplier's account even if the supplier has a #free subscription. Let's consider the following:

  1. Customer has a #profi subscription.
  2. Customer can issue e-invoices in their own account.
  3. Supplier has a #free subscription.
  4. Supplier cannot issue e-invoices in their own account.
  5. Customer can issue e-invoices for self-billing in the supplier's account because of their own #profi subscription.

It's important to note that the customer has to pay for the invoices even though they were issued from the supplier's account. It's also possible for the supplier to subscribe to a paid subscription and issue e-invoices on their own. E-invoices issued by the supplier (not the customer via the supplier's account) are paid by the supplier as well, these are billed separately from those that were issued by the customer (which the customer has to pay).

Disconnecting from the customer

The customer can disconnect from the supplier by initiating disconnection from the control panel.

Visibility of invoices

The supplier (after logging into their own account) can see all invoices (regardless the invoices were issued by themselves or by the customer). When the customer logs into the supplier's account, only those invoices are visible for them that were issued by them (not by the supplier). This way the supplier can hide those invoices that were issued by themselves and not by the customer.

Hints

Self-billing works like the following:

When you establish a connection like this you need to consider the following:

  1. In order to establish the connection using Számla Agent you need to create a separate user for each supplier's account.

  2. If the supplier already has an account, then you simply need to request access for self-billing purposes.

  3. The customer can see those users who can access their account (also those suppliers whom they are connected with for self-billing purposes). To avoid confusion, you should give the suppliers names that are easy to recognise (e.g. Example Ltd self-billing).

  4. It's also possible for the users used to connect to suppliers' accounts to have the same password. This makes the process for self-billing easier.

  5. The user login names for the users used to connect to suppliers' accounts have to differ, but these can be any kind, that makes it easier to recognise.

  6. Suppliers like to use a different invoice book for self-billing. You need to discuss this with your supplier. If you create the suppliers' account then you need to define the given invoice prefix you are planning to use. This prefix should be 5 characters long and should have a meaningful name that hints it belongs to the supplier.

Create suppliers account

multipart/form-data based post

<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
<body>
<form action="https://www.szamlazz.hu/szamla/" method="post" enctype="multipart/form-data">
  <input type="file" name="action-agent_ceg_mb"><br><br>
  <input type="submit" name="generate" value="Create supplier account">
</form>
</body>

You can also try out the same HTML code here:



Example XML

<?xml version="1.0" encoding="UTF-8"?>
<XmlCegMb xmlns="http://www.szamlazz.hu/xmlcegmb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.szamlazz.hu/xmlcegmb http://www.szamlazz.hu/docs/xsds/agentmb/xmlcegmb.xsd">

  <login>
      <!-- This is the user created by the supplier. This user can only access 1 company, 
           otherwise the login attempt will fail because the system won't be able to decide
           which company is that the user wants to access.
           An unsuccessful login will result in error code 3.
      -->
      <loginname>felh</loginname>
      <password>passwd</password>
  </login>

  <cegMb>
      <!--
          Details of the supplier company 
      -->

      <!-- Name of the supplier company, if it has a short name you should provide that -->
      <cegcompanyname>Cég neve Kft.</cegcompanyname>

      <!-- Tax number of the supplier company. If there's a company already registered
           using the same tax number then you'll receive error code 251. In this case you
           need to ask the supplier company to send a join request.
       -->
      <cegtaxnumber>12345678-1-12</cegtaxnumber>

      <!-- Invoice prefix that resembles the supplier's name in some way, 
           5 characters tops. This will be the prefix on the generated invoices: MBSZ-2019-1
      -->
      <cegszamlaszamelotag>MBSZ</cegszamlaszamelotag>

      <!-- Company address of the supplier -->
      <cegirsz>1117</cegirsz>
      <cegcity>Budapest</cegcity>
      <cegaddr>Budafoki út 17.</cegaddr>

      <!-- Post address of the supplier, not required -->
      <cegpostirsz>1121</cegpostirsz>
      <cegpostcity>Budapest</cegpostcity>
      <cegpostaddr>Pf. 17.</cegpostaddr>

      <!-- Bank account details of the supplier -->
      <cegbank>AXA</cegbank>
      <cegbankaccount>12345678-12345678</cegbankaccount>

      <!-- E-mail address of the supplier. It's important that this address should
           be a working one, as important e-mails will be delivered here.
      -->
      <cegemail>cegemailcim@example.org</cegemail>

      <!-- E-mail address of the supplier, this will be the replyto address in sent invoices. -->
      <cegemailreplyto>cegemailcim@example.org</cegemailreplyto>

      <!-- The next 4 fields are very important. Depending on whether you are a KATA 
           private entrepeneur or a regular company, your invoices will be valid only if
           Számlázz.hu displays the necessary texts as "Kisadózó." and/or "Pénzforgalmi elszámolás.".
           In case the registered company doesn't belong to any of these groups, filling out
           these fields are not mandatory.
      -->
      <cegpenzforgdattol>2014-01-01</cegpenzforgdattol>
      <cegpenzforgdatig>2014-12-31</cegpenzforgdatig>
      <cegkatadattol>2014-01-01</cegkatadattol>
      <cegkatadatig>2014-12-31</cegkatadatig>

  </cegMb>

  <usrMb>
      <!-- You also have to provide a username to be used for the supplier's company.
           This is the user that you will use to issue invoices for self-billing.

           The supplier won't use this user, but they'll see it in their account.

      -->
      <usremail>agentuser@example.org</usremail>
      <usrpassword>As6dezh7*K#</usrpassword>
      <usrvezeteknev>Teszt</usrvezeteknev>
      <usrkeresztnev>Elek</usrkeresztnev>
  </usrMb>

</XmlCegMb>

XSD scheme compliance

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/xmlcegmb" xmlns:tns="http://www.szamlazz.hu/xmlcegmb" elementFormDefault="qualified">

  <!-- Existing user's details, or details of the user to be created -->
  <complexType name="usrMbTipus">
    <sequence>
      <element name="usremail" type="string" maxOccurs="1" minOccurs="1"></element>
      <element name="usrpassword" type="string" maxOccurs="1" minOccurs="1"></element>
      <element name="usrvezeteknev" type="string" maxOccurs="1" minOccurs="0"></element>
      <element name="usrkeresztnev" type="string" maxOccurs="1" minOccurs="1"></element>
    </sequence>
  </complexType>

  <!-- login details -->
  <complexType name="loginMbTipus">
    <sequence>
      <element name="loginname" type="string" maxOccurs="1" minOccurs="1"></element>
      <element name="password" type="string" maxOccurs="1" minOccurs="1"></element>
    </sequence>
  </complexType>

  <!-- company details -->
  <complexType name="cegMbTipus">
    <sequence>
        <element name="cegcompanyname" type="string" maxOccurs="1" minOccurs="1"></element>
        <element name="cegtaxnumber" type="string" maxOccurs="1" minOccurs="1"></element>
        <element name="cegszamlaszamelotag" maxOccurs="1" minOccurs="1">
          <simpleType>
            <restriction base="string"><maxLength value = "5"/></restriction>
          </simpleType>
        </element>
        <element name="cegirsz" type="string" maxOccurs="1" minOccurs="1"></element>
        <element name="cegcity" type="string" maxOccurs="1" minOccurs="1"></element>
        <element name="cegaddr" type="string" maxOccurs="1" minOccurs="1"></element>
        <element name="cegpostirsz" type="string" maxOccurs="1" minOccurs="0"></element>
        <element name="cegpostcity" type="string" maxOccurs="1" minOccurs="0"></element>
        <element name="cegpostaddr" type="string" maxOccurs="1" minOccurs="0"></element>
        <element name="cegbank" type="string" maxOccurs="1" minOccurs="1"></element>
        <element name="cegbankaccount" type="string" maxOccurs="1" minOccurs="1"></element>
        <element name="cegemail" type="string" maxOccurs="1" minOccurs="1"></element>
        <element name="cegemailreplyto" type="string" maxOccurs="1" minOccurs="1"></element>
        <element name="cegpenzforgdattol" type="date" maxOccurs="1" minOccurs="0"></element>
        <element name="cegpenzforgdatig" type="date" maxOccurs="1" minOccurs="0"></element>
        <element name="cegkatadattol" type="date" maxOccurs="1" minOccurs="0"></element>
        <element name="cegkatadatig" type="date" maxOccurs="1" minOccurs="0"></element>
    </sequence>
  </complexType>
  <element name="XmlCegMb">
    <complexType>
      <sequence>
        <element name="login" type="tns:loginMbTipus" maxOccurs="1" minOccurs="1"></element>
        <element name="cegMb" type="tns:cegMbTipus" maxOccurs="1" minOccurs="1"></element>
        <element name="usrMb" type="tns:usrMbTipus" maxOccurs="1" minOccurs="1"></element>
      </sequence>
    </complexType>
  </element>

PHP API

Basics

The PHP API docs are not translated to English (yet). In case you're interested you can download it from here.

(Current API version: 2.8.1, updated on 20.11.2019.)