NAV

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 documentation! (version: 3.72, updated on 25.07.2019.)

Just in case you are looking for our old, zip based documentation, you can find it here. (last updated on 03.13.2019.)

In the future, we are going to focus on the expansion and updating of the documentation in English, therefore the pdf in Hungarian may become outdated. Should you have any questions regarding the documentation, please do not hesitate to contact us via the Számlázz.hu - Kapcsolat (Contact) page.

Basics

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

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 in the following picture:

  1. The customer wants to purchase something in a 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, generates the invoice and sends back the PDF invoice according to configuration, with a message like xmlagentresponse=DONE;invoicenumber - or, in the case of an error, with a description of the error.
  4. If necessary, Számlázz.hu can send e-mails with PDF invoices as well.

Agent User

A company (= a Számlázz.hu account belonging to an enterprise) 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 for authentication 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 scroll down to the bottom of the dashboard. There's a section called Számla Agent kulcsok (= Számla Agent Keys), and you can generate a key by clicking the key button on the right side. 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 you can also supply the key in the and tags if you are using a webshop where you cannot use this tag (both tags should contain the same key).

Error handling

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

Számla Agent cannot be held responsible in the 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 is 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 need 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, and an 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: there is a single PDF file in the response body, and a few other information in the response header that contains the cookie as well as the JSESSIONID in the session cookie. The received pdf and session cookie must be saved for later use.

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

  4. Second answer: there is one PDF in the response body, and the same session cookie in the header. No action needed in terms of the cookie. After that only the 3rd and 4th steps are 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. The next time there is a call towards Számla Agent, a new cookie will be generated. In light of these the following working mechanism is required in the calling of the code.

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 you receive the answer, you need to save the cookie file and the PDF invoice.

Important notice:

At the 3rd step, if no session cookie is sent back to the Számla Agent, it perceives that there is no cookie yet so it generates a new session. This could cause an event, where the new session and the generated pdf will be handled in different places, resulting a missing pdf error message.

How can I test Számla Agent?

During the testing phase, you have to make sure not to generate a huge amount of invoices in the testing environment (maximum number: 100 invoices per hour). The test account can be turned on and off by the user.

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. No action is required from the webshop, 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.
53 Hiányzó XML fájl. Missing XML file. The XML was probably not sent as a file, but as an input content of an HTML.
54 E-számla készítés nincs engedélyezve. The issuing of e-invoices is not permitted. Your subscription package probably does not contain it, or there is no own certificate uploaded. In this case, you need 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 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 the Számlázz.hu system via a browser. For some reason you cannot use Számla Agent. Possible reasons include the following:
- the subscription has expired
- there is a pending invoice towards Számlázz.hu
- there is a delay in payment
In these cases please log in to 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 has 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 provided invoice prefix cannot be used. For Számla Agent, you can only use prefixes that have been previously registered in the Számlázz.hu.”
You need to login to the website and add the desired prefixes before you can 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 on a 256 bit encrypted SSL connection.

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

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

What is required 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 multiple e-mail addresses in the e-mail field of the XML file, they must be separated by “,” (comma).

In what case does Szamlazz.hu actually send notifications by email?

In case of a test account, the system will send an invoice note. The recipient is not the e-mail address provided in the XML, but 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, the system will send the invoice to this address. Obviously if you have not set any e-mail address, the system will not 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 right after the e-mail address: <sendEmail>false</sendEmail>

How can I send an XML in the given requests?

You need to send the requests to the same URL, that is, https://www.szamlazz.hu/szamla/every time. Számla Agent decides which function to perform using the name of the field containing 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

The Számlázz.hu user can be used for the Agent by multiple websites. If you would like to separate invoices by webshop please configure a separate invoice "prefix” for each of them.

Generating invoices

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 is 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 with 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 -->
        <szamlaLetoltes>true</szamlaLetoltes>
        <!-- „true” in case you would like to get the 
                                             PDF invoice in the response -->
        <valaszVerzio>1</valaszVerzio>
        <!-- 1: gives a simple text or PDF as answer. 
                                             2: xml answer, in case you asked for the PDF as well,
                                                it will be included in the XML with base64 coding.
                                         -->
        <aggregator></aggregator>
        <!-- omit this tag -->
        <szamlaKulsoAzon></szamlaKulsoAzon> <!--     string  --> <!-- The invoice can be identified with this key by the third party system (system which uses the Számla Agent): later the invoice can be queried with this key -->
    </beallitasok>
    <fejlec>
        <!-- header -->
        <keltDatum>2020-01-20</keltDatum>
        <!-- creating date, in this exact format -->
        <teljesitesDatum>2020-01-20</teljesitesDatum>
        <!-- payment date -->
        <fizetesiHataridoDatum>2020-01-20</fizetesiHataridoDatum>
        <!-- due date -->
        <fizmod>Átutalás</fizmod>
        <!-- payment type: it can be seen in case you create the invoice 
                                 from browser -->
        <penznem>HUF</penznem>
        <!-- currency: it can be seen in case you create the invoice 
                                 from browser -->
        <szamlaNyelve>hu</szamlaNyelve>
        <!-- language of invoice, can  be: de, en, it, hu, fr, ro, sk, hr
                                   -->
        <megjegyzes>Invoce comment</megjegyzes>
        <!-- comment of the invoice -->
        <arfolyamBank>MNB</arfolyamBank>
        <!-- name of bank: in case of invoice about other currency 
                                          than HUF you have to display which bank’s exchange rates 
                                          did we use to calculate VAT -->
        <arfolyam>0.0</arfolyam>
        <!-- exchange rate: in case of invoice about other currency 
                                          than HUF you have to display which bank’s exchange rates 
                                          did we use to calculate VAT -->
        <rendelesSzam></rendelesSzam>
        <!-- order number -->
        <dijbekeroSzamlaszam></dijbekeroSzamlaszam>
        <!-- reference to pro forma invoice number -->
        <elolegszamla>false</elolegszamla>
        <!-- deposit invoice -->
        <vegszamla>false</vegszamla>
        <!-- invoice (after a deposit invoice) -->
        <helyesbitoszamla>false</helyesbitoszamla>
        <!-- correction invoice -->
        <helyesbitettSzamlaszam></helyesbitettSzamlaszam>
        <!-- the number of the corrected invoice -->
        <dijbekero>false</dijbekero>
        <!-- proform invoice -->
        <szamlaszamElotag></szamlaszamElotag>
        <!-- One of the prefixes from the invoice pad menu  -->
    </fejlec>
    <elado>
        <!-- Details of the merchant-->
        <bank>BB</bank>
        <!-- bank name -->
        <bankszamlaszam>11111111-22222222-33333333</bankszamlaszam>
        <!-- bank account -->
        <emailReplyto></emailReplyto>
        <!-- reply e-mail address -->
        <emailTargy>Invoice notification</emailTargy>
        <!-- e-mail subject -->
        <emailSzoveg>mail text</emailSzoveg>
        <!-- text of e-mail -->
    </elado>
    <vevo>
        <!--Buyer details -->
        <nev>Kovacs Bt.</nev>
        <!-- name -->
        <irsz>2030</irsz>
        <!-- ZIP code -->
        <telepules>Érd</telepules>
        <!-- city -->
        <cim>Tárnoki út 23.</cim>
        <!-- address -->
        <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. mailing name</postazasiNev>
        <!--delivery name/postal name -->
        <postazasiIrsz>2040</postazasiIrsz>
        <!--delivery ZIP code/postal ZIP code -->
        <postazasiTelepules>Budaörs</postazasiTelepules>
        <!--delivery city/postal city -->
        <postazasiCim>Szivárvány utca 8.</postazasiCim>
        <!--delivery address/postal address -->
        <azonosito>1234</azonosito>
        <!-- identification -->
        <telefonszam>Tel:+3630-555-55-55, Fax:+3623-555-555</telefonszam>
        <!-- phone number -->
        <megjegyzes>Call extension 214 from the reception</megjegyzes>
        <!-- comment -->
    </vevo>
    <fuvarlevel>
        <!-- waybill/confinement note, you do not need this: omit the entire tag -->
        <uticel></uticel>
        <futarSzolgalat></futarSzolgalat>
    </fuvarlevel>
    <tetelek>
        <!-- items on invoice -->
        <tetel>
            <!-- item 1 -->
            <megnevezes>Elado izé</megnevezes>
            <!-- name -->
            <mennyiseg>1.0</mennyiseg>
            <!-- quantity -->
            <mennyisegiEgyseg>db</mennyisegiEgyseg>
            <!-- unit of quantity -->
            <nettoEgysegar>10000</nettoEgysegar>
            <!-- unit price -->
            <afakulcs>27</afakulcs>
            <!-- VAT rate -->
            <nettoErtek>10000.0</nettoErtek>
            <!-- net price -->
            <afaErtek>2700.0</afaErtek>
            <!-- VAT amount -->
            <bruttoErtek>12700.0</bruttoErtek>
            <!-- gross amount -->
            <megjegyzes>lorem ipsum</megjegyzes>
            <!-- comment for item -->
        </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 example below, all fields are mandatory, but some of them can be left blank, as they are not used in Számla Agent, but in other Számlázz.hu interfaces. Számlázz.hu does not make any calculations regarding the specific amount, so it is mandatory to provide all amounts that must be shown on the invoice.

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

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

