Establish the connection via API (self-billing context)
Self-billing uses the same Agent interface (action-agent_ceg_mb) as delegated invoicing. The full description is in the delegated Establish the connection via API section: the XML and XSD and the cases after submission with the error list. This page covers what to keep in mind in the self-billing context.
What changes in self-billing?
- The technical XML and account-connection flow stay the same.
- In the
<cegMb>block you send the supplier's (your partner's) company data: it is their account that gets created or connected. - The
<usrMb>user is the dedicated user of the buyer company; this user issues the self-billed invoices later. - The business rule changes: the buyer on the invoice is the same company as the delegate.
Recommended API flow
- Create or connect the supplier account via
action-agent_ceg_mb, with an agreed<cegszamlaszamelotag>invoice prefix. - Use a dedicated delegated login user (single-account access); otherwise logins fail with error 164.
- Wait for the supplier to take ownership and approve the connection.
- Issue the invoices from the supplier account, with the buyer set to your own company; see Issue invoices as self-biller.
The interface requires a licence; you can request access from customer support. Without the licence the call fails with error 137. General authentication details are in Authentication.