All articles
POS & Billing7 min read

Connecting Green Invoice (חשבונית ירוקה / morning) to AI and Automations

Green Invoice (חשבונית ירוקה), now rebranded as morning, issues tax invoices and receipts for tens of thousands of Israeli freelancers and businesses — and it ships one of the friendliest REST APIs in the local market. That makes it a natural place to plug in AI. Here is how a senior engineer connects Green Invoice to AI using its real API, and the automations that genuinely pay off.

Green Invoice (חשבונית ירוקה) is the document layer for a huge slice of the Israeli market — freelancers, agencies, e-commerce shops and small companies who need to issue a legal חשבונית מס / קבלה without running a heavyweight ERP. Since its rebrand to morning it has only grown, and the reason engineers like working with it is simple: every invoice it produces is a clean, structured business event. Who got billed, for how much, for what line items, in which currency, with which VAT, paid or unpaid, and the official document number the Tax Authority recognizes. That is exactly the kind of trustworthy signal AI does well with — and in most businesses it just sits inside the Green Invoice dashboard, unused.

How Green Invoice actually exposes data

The good news is that Green Invoice ships a genuine modern REST API — JSON in, JSON out, documented publicly. You don't fight a legacy SOAP envelope or screen-scrape a portal. Authentication is the one part people trip on, so it's worth being precise about the building blocks you'll actually assemble:

  • Token auth (id + secret) — you generate an API key pair in the account settings, exchange it at the /account/token endpoint for a short-lived JWT, and send that bearer token on every request. The token expires, so any real integration refreshes it automatically rather than hardcoding one.
  • Documents API — create and fetch invoices, receipts, invoice-receipts (חשבונית מס קבלה), price quotes and credit notes. This is the core: issue a legal document programmatically and get back its ID, number and PDF link.
  • Clients API — create, search and update the customer records (לקוחות) that documents attach to, so AI can match an incoming payment to the right client instead of creating duplicates.
  • Payments & income — pull the income data behind the documents, which is what reconciliation and plain-language financial questions run on.
  • Webhooks — Green Invoice can POST to a URL of yours when a document is created or a status changes, giving you a real-time hook instead of polling on a timer.

For automation the two pieces that matter most are that webhook (your push channel into document events) and the documents API for issuing and pulling on demand (your pull channel). Together they give an AI layer both directions it needs to stay useful instead of stale.

What you can actually build

  1. Issue-on-event invoicing: a paid order in your store, PayPlus or Cardcom charge, or Stripe payment triggers Green Invoice to auto-issue the correct חשבונית מס קבלה, file it, and email it to the customer — no manual data entry, no end-of-day backlog.
  2. Reconciliation that runs itself: an AI job matches each Green Invoice document against your bank feed and payment gateway, and surfaces only the mismatches — a paid invoice with no settlement, or a settlement with no document — that a human needs to see.
  3. Collections in the client's own tone: an unpaid invoice past its due date triggers an AI-drafted WhatsApp or email reminder in Hebrew, polite and on-brand, with the payment link attached.
  4. Plain-language finance answers: a chatbot that answers "how much did I invoice in May versus April, and which client is furthest behind on payment?" by querying Green Invoice and summarizing — no export to Excel, no bookkeeper round-trip.
  5. Monthly close on autopilot: AI categorizes each document, flags anything unusual (a round number, a new client, a missing VAT field), and drafts the summary your accountant actually wants.

Where the real work is

The AI model is the commoditized part now. The engineering lives in the seams: refreshing the JWT before it expires so jobs don't silently start failing at 3am, making document creation idempotent so a retried webhook never issues the same invoice twice (a duplicate tax document is a real headache to cancel), mapping Green Invoice's document types and status codes onto your own data model, getting VAT and currency right, handling the difference between a draft and a finalized document, and never letting customer financial data leak into an AI prompt or a log file it shouldn't. This is billing infrastructure — unglamorous, compliance-sensitive, and exactly where a quiet bug becomes a tax problem rather than a cosmetic one.

With invoicing the AI is the showroom. The idempotent, auditable plumbing that issues exactly one correct legal document per sale is the engine — and the engine is the part that has to be right.

No-code or custom code?

For a single low-stakes flow — posting each new invoice to a Slack channel, say — a no-code tool like Make or Zapier hitting the webhook is often genuinely enough, and I'll tell you when it is. You should reach for custom code the moment money, tax documents or volume are on the line: programmatic issuing of legal invoices, reconciling them against payments, refreshing tokens reliably, idempotency that survives retries, customer data that must stay off third-party platforms, or AI logic too specific for a pre-built connector. If you're looking to hire a developer to connect Green Invoice (חשבונית ירוקה / morning) to your existing systems and AI-driven automations, this is exactly the work I do — building the secure, auditable layer between your invoicing platform and AI, end to end. The contact form on this page reaches me directly; tell me what your invoices should be doing on their own, and I'll build it.

Looking for a developer to connect your systems to AI?

I'm Ariel Gelberg — a senior software engineer and technical partner. I build the integrations and automations that connect your business to AI, end to end.

Let's talk