If it finds an error, it will sends a notification (possible error codes: 57, 259, 260, 261, 262, 263, 264) and does not generate the invoice.

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

VAT rates

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

Value in XML field Description
TEHK Outside the scope of Hungarian VAT
TAHK Not subject to VAT
TAM supply exempt from VAT / exempt supply
AAM person exempt from VAT / exempt person
EUT Within EU (former 'EU')
EUKT Outside EU (former 'EUK')
MAA exempt from tax
F.AFA reverse VAT
K.AFA differential VAT
HO Harmadik országban teljesített ügylet (TEHK) - Translation WIP
EUE Másik tagállamban teljesített, nem fordítottan adózó ügylet - Translation WIP
EUFADE Másik tagállamban teljesített, nem az Áfa tv. 37. §-a alá tartozó, fordítottan adózó ügylet - Translation WIP
EUFAD37 -Áfa tv. 37. §-a alapján másik tagállamban teljesített, fordítottan adózó ügylet - Translation WIP
ATK ÁFA tárgyi hatályán kívüli - Translation WIP
NAM adómentesség egyéb nemzetközi ügyletekhez - Translation WIP
EAM adómentes termékexport harmadik országba - Translation WIP
KBAUK Közösségen belüli termékértékesítés UK - Translation WIP
KBAET Közösségen belüli termékértékesítés ET - Translation WIP

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>            <!-- Possible values for the "type" field: 7:business is based outside of the European Union, 6:business is based in the Europen Union, 1: has a hungarian tax number, 0: we don't know, if the buyer has a tax number, -1: no tax number -->
            <element name="adoszam" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="csoportazonosito" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="adoszamEU" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="postazasiNev" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="postazasiOrszag" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="postazasiIrsz" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="postazasiTelepules" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="postazasiCim" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="vevoFokonyv" type="tns:vevoFokonyvTipus" maxOccurs="1" minOccurs="0"></element>                        
            <element name="azonosito" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="alairoNeve" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="telefonszam" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="megjegyzes" type="string" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>

    <complexType name="vevoFokonyvTipus">
        <sequence>
            <element name="konyvelesDatum" type="date" maxOccurs="1" minOccurs="0"></element>
            <element name="vevoAzonosito" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="vevoFokonyviSzam" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="folyamatosTelj" type="boolean" maxOccurs="1" minOccurs="0"></element>
            <element name="elszDatumTol" type="date" maxOccurs="1" minOccurs="0"></element>
            <element name="elszDatumIg" type="date" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>

    <complexType name="eladoTipus">
        <sequence>
            <element name="bank" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="bankszamlaszam" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="emailReplyto" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="emailTargy" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="emailSzoveg" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="alairoNeve" type="string" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>

    <complexType name="beallitasokTipus">
        <sequence>
            <element name="felhasznalo" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="jelszo" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="szamlaagentkulcs" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="eszamla" type="boolean" maxOccurs="1" minOccurs="1"></element>
            <element name="szamlaLetoltes" type="boolean" maxOccurs="1" minOccurs="1"></element>
            <element name="szamlaLetoltesPld" type="int" maxOccurs="1" minOccurs="0"></element>
            <element name="valaszVerzio" type="int" maxOccurs="1" minOccurs="0"></element>
            <element name="aggregator" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="guardian" type="boolean" maxOccurs="1" minOccurs="0"></element>
            <element name="cikkazoninvoice" type="boolean" maxOccurs="1" minOccurs="0"></element>
            <element name="szamlaKulsoAzon" type="string" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>

    <complexType name="tetelTipus">
        <sequence>
            <element name="megnevezes" type="string" maxOccurs="1" minOccurs="1"></element>
            <element name="azonosito" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="mennyiseg" type="double" maxOccurs="1" minOccurs="1"></element>
            <element name="mennyisegiEgyseg" type="string" maxOccurs="1" minOccurs="1"></element>
            <element name="nettoEgysegar" type="double" maxOccurs="1" minOccurs="1"></element>
            <element name="afakulcs" type="string" maxOccurs="1" minOccurs="1"></element>
            <element name="arresAfaAlap" type="double" maxOccurs="1" minOccurs="0"></element>                        
            <element name="nettoErtek" type="double" maxOccurs="1" minOccurs="1"></element>
            <element name="afaErtek" type="double" maxOccurs="1" minOccurs="1"></element>
            <element name="bruttoErtek" type="double" maxOccurs="1" minOccurs="1"></element>
            <element name="megjegyzes" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="tetelFokonyv" type="tns:tetelFokonyvTipus" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>

    <complexType name="tetelekTipus">
        <sequence>
            <element name="tetel" type="tns:tetelTipus" maxOccurs="unbounded" minOccurs="1"></element>
        </sequence>
    </complexType>

    <complexType name="tetelFokonyvTipus">
        <sequence>
            <element name="gazdasagiEsem" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="gazdasagiEsemAfa" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="arbevetelFokonyviSzam" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="afaFokonyviSzam" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="elszDatumTol" type="date" maxOccurs="1" minOccurs="0"></element>
            <element name="elszDatumIg" type="date" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>

    <complexType name="fejlecTipus">
        <sequence>
            <element name="keltDatum" type="date" maxOccurs="1" minOccurs="0"></element>
            <element name="teljesitesDatum" type="date" maxOccurs="1" minOccurs="1"></element>
            <element name="fizetesiHataridoDatum" type="date" maxOccurs="1" minOccurs="1"></element>
            <element name="fizmod" type="string" maxOccurs="1" minOccurs="1"></element>
            <element name="penznem" type="string" maxOccurs="1"    minOccurs="1"></element>
            <element name="szamlaNyelve" type="tns:szamlaNyelveTipus" maxOccurs="1" minOccurs="1"></element>
            <element name="megjegyzes" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="arfolyamBank" type="string" maxOccurs="1" minOccurs="0"></element>   
            <element name="arfolyam" type="double" maxOccurs="1" minOccurs="0"></element>            <!-- If arfolyamBank='MNB' AND ther is no exchange rate, then the current exchange rate of MNB  will be used durring receipt creation (automatic MNB exchange rate import) -->
            <element name="rendelesSzam" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="dijbekeroSzamlaszam" type="string" maxOccurs="1" minOccurs="0"></element> <!-- link to prepayment request -->
            <element name="elolegszamla" type="boolean" maxOccurs="1" minOccurs="0"></element>
            <element name="vegszamla" type="boolean" maxOccurs="1" minOccurs="0"></element>
            <element name="elolegSzamlaszam" type="string" maxOccurs="1" minOccurs="0"></element>    <!-- The invoice number of the down payment invoice can be defined here if the final bill of the down payment invoice can't be identified with the order number. If both invoice number and order number is present, order number takes precedent. -->  
            <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>
            <element name="eusAfa" type="boolean" maxOccurs="1" minOccurs="0"></element>            <!-- There is no hungarian VAT on the receipt. Data disclosure towards NTCAs Online Invoice System is not needed. -->
            <element name="szamlaSablon" type="string" maxOccurs="1" minOccurs="0"></element>       <!-- Codomain: 'SzlaMost' | 'SzlaAlap' | 'SzlaNoEnv' | 'Szla8cm' | 'SzlaTomb' | 'SzlaFuvarlevelesAlap'-->
            <element name="elonezetpdf" type="boolean" maxOccurs="1" minOccurs="0"></element>       <!-- warrant preview pdf (no warrant is created) --> 
        </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>
            <!-- 5 digit number provided by TOF -->
            <element name="azonosito" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="shipmentID" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="csomagszam" type="int" maxOccurs="1" minOccurs="0"></element>
            <element name="countryCode" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="zip" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="service" type="string" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>

    <complexType name="sprinterTipus">
        <sequence>
            <!-- 3-character abbreviation agreed with Sprinter -->
            <element name="azonosito" type="string" maxOccurs="1" minOccurs="0"></element>
            <!-- 10-character long "feladókód" provided by Sprinter -->
            <element name="feladokod" type="string" maxOccurs="1" minOccurs="0"></element>
            <!-- "Iránykód" from Sprinter is Sprinters own special parcel shipment code, eg. "106" -->
            <element name="iranykod" type="string" maxOccurs="1" minOccurs="0"></element>
            <!--    Number of packages, this shows how many consignment note will be attached to the receipt-->
            <element name="csomagszam" type="int" maxOccurs="1" minOccurs="0"></element>
            <!-- unique per receipt, 7-13 characters long identifyer -->
            <element name="vonalkodPostfix" type="string" maxOccurs="1" minOccurs="0"></element>
            <!-- usually this is the 1 work day note -->
            <element name="szallitasiIdo" type="string" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>

    <complexType name="pppTipus">
        <sequence>
            <!-- 3-character abbreviation agreed with PPP -->
            <element name="vonalkodPrefix" type="string" maxOccurs="1" minOccurs="0"></element>
            <!-- unique per receipt, MAX 7 characters long identifyer -->
            <element name="vonalkodPostfix" type="string" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>

    <complexType name="mplTipus">
        <sequence>
            <!-- MPL customer code -->
            <element name="vevokod" type="string" maxOccurs="1" minOccurs="1"></element>
            <!-- Bar code is generated based on thes string -->
            <element name="vonalkod" type="string" maxOccurs="1" minOccurs="1"></element>
            <!-- Weight of the package, can contain a decimal point, if necessary -->
            <element name="tomeg" type="string" maxOccurs="1" minOccurs="1"></element>
            <!-- Optional configuration for special services icons, if not defined no icon will be shown -->
            <element name="kulonszolgaltatasok" type="string" maxOccurs="1" minOccurs="0"></element>
            <!--    Vallue ("erteknyilvanitas") field on the consignment note -->
            <element name="erteknyilvanitas" type="double" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>

    <complexType name="fuvarlevelTipus">
        <sequence>
            <!-- TODO   the destination ("uticel") field is not used, should be removed after 2014.05.30, sprinter/iranykod field should be used instead  -->
            <element name="uticel" type="string" maxOccurs="1" minOccurs="0"></element>
            <!-- Codomain: TOF, PPP, SPRINTER, FOXPOST, EMPTY ,not necessary if there is no consignment note -->
            <element name="futarSzolgalat" type="string" maxOccurs="1" minOccurs="0"></element>
            <!--General bar code definition, this will be used, if no carrierspecific data is defined -->
            <element name="vonalkod" type="string" maxOccurs="1" minOccurs="0"></element>
            <!-- Comment on the consignment note -->
            <element name="megjegyzes" type="string" maxOccurs="1" minOccurs="0"></element>
            <!-- Trans-O-Flex node to upload -->
            <element name="tof" type="tns:transoflexTipus" maxOccurs="1" minOccurs="0"></element>
            <!-- PickPackPoint node to upload -->
            <element name="ppp" type="tns:pppTipus" maxOccurs="1" minOccurs="0"></element>
            <!-- Sprinter node to upload -->
            <element name="sprinter" type="tns:sprinterTipus" maxOccurs="1" minOccurs="0"></element>
            <!-- MPL node to upload-->
            <element name="mpl" type="tns:mplTipus" maxOccurs="1" minOccurs="0"></element>
        </sequence>
    </complexType>

    <element name="xmlszamla">
        <complexType>
            <sequence>
                <element name="beallitasok" type="tns:beallitasokTipus" maxOccurs="1" minOccurs="1"></element>
                <element name="fejlec" type="tns:fejlecTipus" maxOccurs="1" minOccurs="1"></element>
                <element name="elado" type="tns:eladoTipus" maxOccurs="1" minOccurs="1"></element>
                <element name="vevo" type="tns:vevoTipus" maxOccurs="1" minOccurs="1"></element>
                <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 while creating the invoice?

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 may be three different kinds 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="kintlevoseg" 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>

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

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

