XML + XSD
- XML example
- XSD schema
In the XML file, the order of the fields is fixed, they cannot be interchanged.
<?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 -->
<szamlaagentkulcs>Please fill!</szamlaagentkulcs>
<szamlaszam>E-TST-2011-1</szamlaszam> <!-- invoice number -->
<adoszam>12345678-1-13</adoszam> <!-- only for incoming invoices: the tax number of the invoice issuer; omit this field when paying your own (outgoing) invoice or pro forma invoice -->
<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><!-- another payment -->
<datum>2012-01-15</datum>
<jogcim>átutalás</jogcim>
<osszeg>2000</osszeg>
<leiras>Test description</leiras> <!-- Description, not required -->
</kifizetes>
</xmlszamlakifiz>
The
adoszam field: outgoing or incoming documentThe adoszam field determines where the system looks for the document given in szamlaszam:
- Omitted or empty: the system searches among your own issued (outgoing) documents, i.e. invoices and pro forma invoices, by invoice number, and registers the payment on the matching document.
- Filled in: the system searches among your incoming invoices. In this case
adoszamis the tax number of the invoice issuer (the company you received the invoice from). The lookup uses the invoice number and the issuer's tax number together, and only finds invoices where your account is the customer.
A common mistake is providing adoszam when registering a payment for your own invoice or pro forma invoice. The system then searches among incoming invoices, does not find the document, and returns the error Hiányzó adat: kifizetett számla (ismeretlen számlaszám) ("Missing data: paid invoice (unknown invoice number)").
The sent XML file must comply with the following XSD schema.
warning
Elements marked minOccurs="1" must be present in the XML (the tag cannot be omitted). Elements marked minOccurs="0" may be omitted.
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.szamlazz.hu/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>
<!-- Invoice number. -->
<element name="szamlaszam" type="string" maxOccurs="1" minOccurs="1"></element>
<!-- Tax number of the invoice issuer. Provide it only for incoming invoices: if present, the document is searched among your incoming invoices; if omitted, among your own issued (outgoing) documents. -->
<element name="adoszam" type="string" maxOccurs="1" minOccurs="0"></element>
<!-- If true, former credit entries are retained; otherwise they are replaced. -->
<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>
<!-- Payment / credit entry. -->
<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>
<element name="xmlszamlakifiz">
<complexType>
<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>
</schema>