Invoice4U API: Issuing Invoices Automatically From Your Website or CRM
Back to blog
automation·September 30, 2026·8 min read·By Yehonatan Saadia

Invoice4U API: Issuing Invoices Automatically From Your Website or CRM

A developer's guide to connecting a website, store or CRM to Invoice4U: the ApiService.svc JSON entry point, the {"d": ...} envelope, CreateDocument and the DocumentType codes, ApiIdentifier for idempotency, allocation numbers, and why every error comes back with status 200.

Key takeaways

  • Invoice4U is a .NET WCF service; JSON calls go to POST https://api.invoice4u.co.il/Services/ApiService.svc/{Operation}.
  • Responses are wrapped in {"d": ...}, and a failure comes back as HTTP 200 with a non-empty Errors array.
  • Set ApiIdentifier to your order id and call CreateDocumentWithIdentifierValidation, so a retry cannot issue a second invoice.
  • DocumentType is numeric: 1 tax invoice, 2 receipt, 3 invoice-receipt, 4 credit invoice - and there is no 11 or 12.

The Invoice4U API lets a website, online store or CRM issue invoices, receipts and credit notes in Invoice4U automatically. It is a .NET WCF service with a JSON entry point: you POST to https://api.invoice4u.co.il/Services/ApiService.svc/{Operation}, for example CreateDocument, with the parameters and a token. The two things that trip up most integrations are the {"d": ...} response envelope and errors that arrive with HTTP status 200.

Invoice4U is an Israeli invoicing service, also offered through Verifone's payment products. Its official documentation sits on an Apiary page that renders only in a browser, so this guide is built from the service's own published WSDL contract, checked against live responses on 30 September 2026.

How does the Invoice4U API work?

The service exposes one endpoint with 157 operations, listed in its WSDL at ApiService.svc?singleWsdl. It speaks SOAP natively, but you do not need a SOAP client: an ASP.NET JSON entry point accepts a JSON body on the bare operation path.

WhatValue
Productionhttps://api.invoice4u.co.il/Services/ApiService.svc
Test (QA)https://apiqa.invoice4u.co.il/Services/ApiService.svc
Call shapePOST {base}/{Operation}, Content-Type: application/json
AuthenticationA token parameter in the body. VerifyLoginApiKey takes an apiKey
Response{"d": {...}}, with Errors, Info and the result

Operation parameter names come from the contract and are case-sensitive. CreateDocument, CreateDocumentWithIdentifierValidation and SendDocumentByMail take doc and token. CreateCustomer takes cu and token. FetchAllocationNumber takes docId and token.

Why does a failed Invoice4U call return 200?

Invoice4U reports business errors inside the payload, not in the HTTP status. A call without a valid token returns status 200 with this body:

{"d": {"Errors": [{"Error": "UnauthorizedUser", "ID": 80, "Paramters": null}], "TaxRate": -1}}

So an integration that checks only response.ok records every failure as a success, and an order is marked "invoiced" when no invoice exists. The rule is: read d, and treat any non-empty Errors array as a failure. Note the field name Paramters - it is misspelled in the contract itself, so a strict deserialiser has to match it exactly.

Issuing an invoice from an order, step by step

  1. Get an API key from the Invoice4U account owner, and test against the QA endpoint first.
  2. Find or create the customer. GetCustomerByEmail looks one up; CreateCustomer takes a cu object with Name, Email, Phone or Cell, Address, City and UniqueID (the ת"ז or ח"פ).
  3. Build the doc object: DocumentType, ClientID, Subject, Currency, TaxIncluded, and Items with Name, Code, Quantity and Price.
  4. For an invoice-receipt, add Payments with PaymentType, Amount and Date. The totals of items and payments must agree.
  5. Set ApiIdentifier to your order id and call CreateDocumentWithIdentifierValidation.
  6. Check Errors. On success, store the returned DocumentNumber and document id on the order.
  7. Send it to the customer, either with IsSendUserMail on the document or with SendDocumentByMail afterwards.

Which DocumentType codes does Invoice4U use?

DocumentType is a number, and the contract defines these values:

CodeName in the contractDocument
1InvoiceTax invoice (חשבונית מס)
2ReceiptReceipt (קבלה)
3InvoiceReceiptTax invoice-receipt (חשבונית מס קבלה)
4InvoiceCreditCredit invoice (חשבונית זיכוי)
5ProformaInvoiceProforma (חשבון עסקה)
6 / 7 / 8InvoiceOrder / InvoiceQuote / InvoiceShipOrder, quote, delivery note
13PurchaseOrderPurchase order

