Retrieving Invoice Number from API
In the API V9Preview6, the ability to retrieve the invoice number from the API for Bulgaria has been added.
Two new notifications have been added:
GetEInvoiceNumberis used to retrieve the invoice number. It is sent when an organization is selected and the cashier proceeds to payment.ConfirmEInvoiceNumberProcessedis used to notify the plugin whether the invoice number issued by GetEInvoiceNumberHandler was successfully used. This occurs after the order is closed.
To pay for an order with an invoice, there must be exactly one subscription for both notifications: GetEInvoiceNumber and ConfirmEInvoiceNumberProcessed. Otherwise, it will be impossible to obtain the invoice number and generate the invoice — the user will see the corresponding message.
If an error occurs while retrieving the invoice number, the payment will be completed with an error — the user will see the corresponding message.