nav-gov-hu / Online-Invoice

Public repository of the Online Invoice System
Other
138 stars 52 forks source link

[FEATURE] API to push the electronic invoicing to the taxpayer by the the NAV (NTCA). #366

Closed danton-edi closed 3 years ago

danton-edi commented 4 years ago

Az igény összefoglalása / Summary of the request Once the law allows the consideration of electronic invoicing of the invoices reported by the taxpayer to the NAV (NTCA), the receiver taxpayer will be implicitly forced to query from the NAV the invoices which other taxpayer has reported.

The current method based on QueryInvoiceDigestRequest is a deficient way of get the invoices which a taxpayer receives. A taxpayer would have to query the whole day to check if there are new invoices addressed to them and, after that, they should do a new call to get the invoice for each invoice in the QueryInvoiceDigestResponse. Or consult each day the invoices of the previous day which would mean delays in the processing of invoices. Besides, the probability of "lose" some invoice in the process is too high. There isn't any kind of feedback that let you know automatically if you has download all the invoices.

insDate dateTimeFrom 2019-01-01T12:00:00.000Z /dateTimeFrom dateTimeTo 2019-01-01T14:00:00.000Z /dateTimeTo /insDate

Az általam javasolt megoldás / The solution I propose It would be better go from a pull approach to a push approach.

  1. The NAV (NTCA) publishes a new REST API with new functions which the customer-side should implement if they want to receive INBOUND invoices addressed to them. A function of that API would give the NAV the possibility to directly PUSH each invoice which the NAV have received for that customer from some supplier.

  2. The taxpayer (customer-side) develops the REST API and informs to the NAV (NTCA) of the URL where the REST API is available.

  3. The NAV (NTCA) creates a link to the URL provided by the taxpayer and from this moment publishes all the invoices addressed to this taxpayer.

A similar model is used in Italy and other countries.

Elfogadható alternatívák / Acceptable alternatives The main idea is to implement a protocol that guarantees a taxpayer that they have received all the invoices that have been reported to their name. Avoiding massive queries would be an objective too.

We are open to other alternatives that achieve these objectives.

Please, could you consider thinking about it?

Egyéb tartalom / Additional content

Thanks a lot for your support.

NTCA-developer commented 4 years ago

Hi @danton-edi ,

First of all, thank you for drafting this solution. I think it is convenient to split the topic into two, for easier discussion, as follows.

1) Electronic invoices

NTCA's aim with the new electronic invoicing format is to hit two birds with the same stone:

These are the business benefits of the new e-invoicing model. However, NTCA's point of view is that it must not take part in the invoicing process between supplier and customer, and the upcoming regulation will state the same. Therefore, NTCA will explicitly shrug off any responsibility concerning the delivery of the e-invoice or notification of the customer. Similarly, NTCA will not be held responsible for tracking the status of these e-invoices, and at last but not least, NTCA will not register whether the customer got (downloaded) the e-invoice or not.

NTCA will solely provide standard CIA funcions about this kind of e-invoicing, namely:

Therefore, the solution you propose about direct e-invoice delivery by NTCA is surely a no-go, because it is in direct contradiction with the legal standpoint I mentioned above.

2) Generic push behaviour

The model you describe is doable (as the example you mention works) but it has a huge organizational cost. Effectively testing and debugging every delivery to the client side is an arduous and heavy task. Since it was never the objective of the Hungarian model to deliver received invoices to their addressee, a generic push delivery method would not only be overkill, but it would require a lot of legislative changes, beginning with the task that in this model NTCA needs to play a part in issuance of every invoice. (which is a lot bigger task than deliverying the invoice I mentioned in section 1), and even the lesser is a no-go) Querying the invoices on customer side is still a service of the API, but in the foreseeable future, it will only remain that.

Please feel free to comment my response, or close the ticket if you see fit.

NTCA-developer commented 4 years ago

@NTCA-tax, FYI

NTCA-developer commented 3 years ago

Since no new comments were made, I close this ticket. Feel free to open a new one if need arises.