Issue receipts in third-party invoicing
Delegated issuing also covers receipts (nyugta), with the same connection model as for invoices. Here too, delegated receipt issuing barely differs from what you are used to:
- Issuing receipts on the UI? After logging in with the dedicated user, you can issue the receipt the same way as in your own account; details in the Issuing receipts on the UI section.
- Issuing receipts via Agent? Send the standard receipt XML with the login credentials (username + password) of the dedicated (
usrMb) user given at connection time; the only thing to watch is the mandatory receipt prefix; details in the Issuing receipts via Számla Agent section.
Prerequisites
- The delegated connection is approved; see Establish the connection in the UI or Establish the connection via API.
- For issuing via Agent, the delegate's account is on a subscription plan that includes receipt issuing via Agent - every plan except the free one includes it - and the dedicated user's role also allows receipt issuing; without these the call fails with error 8.
- A receipt prefix agreed with the supplier is available; see Receipt prefix.
If these are fulfilled, you can start.
Before going live, receipt issuing can also be tried risk-free with test accounts; see Testing the flow.
What changes compared to standard receipts?
The short answer: almost nothing. The delegated context comes from the login here too: the dedicated user belongs to the supplier's account as a delegated user - everything else works the usual way.
- The receipt is issued in the supplier's name and stored in the supplier's account; the supplier sees it like any of their own receipts.
- The costs of the issuing are borne by the delegate, and the available features (for example receipt issuing via Agent) follow the delegate's subscription plan.
Issuing receipts on the UI
Issuing receipts on the UI does not differ from standard receipt issuing: logged in with the dedicated user, you issue the receipt in the supplier's account the same way as in your own. You do not need to take care of a receipt book either: when the delegated user first logs in to the supplier account and has no receipt book yet, the system automatically generates one with an MB-prefixed prefix. This is independent of the prefix given at connection time - that one only creates an invoice book, never a receipt book.
One thing to watch: if the dedicated user has access to more than one account (for example to the delegate's own account too), check in the account selector after login that the supplier's account is selected - the receipt is always created in the currently selected account.
Issuing receipts via Számla Agent
Nothing changes in the XML. Delegated receipts are created with the standard receipt XML (xmlnyugtacreate, action-szamla_agent_nyugta_create), using the login credentials (username + password) of the dedicated (usrMb) user given at connection time; there is no dedicated "delegated" field. Querying (nyugta_get), sending (nyugta_send), and reversing (nyugta_storno) also use the standard calls. See Receipt XML. The Számla Agent key cannot be used for delegated calls here either: the key belongs to the account and does not carry the delegated relation; see Issue invoices as delegate.
Only one thing needs attention: using the correct receipt prefix, created when the delegated connection was established.
Receipt prefix
Unlike invoices, the <elotag> field is required on every receipt; a receipt cannot be created without a prefix (error 7, missing data).
- Agree with the supplier which receipt prefix the delegated issuing uses, and send that value in
<elotag>. - If the prefix you give in the request does not exist in the supplier account yet, the system automatically creates a new receipt book with this prefix (named "Agent-en keresztül regisztrált Nyugta előtag" - receipt prefix registered via Agent), and the receipt is issued into it. Agree with the supplier before introducing a new prefix.
- If the prefix you send is already used by invoices, the call fails with error 336; receipt and invoice prefixes cannot overlap.
- If the receipt prefix exists but is disabled, the call fails with error 524; reversal of an existing receipt is still allowed. The supplier can enable or disable the prefix on the Settings > Prefixes page: select the prefix and use the "Engedélyezem az előtag használatát" (enable the use of the prefix) checkbox.
More on prefixes: Invoice prefix handling - Receipt prefixes.
Response
The response is the same as for standard Agent receipt calls: receipt number in the response XML, PDF if requested. See Receipt response.
Common errors
| Code | Message (HU) | Meaning and what to do |
|---|---|---|
| 3 | Sikertelen bejelentkezés. | Login failed: wrong credentials. Make sure you call with the dedicated user's credentials. |
| 7 | Hiányzó adat: (mező). | Mandatory data is missing from the request; for receipts, typically <elotag>. |
| 8 | Nincs jogosultságod vagy megfelelő díjcsomagod a művelet elvégzéséhez (…)! | The delegate account's plan does not include receipt issuing via Agent, or the dedicated user's role has no receipt issuing right assigned. |
| 164 | Ez a felhasználó (név) több számlázási fiókhoz is hozzáfér, így a funkció nem üzemképes. | Agent calls require a user with access to exactly one account; use the dedicated (usrMb) user. |
| 336 | Ezt az előtagot a számlázás már használja, így nem lehet nyugta előtag (előtag). | The prefix you sent is already used by invoices; choose a different receipt prefix. |
| 524 | Ez a nyugtaszám előtag nincs engedélyezve: (előtag). | The receipt prefix was disabled in the supplier account. It can be enabled on the Settings > Prefixes page: select the prefix and tick the "Engedélyezem az előtag használatát" (enable the use of the prefix) checkbox. Ask the supplier to do this, or use another prefix; reversal of an existing receipt is not blocked by this. |
Full list with resolutions: Error handling.
Restrictions and visibility
- Receipt visibility follows the same rule as invoices: the supplier sees all receipts, the delegate sees only those issued by the dedicated user.
- Keep the delegated receipt prefix separate from the supplier's own receipt prefixes, so the origin of each receipt stays clear.