Net, Gross and VAT values shown on the invoice

Terms:

Rounding

Rounding based on NET value (HUF invoice)

In case you are issuing an invoice for a business partner and not a natural person (B2B), 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 GROSS price of 500 HUF :

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 rounding in order to comply with the law.

How do I know the number of an invoice and its gross or net value?

Every HTTP response consists of two parts. The first one is the header, and the second one is the body. If the calling party requests the invoice, the body will be a pdf file. 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 insert data in the header using the following names always starting with szlahu_:

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

Can I issue electronic invoices?

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

Referencing a pro forma invoice

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

Agent output types

The Agent cancreate the following types of documents:

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

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

Accepted BBCodes are the following:

You can also attach files to the e-mail notification. This could be useful e.g. if you are selling electronics, and you would 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 the attachment to attachfile1. The maximum number of attachents is 5, and you can only post a single file to a single form. To attach 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 codes are attached to the following ZIP file called szamla_agent_minta.php (or you can download here).

A .NET example is available here, and Woocommerce here.

You can also check out our FAQ page about Számla Agent integration with existing webshops by following this link.

Reversing an invoice (storno)

Post request data

Here is a short HTML code example of the reverse invoice (storno) 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 -->
        <szamlaKulsoAzon></szamlaKulsoAzon><!--     string  --> <!-- The invoice can be identified with this key by the third party system (system which uses the Számla Agent): later the invoice can be queried with this key -->
    </beallitasok>
    <fejlec>
        <!-- header -->
        <szamlaszam>E-TST-2011-1</szamlaszam>
        <!-- invoice number -->
        <keltDatum>2010-09-12</keltDatum>
        <!-- date of issue -->
        <tipus>SS</tipus>
        <!-- type -->
    </fejlec>
    <elado>
        <!-- seller -->
        <emailReplyto>seller@example.com</emailReplyto>
        <emailTargy>Email subject</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"><!-- If the TAX number of the buyer is missing from the original invoice, it can be added in this block -->
        <sequence>
            <element name="email" type="string" 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>
        </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="szamlaLetoltes" type="boolean" maxOccurs="1" minOccurs="1"></element>
            <element name="szamlaLetoltesPld" type="int" maxOccurs="1" minOccurs="0"></element>
            <element name="aggregator" type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="guardian" type="boolean" maxOccurs="1" minOccurs="0"></element>
            <element name="valaszVerzio" type="int" maxOccurs="1" minOccurs="0"></element>
            <element name="szamlaKulsoAzon" type="string" 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> <!-- depricated, do not use -->
            <element name="megjegyzes"      type="string" maxOccurs="1" minOccurs="0"></element> <!-- you can define a reason for the receipt cancelation -->
            <element name="tipus"           type="string" maxOccurs="1" minOccurs="0"></element>
            <element name="szamlaSablon"    type="string" maxOccurs="1" minOccurs="0"></element> <!-- Vallue set (receipt template): 'SzlaMost' | 'SzlaAlap' | 'SzlaNoEnv' | 'Szla8cm' | 'SzlaTomb' | 'SzlaFuvarlevelesAlap' -->
        </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 of a reverse (storno) invoice and its gross or net value?

