E-Faktura (SEF)
E-Faktura (SEF)
Section titled “E-Faktura (SEF)”AnyBiz integrates with the Serbian SEF (Služba za elektronsko fakturisanje) system for electronic invoicing. You can send sales invoices to eFaktura and receive purchase invoices automatically. Configuration is done in Settings; daily subscription for notifications is handled by your deployment (cron)—no action required from users.
What You Can Do
Section titled “What You Can Do”- Send sales invoices to eFaktura – Finalize an invoice and use “Send to eFaktura” to submit it to SEF (UBL 2.1).
- Receive purchase invoices – Incoming purchase invoices from SEF are delivered via webhook and stored as purchase invoices in POS.
- Configure once – Set eFaktura API URL and key in Settings → SEF, and your organization’s legal/bank data (including IBAN) in Settings → Organization. The system uses these for all SEF operations.
- Sync invoices from SEF – Use Settings → SEF → Sync to pull sales and purchase invoices from SEF by date range (and optional status). This includes invoices sent directly from SEF or other systems, not only those you submitted from AnyBiz.
Prerequisites
Section titled “Prerequisites”- Your organization has the E-Faktura feature (subscription).
- Settings → SEF: Base URL and API Key are set (or provided via environment variables).
- Settings → Organization: Bank account (IBAN / tekući račun) is set. This is required for sending sales invoices to eFaktura; without it, “Send to eFaktura” will show an error and no request is sent.
Sending a Sales Invoice to E-Faktura
Section titled “Sending a Sales Invoice to E-Faktura”- Create and finalize the invoice (POS → Invoices).
- Open the invoice and use Send to eFaktura (or the equivalent action in your UI).
- If the organization has no bank account set, you will see: “Payee financial account (IBAN / tekući račun) is required for eFaktura. Set it in Settings → Organization.”
Go to Settings → Organization, set the bank account, then try again. - On success, the invoice is submitted to SEF and the status is updated. You can see eFaktura status and submitted date on the invoice.
Purchase Invoices from SEF
Section titled “Purchase Invoices from SEF”Purchase invoices are delivered by SEF to your server via a webhook. They appear as invoices with direction: Purchase in POS. You do not need to do anything in the app to “receive” them—once your server is configured and the daily SEF subscribe job runs (see Developers: E-Faktura / SEF), new purchase invoices are created automatically.
Settings
Section titled “Settings”Settings → SEF
Section titled “Settings → SEF”The SEF settings page (labeled SEF in the sidebar; formerly “eFaktura Settings”) has two parts:
API credentials
- Base URL – SEF API base URL (e.g.
https://efaktura.mfin.gov.rs). - API Key – Your organization’s eFaktura API key.
These are stored per organization. If not set in the UI, the server can fall back to environment variables EFAKTURA_BASE_URL and EFAKTURA_API_KEY.
Sync
- Date from / Date to – Range of dates for which to fetch invoice IDs from SEF.
- Status (optional) – Filter by SEF status (e.g. Approved, Seen, New). Leave as “All statuses” to sync regardless of status.
- Sync button – Starts the sync. The server fetches sales and purchase invoice IDs from SEF for the given range (and status), then for each ID fetches the full invoice and creates or updates it in AnyBiz. This brings in both invoices you submitted from AnyBiz and invoices sent from SEF or other systems. After the run you see how many sales and purchase invoices were synced (and any errors).
Settings → Organization
Section titled “Settings → Organization”- Bank account (IBAN / tekući račun) – Required for sending sales invoices to eFaktura.
Also used for other legal/company data (registration name, address, etc.) when building the UBL for SEF.
Do I Need to “Subscribe” or Run Something Daily?
Section titled “Do I Need to “Subscribe” or Run Something Daily?”No. Subscribing to SEF for notifications (so that purchase invoices are delivered) is done by the system:
- Your deployment should call the internal cron endpoint once per day (e.g.
POST /api/internal/sef-subscribewith a secret). - Details (URL, secret, how to set up cron) are in the Developer documentation.
As a user, you configure Settings → SEF (API credentials and optionally run Sync to pull invoices by date range) and Settings → Organization (including bank account). The rest is handled for you.
Summary
Section titled “Summary”| Task | Where | Notes |
|---|---|---|
| Send sales invoice to eFaktura | POS → Invoice → Send to eFaktura | Requires Organization bank account. |
| Receive purchase invoices | Automatic | Configure server + cron; no user action. |
| Sync invoices from SEF | Settings → SEF → Sync | Date range + optional status; syncs sales and purchase from SEF (including from other systems). |
| SEF API config | Settings → SEF | Base URL + API Key. |
| Bank account (IBAN) | Settings → Organization | Required for sending to eFaktura. |
| Daily SEF subscribe | Server / cron | See Dev: E-Faktura / SEF. |