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.
| What | Value |
|---|---|
| Production | https://api.invoice4u.co.il/Services/ApiService.svc |
| Test (QA) | https://apiqa.invoice4u.co.il/Services/ApiService.svc |
| Call shape | POST {base}/{Operation}, Content-Type: application/json |
| Authentication | A 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.
Invoice4U API example: a tax invoice receipt in one request
A whole tax invoice receipt for a paid order is one POST. The field names and types below are taken from the service contract: DocumentType, ClientID and PaymentType are integers, Quantity, Price and Amount are doubles, and Date is a WCF date. 12345 stands for the Invoice4U customer ID you found or created first.
POST https://apiqa.invoice4u.co.il/Services/ApiService.svc/CreateDocumentWithIdentifierValidation
Content-Type: application/json
{
"token": "<token>",
"doc": {
"DocumentType": 3,
"ClientID": 12345,
"Subject": "Order 1042",
"TaxIncluded": true,
"ApiIdentifier": "order-1042",
"IsSendUserMail": true,
"Items": [
{ "Name": "Monthly plan", "Code": "PLAN-M", "Quantity": 1, "Price": 300 }
],
"Payments": [
{ "PaymentType": 1, "Amount": 300, "Date": "\/Date(1793952000000)\/" }
]
}
}What each part does: DocumentType: 3 is a tax invoice receipt, so the request carries both the item and the payment, and the two totals must match. PaymentType: 1 is a credit card. ApiIdentifier is your own order number, which makes a retry after a timeout get rejected instead of issuing a second document. IsSendUserMail emails the document to the customer. The answer is the same Document object inside d: read d.Errors first, and only when it is empty save d.DocumentNumber (a long) and d.ID (a GUID) against the order.
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.
An invalid key is a second case of the same rule. VerifyLoginApiKey with a key that does not exist answered {"d": null}, also with status 200, on both the production and the QA endpoint when we tested it on 7 November 2026. So an empty d is a failure too, not an empty success.
Issuing an invoice from an order, step by step
- Get an API key from the Invoice4U account owner, and test against the QA endpoint first.
- Find or create the customer.
GetCustomerByEmaillooks one up;CreateCustomertakes acuobject withName,Email,PhoneorCell,Address,CityandUniqueID(the ת"ז or ח"פ). - Build the
docobject:DocumentType,ClientID,Subject,Currency,TaxIncluded, andItemswithName,Code,QuantityandPrice. - For an invoice-receipt, add
PaymentswithPaymentType,AmountandDate. The totals of items and payments must agree. - Set
ApiIdentifierto your order id and callCreateDocumentWithIdentifierValidation. - Check
Errors. On success, store the returnedDocumentNumberand document id on the order. - Send it to the customer, either with
IsSendUserMailon the document or withSendDocumentByMailafterwards.
Which DocumentType codes does Invoice4U use?
DocumentType is a number, and the contract defines these values:
| Code | Name in the contract | Document |
|---|---|---|
| 1 | Invoice | Tax invoice (חשבונית מס) |
| 2 | Receipt | Receipt (קבלה) |
| 3 | InvoiceReceipt | Tax invoice-receipt (חשבונית מס קבלה) |
| 4 | InvoiceCredit | Credit invoice (חשבונית זיכוי) |
| 5 | ProformaInvoice | Proforma (חשבון עסקה) |
| 6 / 7 / 8 | InvoiceOrder / InvoiceQuote / InvoiceShip | Order, quote, delivery note |
| 13 | PurchaseOrder | Purchase 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
CreateDocumentdoes not mean nothing was issued. TheApiIdentifierroute 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
TotalandTotalDecimal, next to aUseDecimalValuesflag. Decide which one your integration reads, and check it against a real document before trusting it. - Allocation numbers. The document carries
AllocationNumber,AllocationMessageandForceGenerateAllocationNumber, andFetchAllocationNumberrequests 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
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.
What does a minimal Invoice4U CreateDocument request contain?
A JSON body with token and doc. For a tax invoice receipt, doc carries DocumentType 3, the ClientID of the customer, Items with Name, Quantity and Price, and Payments with PaymentType, Amount and Date, and the two totals must match. Add ApiIdentifier with your order number so a retry does not issue a second document.
Keep reading
Related service
Integrations
Make the systems you already pay for talk to each other.
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.