Codes 11 and 12 do not exist, so an integration that counts upward from 10 sends an invalid type. Payment methods are numeric too, in PaymentTypes: 1 credit card, 2 cheque, 3 bank transfer, 4 cash, 8 Bit, 9 PayBox. Which document to issue for which sale is explained in receipt, tax invoice or invoice-receipt.

What goes wrong in an Invoice4U integration

  • Duplicate invoices. A timeout on CreateDocument does not mean nothing was issued. The ApiIdentifier route exists so that a retry is rejected instead of producing a second numbered document, which then has to be cancelled with a credit invoice.
  • Date formats. WCF's JSON dates are /Date(milliseconds)/, not ISO strings. Serialise dates in that form, and parse them that way on the way back.
  • Two amount fields. Money appears twice, for example Total and TotalDecimal, next to a UseDecimalValues flag. Decide which one your integration reads, and check it against a real document before trusting it.
  • Allocation numbers. The document carries AllocationNumber, AllocationMessage and ForceGenerateAllocationNumber, and FetchAllocationNumber requests one for an existing document. When an Israeli allocation number is required is set by the Tax Authority, not by the API - see the allocation number API.
  • Logging the token. The token rides in the request body, so a debug log of full request bodies leaks it.

The same pattern with another invoicing service is in automating Morning (Green Invoice) through its API, and the payment side in issuing an invoice automatically after payment.

What to have ready before you start

  • An Invoice4U API key, and access to the QA environment for testing.
  • A decision on which document each sale produces - invoice-receipt at payment, or invoice first and receipt later.
  • Customer records with ת"ז or ח"פ where your business needs them.
  • VAT handling decided per product: prices with or without VAT (TaxIncluded).
  • Somewhere to store the Invoice4U document number against each order.

Sources

#Invoice4U#Invoice4U API#invoicing API#Israel#allocation number

Frequently asked questions

Does Invoice4U have an API?

Yes. Invoice4U runs a .NET WCF service at api.invoice4u.co.il/Services/ApiService.svc with 157 operations in its WSDL, including CreateDocument, CreateCustomer, SendDocumentByMail and FetchAllocationNumber. It accepts JSON on POST {base}/{Operation}, and a separate QA endpoint at apiqa.invoice4u.co.il is available for testing.

What does error 80 UnauthorizedUser mean in Invoice4U?

It means the call did not carry a valid token. Invoice4U returns it with HTTP 200, inside d.Errors as {"Error": "UnauthorizedUser", "ID": 80}, so it only shows up if your code reads the Errors array. Check that the token is sent in the body, belongs to an active account, and targets the right environment.

How do I stop Invoice4U from issuing the same invoice twice?

Put your order id in the document's ApiIdentifier field and create it with CreateDocumentWithIdentifierValidation rather than CreateDocument. A retry after a timeout is then checked against that identifier instead of producing a second numbered document that would have to be cancelled with a credit invoice.

Which DocumentType number is a tax invoice-receipt in Invoice4U?

3, named InvoiceReceipt in the contract. A tax invoice is 1, a receipt 2, a credit invoice 4 and a proforma 5; 6, 7 and 8 are order, quote and delivery note, and a purchase order is 13. There are no codes 11 or 12, so do not assume the list is continuous.

Can Invoice4U email the invoice to the customer automatically?

Yes. The document object has an IsSendUserMail flag and a ClientEmail field for sending at creation time, and the SendDocumentByMail operation sends an existing document afterwards. Either way, record in your system that the document was sent, because the API call succeeding is not proof the email was delivered.

Keep reading

Related service

Integrations

Make the systems you already pay for talk to each other.

Learn more →←

About the author

Yehonatan Saadia

Freelance automation, web & MVP developer

I'm Yehonatan Saadia, a senior developer who builds business automation, custom websites, and MVPs for small and mid-sized companies across the US, Europe, and Israel. These guides come from real client work, not theory.

Work with me

Have a project like this?

Tell me what you're trying to automate or build. I reply within 24 business hours with a few targeted questions, then we walk through it on a free 30-minute call, with no commitment. You come away with a scope, a timeline and a fixed price - or a straight answer that it isn't worth building.