Each HTTP response consists of two parts. The first one is the header and the second one is the body. If the calling party requests the invoice pdf, the body will be a pdf file. The header is always a name=value pair. There is an option to get the values in the header in all programming languages that support HTTP requests. In Számla Agent you can put data in the header using the following names that always start with szlahu_:

What answers do I receive while creating the reverse (storno) invoice?

[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 kinds 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 seen below. The part between [ERR] and ------------ is important:

Registering a credit entry

Data of post request

Here is a short example HTML code for the credit entry registering 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 with the name action-szamla_agent_kifiz.

Example XML

You have to use the following simple XML in the request where you can register maximum of 5 credit entries.

<?xml version="1.0" encoding="UTF-8"?>
<xmlszamlakifiz xmlns="http://www.szamlazz.hu/xmlszamlakifiz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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 -->
    <adoszam>12345678-1-13</adoszam> <!-- If you provide the tax number of the issuer of invoice, then the system will match the incoming invoice with the corresponding incoming receipt. -->
    <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="adoszam"      type="string" maxOccurs="1" minOccurs="0"></element>
    <element name="additiv"      type="boolean" maxOccurs="1" minOccurs="1"></element>
    <element name="aggregator"   type="string"  maxOccurs="1" minOccurs="0"></element>
    <element name="valaszVerzio" type="int" maxOccurs="1" minOccurs="0"></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 while registering a credit entry?

AEach HTTP response consists of two parts. The first one is the header and the second one is the body. If the calling party requests the invoice, the body will be a pdf file. The header is always a name=value pair. There is an option to get the values in the header in all programming languages that support HTTP requests. In Számla Agent you can put data in the header using the following names that always start with szlahu_:

If there are error codes in the header, the other data (invoice number, gross and net value) will not be present in the header. In the case of an XML response, the XML will also include these data besides the header.

There are two possible answers:

The format of the error message will be as seen below. The part between [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, Számlázz.hu sends the following data if the status of the payment changes:

The request sent by Számlázz.hu is POST. The request is "Content-Type": "application/form-data"

Example: http://www.webaruhaz.hu/kifizetettszamla?szlahu_szamlaszam=E-2020-123&szlahu_rendelesszam=RND1234&szlahu_bruttovegosszeg=10000&szlahu_kifizetettbrutto=10000&szlahu_fizetesmod=kp

Querying the invoice PDF

There are two different types of the requested pdf:

Data of post request

Here is a short HTML code example of the reverse 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 with the name action-szamla_agent_pdf.

Example XML

<xmlszamlapdf xmlns="http://www.szamlazz.hu/xmlszamlapdf" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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) -->
  <szamlaKulsoAzon></szamlaKulsoAzon><!--     string  --><!-- The invoice can be identified with this key by the third party system (system which uses the Számla Agent): later the invoice can be queried with this key -->
</xmlszamlapdf>

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/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>
      <element name="szamlaKulsoAzon" type="string"  maxOccurs="1" minOccurs="0"></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 kinds of answers:

The format of the error message will be as it can be as seen below. The part between [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 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 the case of a 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 the case of an 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="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="kintlevoseg" 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>

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 https://www.szamlazz.hu/szamla/docs/xsds/agentxml/xmlszamlaxml.xsd">
  <felhasznalo>Please fill out!</felhasznalo>
  <jelszo>Please fill out!</jelszo>
  <!-- Agent key can be used, instead of username/password -->
  <szamlaagentkulcs>Please fill out!</szamlaagentkulcs>
  <szamlaszam>E-TST-2011-1</szamlaszam>
  <!-- 
  <rendelesSzam></rendelesSzam> <Order number can be used in the query. In this case the last receipt with this order number will be returned 
  -->  
  <!-- 
  <pdf>true</pdf>  Only needed if the pdf must be downloaded
  -->
 </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 the case of a successful 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>Hungary</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>other</fizmodunified>
        <nyelv>hu</nyelv>
        <devizanem>HUF</devizanem>
        <devizaarf>0</devizaarf>
        <megjegyzes></megjegyzes>
        <penzforg>false</penzforg>
        <kata>true</kata>
        <email>example@example.com</email>
        <teszt>false</teszt>
    </alap>
    <vevo>
        <id>221216</id>
        <nev>Customer name</nev>
        <cim>
            <orszag>Hungary</orszag>
            <irsz>1324</irsz>
            <telepules>Debrecen</telepules>
            <cim>1234</cim>
        </cim>
     <email>example@example.com</email>
        <adoszam></adoszam>
        <fokonyv>
            <vevo></vevo>
            <vevoazon></vevoazon>
        </fokonyv>
    </vevo>
    <tetelek>
        <tetel>
            <nev>Apple</nev>
            <mennyiseg>1</mennyiseg>
            <mennyisegiegyseg>pieces</mennyisegiegyseg>
            <nettoegysegar>380</nettoegysegar>
            <afakulcs>20</afakulcs>
            <netto>380</netto>
            <arresafaalap>0</arresafaalap>
            <afa>76</afa>
            <brutto>456</brutto>
            <megjegyzes>Apple comment</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>
    <kifizetesek>
        <kifizetes>
            <datum>2020-09-22</datum>
            <jogcim>transfer</jogcim>
            <osszeg>15</osszeg>
            <megjegyzes>comment</megjegyzes>
            <bankszamlaszam>-</bankszamlaszam>
        </kifizetes>
    </kifizetesek>
    <pdf>The receipt .pdf can be found here in BASE64 encoding</pdf>
</szamla>

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 must 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. If there is a critical error, you will receive the error message as a regular text/html. Expected XML response in the case of a successful deletion:

<?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 the case that the deletion was unsuccessful:

<?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="https://www.szamlazz.hu/szamla/docs/xsds/nyugtacreate/xmlnyugtacreate.xsd">
  <beallitasok>                                                      <!-- REQ         -->
    <felhasznalo>Test123</felhasznalo>      <!-- REQ string  --> <!--user login name -->
    <jelszo>Test123</jelszo>                      <!-- REQ string  --> <!-- user password -->
    <szamlaagentkulcs>Please fill!</szamlaagentkulcs>
    <pdfLetoltes>false</pdfLetoltes>                       <!-- REQ boolean --> <!-- PDF download -->
  </beallitasok>
  <fejlec>                                                <!-- REQ         -->
    <hivasAzonosito></hivasAzonosito>     <!--     string  --> <!-- unique identifier of the call, duplication must be avoided-->
    <elotag>NYGTA</elotag>                    <!-- REQ string  --> <!-- receipt number prefix, required ==> NYGTA-2017-111 -->
    <fizmod>készpénz</fizmod>               <!-- REQ string  --> <!-- payment method, free text field, values ​​used on the interface are: á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  --> <!-- currency: Ft, HUF, EUR, USD stb. -->
    <devizabank>MNB</devizabank>         <!--     string  --> <!-- in case of foreign bill (not Ft/HUF) the name of the Bank -->
    <devizaarf>0.0</devizaarf>                 <!--     string  --> <!-- exchange rate -->
    <megjegyzes></megjegyzes>             <!--     string  --> <!-- free text description,  shown on the receipt -->
    <pdfSablon></pdfSablon>                   <!--     string  --> <!--  in case of custom PDF template, the identifier of the used template-->
    <fokonyvVevo></fokonyvVevo>                      <!--     string  --> <!-- general ledger ID of the customer -->
  </fejlec>
  <tetelek>                                        <!-- REQ         -->
    <tetel>                                         <!-- REQ         --> <!-- at least one item is required to issue a receipt  -->
      <megnevezes>Kitten doormat</megnevezes>         <!-- REQ string  --> <!-- name of the receipt -->
      <azonosito></azonosito>                                        <!--     string  --> <!-- ID of the receipt -->
      <mennyiseg>2.0</mennyiseg>                               <!-- REQ double  --> <!-- item quantity -->
      <mennyisegiEgyseg>db</mennyisegiEgyseg>          <!-- REQ string  --> <!-- unit of quantity -->
      <nettoEgysegar>10000</nettoEgysegar>                <!-- REQ double  --> <!-- net unit price -->
      <netto>20000.0</netto>                                 <!-- REQ double  --> <!-- net value (quantity * net unit price) -->
      <afakulcs>27</afakulcs>                                 <!-- REQ string  --> <!-- VAT rate, values: 0, 5, 10, 27, AAM, TAM, EU, EUK, MAA, F.AFA, K.AFA, ÁKK,HO, EUE, EUFADE, EUFAD37, ATK, NAM, EAM, KBAUK, KBAET -->
      <afa>5400.0</afa>                                                <!-- REQ double  --> <!-- VAT total value -->
      <brutto>25400.0</brutto>                                      <!-- REQ double  --> <!-- gross total value -->
      <megjegyzes>Példa megjegyzés</megjegyzes>
      <fokonyv>                                                             <!--             --> <!-- general ledger information -->
        <arbevetel>...</arbevetel>                                   <!--     string  --> <!-- sales general ledger ID  -->
        <afa>...</afa>                                                     <!--     string  --> <!-- VAT general ledger ID -->
      </fokonyv>
    </tetel>
    <tetel>
      <megnevezes>Puppy doormat</megnevezes>
      <mennyiseg>2.0</mennyiseg>
      <mennyisegiEgyseg>db</mennyisegiEgyseg>
      <nettoEgysegar>10000</nettoEgysegar>
      <netto>20000.0</netto>
      <afakulcs>ÁKK</afakulcs>
      <afa>5400.0</afa>
      <brutto>25400.0</brutto>
    </tetel>
  </tetelek>
  <!--
    The <kifizetesek> section (payments) is not mandatory, but if present,
    then the sum of the values should be equal with the total amount of the receipt.
  -->
  <kifizetesek>                                                             <!--     string  --> <!-- details of the payment method -->
    <kifizetes>
      <fizetoeszkoz>voucher</fizetoeszkoz>                    <!-- REQ string  --> <!-- name of the legal tender -->
      <osszeg>30000.0</osszeg>                                    <!-- REQ double  --> <!-- paid amount with legal tender -->
      <leiras>OTP SZÉP kártya</leiras>                            <!--     double  --> <!-- description of the legal tender -->
    </kifizetes>
    <kifizetes>
      <fizetoeszkoz>debit card</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>  <!-- Codomain: 'A' | 'N' | 'J' | 'L' -->
            <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> 
            <element name="megjegyzes" type="string" maxOccurs="1" minOccurs="0"/>
        </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 call fault tolerant. If this field is in use, it needs to be unique, otherwise the API call will be unsuccessful. This ensures that if the same XML is posted multiple times, it will not duplicate an existing receipt.

Every successful call contains the <sikeres>true</sikeres> field in the response. In case the generation of the receipt fails 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 following messages:

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 used to create receipts are not visible on the front end, 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 have 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 receipt in a foreign currency, and the currency field <penznem/> differs from “Ft” or “HUF”, 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 https://www.szamlazz.hu/szamla/docs/xsds/nyugtavalasz/xmlnyugtavalasz.xsd">
  <sikeres>true</sikeres>                                                <!-- REQ boolean -->
  <hibakod></hibakod>                                                    <!--     string  --> <!-- error code (if any) -->
  <hibauzenet></hibauzenet>                                              <!--     string  --> <!-- error message (if any) -->

  <nyugtaPdf>...</nyugtaPdf>                                             <!--     string  --> <!--receipt PDF with base64 encoding  -->

  <nyugta>                                                               <!-- REQ         -->
    <alap>                                                               <!-- REQ         -->
      <id>123456</id>                                                    <!-- REQ id      -->
      <hivasAzonosito></hivasAzonosito>                                  <!--     string  --> <!-- If the call ID were defined during the creation of the receipt-->
      <nyugtaszam>NYGT-2017-123</nyugtaszam>                             <!-- REQ string  -->
      <tipus>NY</tipus>                                                  <!-- REQ string  --> <!-- type of the receipt: NY - "receipt", SN - "receipt cancellation" -->
      <stornozott>false</stornozott>                                     <!-- REQ boolean --> <!-- true if the receipt is cancelled, otherwise false (interesting if the receipt type is NY (receipt)) -->
      <stornozottNyugtaszam>NYGT-2017-100</stornozottNyugtaszam>         <!--     string  --> <!-- If the receipt is cancelled, then the ID of the cancelled receipt (shows which receipt was cancelled in case of SN ("receipt cancellation") type) -->
      <kelt>2015-12-01</kelt>                                            <!-- REQ date    --> <!-- date of the receipt -->
      <fizmod>cash</fizmod>                                          <!-- REQ string  -->
      <penznem>EUR</penznem>                                             <!-- REQ string  --> <!-- empty, Ft, HUF, EUR, CHF, USD, ... -->
      <devizabank></devizabank>                                          <!--     string  -->
      <devizaarf>210</devizaarf>                                         <!--     double  -->
      <megjegyzes></megjegyzes>                                          <!--     string  -->
      <fokonyvVevo></fokonyvVevo>                                        <!--     string  --> <!-- accounting information -->
      <teszt>false</teszt>                                               <!-- REQ boolean --> <!-- The receipt was created by a test company (true) or a real company (false)-->
    </alap>

    <tetelek>
      <tetel>
        <azonosito></azonosito>                                          <!--     string  --> <!-- item ID -->
        <megnevezes>Kitten doormat</megnevezes>                       <!-- REQ string  --> <!-- item name -->
        <mennyiseg>2.0</mennyiseg>                                       <!-- REQ double  --> <!-- item quantity -->
        <mennyisegiEgyseg>db</mennyisegiEgyseg>                          <!-- REQ string  --> <!-- unit of quantity -->
        <nettoEgysegar>10000</nettoEgysegar>                             <!-- REQ double  --> <!-- net unit price -->
        <netto>20000.0</netto>                                           <!-- REQ double  --> <!-- item net value (net unit price * item quantity) -->
        <afakulcs>27</afakulcs>                                          <!-- REQ double  --> <!-- VAT rate, values: `TEHK` : Outside the scope of Hungarian VAT, `TAHK` : Not subject to VAT  , `TAM` : supply exempt from VAT / exempt supply, `AAM` : person exempt from VAT / exempt person, `EUT`  : Within EU (former 'EU'), `EUKT` : Outside EU (former 'EUK'), `MAA` : exempt from tax, `F.AFA` : reverse VAT, `K.AFA` : differential VAT, HO, EUE, EUFADE, EUFAD37, ATK, NAM, EAM, KBAUK, KBAET (translation WIP), `0, 5, 7, 18, 19, 20, 25, 27` : exact VAT rate -->
        <afa>5400.0</afa>                                                <!-- REQ double  --> <!-- VAT total value -->
        <brutto>25400.0</brutto>                                         <!-- REQ double  --> <!-- gross total value -->
        <fokonyv>                                                        <!--             --> <!-- general ledger information -->
          <arbevetel></arbevetel>                                        <!--     string  --> <!-- sales general ledger ID -->
          <afa></afa>                                                    <!--     string  --> <!-- VAT general ledger ID -->
        </fokonyv>
      </tetel>
      <tetel>
        <megnevezes>Puppy doormat</megnevezes>
        <mennyiseg>2.0</mennyiseg>
        <mennyisegiEgyseg>db</mennyisegiEgyseg>
        <nettoEgysegar>10000</nettoEgysegar>
        <nettoErtek>20000.0</nettoErtek>
        <afakulcs>27</afakulcs>
        <afaErtek>5400.0</afaErtek>
        <bruttoErtek>25400.0</bruttoErtek>
      </tetel>
    </tetelek>

    <kifizetesek>
      <kifizetes>
        <fizetoeszkoz>voucher</fizetoeszkoz>
        <osszeg>1000.0</osszeg>
        <leiras>OTP SZÉP kártya</leiras>
      </kifizetes>
      <kifizetes>
        <fizetoeszkoz>debit card</fizetoeszkoz>
        <osszeg>3000.0</osszeg>
      </kifizetes>
    </kifizetesek>

    <osszegek>
      <afakulcsossz>                                                     <!-- REQ int     -->
        <afatipus>ÁKK</afatipus>                                         <!--     string  --> <!--  `TEHK` : Outside the scope of Hungarian VAT, `TAHK` : Not subject to VAT  , `TAM` : supply exempt from VAT / exempt supply, `AAM` : person exempt from VAT / exempt person, `EUT`  : Within EU (former 'EU'), `EUKT` : Outside EU (former 'EUK'), `MAA` : exempt from tax, `F.AFA` : reverse VAT, `K.AFA`, HO, EUE, EUFADE, EUFAD37, ATK, NAM, EAM, KBAUK, KBAET (translation WIP) : differential VAT, `0, 5, 7, 18, 19, 20, 25, 27` : exact VAT rate -->
        <afakulcs>0</afakulcs>                                           <!-- REQ double  -->
        <netto>200</netto>                                               <!-- REQ double  -->
        <afa>54</afa>                                                    <!-- REQ double  -->
        <brutto>254</brutto>                                             <!-- REQ double  -->
      </afakulcsossz>
      <totalossz>                                                        <!-- REQ         -->
        <netto>200</netto>                                               <!-- REQ double  -->
        <afa>54</afa>                                                    <!-- REQ double  -->
        <brutto>254</brutto>                                             <!-- REQ double  -->
      </totalossz>
    </osszegek>
  </nyugta>

</xmlnyugtavalasz>

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>
            <enumeration value="TAHK"></enumeration>
            <enumeration value="TEHK"></enumeration>
            <enumeration value="EUT"></enumeration>
            <enumeration value="EUKT"></enumeration>
            <enumeration value="HO"></enumeration>
            <enumeration value="EUE"></enumeration>
            <enumeration value="EUFADE"></enumeration>
            <enumeration value="EUFAD37"></enumeration>
            <enumeration value="ATK"></enumeration>
            <enumeration value="NAM"></enumeration>
            <enumeration value="EAM"></enumeration>
            <enumeration value="KBAUK"></enumeration>
            <enumeration value="KBAET"></enumeration>
        </restriction>
    </simpleType>

    <simpleType name="nyugtatipusTipus">
        <restriction base="string">
            <enumeration value="NY"></enumeration>          <!-- receipt -->
            <enumeration value="SN"></enumeration>          <!-- receipt cancellation -->
        </restriction>
    </simpleType>


    <!-- receipt details -->
    <complexType name="alapTipus">
        <all>
            <element name="id"                    type="int"                   maxOccurs="1" minOccurs="1"></element>
            <element name="hivasAzonosito"        type="string"                maxOccurs="1" minOccurs="0"></element>
            <element name="nyugtaszam"            type="string"                maxOccurs="1" minOccurs="1"></element>
            <element name="tipus"                 type="tns:nyugtatipusTipus"  maxOccurs="1" minOccurs="1"></element>
            <element name="stornozott"            type="boolean"               maxOccurs="1" minOccurs="1"></element>
            <element name="stornozottNyugtaszam"  type="string"                maxOccurs="1" minOccurs="0"></element>
            <element name="kelt"                  type="date"                  maxOccurs="1" minOccurs="1"></element>
            <element name="fizmod"                type="string"                maxOccurs="1" minOccurs="1"></element>
            <element name="penznem"               type="string"                maxOccurs="1" minOccurs="1"></element>
            <element name="devizabank"            type="string"                maxOccurs="1" minOccurs="0"></element>
            <element name="devizaarf"             type="double"                maxOccurs="1" minOccurs="0"></element>
            <element name="megjegyzes"            type="string"                maxOccurs="1" minOccurs="0"></element>
            <element name="fokonyvVevo"           type="string"                maxOccurs="1" minOccurs="0"></element>
            <element name="teszt"                 type="boolean"               maxOccurs="1" minOccurs="1"></element>
        </all>
    </complexType>

    <!-- receipt items -->
    <complexType name="fokonyvtetelTipus">
        <all>
            <element name="arbevetel"             type="string"                maxOccurs="1" minOccurs="0"></element>
            <element name="afa"                   type="string"                maxOccurs="1" minOccurs="0"></element>
        </all>
    </complexType>
    <complexType name="tetelTipus">
        <all>
            <element name="megnevezes"            type="string"                maxOccurs="1" minOccurs="1"></element>
            <element name="azonosito"             type="string"                maxOccurs="1" minOccurs="0"></element>
            <element name="nettoEgysegar"         type="double"                maxOccurs="1" minOccurs="1"></element>
            <element name="mennyiseg"             type="double"                maxOccurs="1" minOccurs="1"></element>
            <element name="mennyisegiEgyseg"      type="string"                maxOccurs="1" minOccurs="1"></element>
            <element name="netto"                 type="double"                maxOccurs="1" minOccurs="1"></element>
            <element name="afatipus"              type="tns:afatipusTipus"     maxOccurs="1" minOccurs="0"></element>
            <element name="afakulcs"                                           maxOccurs="1" minOccurs="1">
                <simpleType>
                    <restriction base="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="tetelekTipus">
        <sequence>
            <element name="tetel"                 type="tns:tetelTipus"        maxOccurs="unbounded" minOccurs="1"></element>
        </sequence>
    </complexType>

    <!-- summary by VAT rate-->
    <complexType name="afakulcsosszTipus">
        <all>
            <element name="afatipus"              type="tns:afatipusTipus"     maxOccurs="1" minOccurs="0"></element>
            <element name="afakulcs"                                           maxOccurs="1" minOccurs="1">
                <simpleType>
                    <restriction base="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>
    <!-- receipt totam summary -->
    <complexType name="totalosszTipus">
        <all>
            <element name="netto"                 type="double"                maxOccurs="1" minOccurs="1"></element>
            <element name="afa"                   type="double"                maxOccurs="1" minOccurs="1"></element>
            <element name="brutto"                type="double"                maxOccurs="1" minOccurs="1"></element>
        </all>
    </complexType>
    <!-- receipt summaries (by VAT rates and total)-->
    <complexType name="osszegekTipus">
        <sequence>
            <element name="afakulcsossz"          type="tns:afakulcsosszTipus" maxOccurs="unbounded" minOccurs="1"></element>
            <element name="totalossz"             type="tns:totalosszTipus"    maxOccurs="1" minOccurs="1"></element>
        </sequence>
    </complexType>

    <!-- credit notes -->
    <complexType name="kifizetesTipus">
        <all>
            <element name="fizetoeszkoz"          type="string"               maxOccurs="1" minOccurs="1"></element>
            <element name="osszeg"                type="double"               maxOccurs="1" minOccurs="1"></element>
            <element name="leiras"                type="string"               maxOccurs="1" minOccurs="0"></element>
        </all>
    </complexType>
    <complexType name="kifizetesekTipus">
        <sequence>
            <element name="kifizetes"             type="tns:kifizetesTipus"   maxOccurs="unbounded" minOccurs="1"></element>
        </sequence>
    </complexType>

    <complexType name="nyugtaTipus">
        <all>
            <element name="alap"                  type="tns:alapTipus"         maxOccurs="1" minOccurs="1"></element>
            <element name="tetelek"               type="tns:tetelekTipus"      maxOccurs="1" minOccurs="1"></element>
            <element name="kifizetesek"           type="tns:kifizetesekTipus"  maxOccurs="1" minOccurs="0"></element>
            <element name="osszegek"              type="tns:osszegekTipus"     maxOccurs="1" minOccurs="1"></element>
        </all>
    </complexType>

    <element name="xmlnyugtavalasz">
        <complexType>
            <all>
                <element name="sikeres"           type="boolean"               maxOccurs="1" minOccurs="1"></element>
                <element name="hibakod"           type="int"                   maxOccurs="1" minOccurs="0"></element>
                <element name="hibauzenet"        type="string"                maxOccurs="1" minOccurs="0"></element>
                <element name="nyugtaPdf"         type="string"                maxOccurs="1" minOccurs="0"></element>
                <element name="nyugta"            type="tns:nyugtaTipus"       maxOccurs="1" minOccurs="0"></element>
            </all>
        </complexType>
    </element>
</schema>

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>                    <!-- download PDF receipt -->
  </beallitasok> 
  <fejlec>
    <nyugtaszam>NYGT-2020-1</nyugtaszam>    <!-- ID of the receipt, which should be cancelled -->
    <!--  in case of custom PDF template, the identifier of the used template-->
    <!--
    <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  --> <!-- user login name -->
    <jelszo>Test123</jelszo>                            <!-- REQ string  --> <!-- user password -->
    <szamlaagentkulcs>Please fill!</szamlaagentkulcs>
    <pdfLetoltes>false</pdfLetoltes>                             <!-- REQ string  --> <!-- download PDF receipt -->
  </beallitasok>
  <fejlec>
    <nyugtaszam>NYGT-2020-1</nyugtaszam>          <!-- REQ string  --> <!-- ID of the receip, which should be downloaded -->
    <!-- in case of custom PDF template, the identifier of the used template -->
    <!--
    <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="hivasAzonosito" type="string" maxOccurs="1" minOccurs="0"></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 --> <!-- user login name -->
    <jelszo>Test123</jelszo>                            <!-- REQ string --> <!-- user password -->
    <szamlaagentkulcs>Please fill!</szamlaagentkulcs>
  </beallitasok>
  <fejlec>
    <!-- e-mail notification available only for already issued receipts -->
    <nyugtaszam>NYGT-2020-1</nyugtaszam>             <!-- REQ string --> <!-- Receipt ID -->
  </fejlec>
  <!-- e-mail configuration-->
  <emailKuldes>
    <!-- e-mail details, if not defined, the previous e-mail will be sent  -->
    <email>vevo@example.com</email>                       <!--     string --> <!-- customer e-mail address (recipient)  -->
    <emailReplyto>elado@example.com</emailReplyto> <!--     string --> <!-- reply-to  address, the customer will reply to this address -->
    <emailTargy>Email tárgya</emailTargy>                 <!--     string --> <!-- e-mail subject -->
    <emailSzoveg>                                                       <!--     string --> <!-- e-mail body -->
Text in the e-mail.
Signature
    </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 the 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

This interface is used to query the validity of a VAT number. The data is from the Online Invoice Platform of NAV, the Hungarian National Tax and Customs Administration.

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 QueryTaxPayerResponse type of Online Invoice Platform of NAV, the Hungarian National Tax and Customs Administration. Last querie for example responses: 2020-11-04

Example response: success

<?xml version="1.0" encoding="UTF-8"?>
<QueryTaxpayerResponse xmlns="http://schemas.nav.gov.hu/OSA/2.0/api" xmlns:ns2="http://schemas.nav.gov.hu/OSA/2.0/data">
   <header>
      <requestId>38046_g2z6726bg67ymdt3p56bg6</requestId>
      <timestamp>2020-11-04T11:26:50.456Z</timestamp>
      <requestVersion>2.0</requestVersion>
   </header>
   <result>
      <funcCode>OK</funcCode>
   </result>
   <software>
      <softwareId>SZAMLAZZHU34540973</softwareId>
      <softwareName>Számlázz.hu</softwareName>
      <softwareOperation>ONLINE_SERVICE</softwareOperation>
      <softwareMainVersion>v20201104</softwareMainVersion>
      <softwareDevName>Számlázz.hu szolgáltatásfejlesztés</softwareDevName>
      <softwareDevContact>fejlesztes@szamlazz.hu</softwareDevContact>
   </software>
   <infoDate>2004-12-26T23:00:00.000Z</infoDate>
   <taxpayerValidity>true</taxpayerValidity>
   <taxpayerData>
      <taxpayerName>KBOSS.HU KERESKEDELMI ÉS SZOLGÁLTATÓ KORLÁTOLT FELELŐSSÉGŰ TÁRSASÁG</taxpayerName>
      <taxNumberDetail>
         <ns2:taxpayerId>13421739</ns2:taxpayerId>
         <ns2:vatCode>2</ns2:vatCode>
      </taxNumberDetail>
      <taxpayerAddressList>
         <taxpayerAddressItem>
            <taxpayerAddressType>HQ</taxpayerAddressType>
            <taxpayerAddress>
               <ns2:countryCode>HU</ns2:countryCode>
               <ns2:postalCode>1031</ns2:postalCode>
               <ns2:city>BUDAPEST</ns2:city>
               <ns2:streetName>ZÁHONY</ns2:streetName>
               <ns2:publicPlaceCategory>UTCA</ns2:publicPlaceCategory>
               <ns2:number>7.</ns2:number>
            </taxpayerAddress>
         </taxpayerAddressItem>
      </taxpayerAddressList>
   </taxpayerData>
</QueryTaxpayerResponse>

Example response: failed

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<QueryTaxpayerResponse xmlns="http://schemas.nav.gov.hu/OSA/2.0/api" xmlns:ns2="http://schemas.nav.gov.hu/OSA/2.0/data">
    <header>
        <requestId>-</requestId>
        <timestamp>2020-11-04T11:31:27.122Z</timestamp>
        <requestVersion>2.0</requestVersion>
    </header>
    <result>
        <funcCode>ERROR</funcCode>
        <errorCode>57</errorCode>
        <message>XML beolvasási hiba. cvc-pattern-valid: Value '1342173' is not facet-valid with respect to pattern '[0-9]{8}' for type 'torszszamTipus'.</message>
    </result>
</QueryTaxpayerResponse>

Example response: Invalid Taxnumber

<?xml version="1.0" encoding="UTF-8"?>
<QueryTaxpayerResponse xmlns="http://schemas.nav.gov.hu/OSA/2.0/api" xmlns:ns2="http://schemas.nav.gov.hu/OSA/2.0/data">
   <header>
      <requestId>38046_g2z6726bg67ymdt3p56bg6</requestId>
      <timestamp>2020-11-04T11:29:40.656Z</timestamp>
      <requestVersion>2.0</requestVersion>
   </header>
   <result>
      <funcCode>OK</funcCode>
   </result>
   <taxpayerValidity>false</taxpayerValidity>
</QueryTaxpayerResponse>

XML response scheme

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

Self-billing

Introduction

Számlázz.hu supports self-billing (or self-invoicing) 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 account with accounting privileges.

In case you are looking for the zip-based documentation regarding self-billing (or self-invoicing) in Hungarian, 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 (self-invoicing) agreement. This is outside the scope of Számlázz.hu. For more information, please contact your accountant or lawyer.

There is a connection between the customer's and the supplier's invoicing account. Establishing the 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 supplier's account via Számla Agent

It is possible to create the supplier's 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 is important to provide the valid data - especially the e-mail address, that will be important later.

As a result of this call, a special user account will be created besides the supplier’s account, one that will also have access to the supplier’s account. Therefore you need to provide a new username, password and other details for this account.

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

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

In case the customer wants to resend this email to the supplier, the customer needs to login to the freshly created account (which cannot be used yet) with the user they will use to access the supplier's account in the future. The login attempt will be unsuccessful, since the supplier has not granted access to their account to the customer yet, but this triggers an event which causes the Számlázz.hu system to resend the notification email.

Joining the account of an existing supplier as a customer

It is also possible that the supplier already has a Számlázz.hu account, and would like to provide access to its customer for self-billing (self-invoicing). Access can be provided through the control panel:

  1. The customer creates a login ID to access the supplier’s account.
  2. The customer logs in to his/her 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 will use to issue invoices. If you plan to use Számla Agent instead of issuing invoices manually, you need to create a new user ID before sending the join request (more information on this: 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 is 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 does not have an account yet, 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 it can approve the join request on the control panel.

E-invoicing and pricing

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

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

It is important to note that the customer has to pay for the invoices even though they were issued from the supplier's account. It is also possible for the supplier to subscribe to a paid package and issue e-invoices on its 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 can see all invoices after logging into its own account (regardless of whether the invoices were issued by itself or by the customer). When the customer logs into the supplier's account, it only sees invoices issued by the customer itself (and not by the supplier). This way the supplier can hide invoices that were issued by the supplier itself and not by the customer.

Hints

Self-billing works like the follows:

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 users with access to their account (and suppliers who they are connected to for self-billing purposes). To avoid confusion, you should give the suppliers easily recognizable names (e.g. Example Ltd self-billing).

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

  5. The user login names for the users connecting to the suppliers' accounts must be different, but these can be of any kind that make them easier to recognise.

  6. Suppliers like to use a separate invoice book for self-billing. You need to discuss this with your supplier. If you create the suppliers' account, you need to define the specific invoice prefix you are planning to use. This prefix should be 5 characters long with a meaningful name which indicates that it belongs to the supplier.

Create asupplier's 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>user</loginname>
      <password>passwd</password>
      <szamlaagentkulcs>agentkey</szamlaagentkulcs>
  </login>

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

      <!-- Name of the supplier company, if it has a short name you should provide that -->
      <cegcompanyname>Company name Co.</cegcompanyname>

      <!-- Tax number of the supplier company. If there's a company already registered
           using the same tax number, and we can clearly identify said company, 
           we will send a join request to the account owner of saithe said company.
       -->
      <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>companyemail@example.org</cegemail>

      <!-- E-mail address of the supplier, this will be the replyto address in sent invoices. -->
      <cegemailreplyto>companyemail@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>John</usrvezeteknev>
      <usrkeresztnev>Doe</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>
      <element name="szamlaagentkulcs" type="string" maxOccurs="1" minOccurs="0"></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 zip can be downloaded from here.

The PHP API changelog can be found here.

The PHP API changelog.md can be downloaded from here.

(Current API version: 2.10.17, updated on 11.30.2023.)