How a Masav credits file for supplier payments is produced, where validation catches it, and the difference between an upload rejection, a bank refusal and a return days later.
Key takeaways
- The file is built to the official Masav payments-file specification, which Masav publishes and revises. There is no other legitimate source for the layout.
- The organisation is identified by an institution code obtained from the bank holding its account. It is a prerequisite, not a field you invent.
- Masav runs automatic structural validation on upload and returns alerts before the file goes to execution.
- An upload rejection, a bank refusal and a return in the returns file are three different events at three different times.
- Masav's support page also publishes account-validity tooling, Hebrew character tables and hash-calculation steps - a sign the file is not free text.
A Masav payment file is a credits file an organisation generates, uploads to the Masav payments site and signs digitally, from which the banks credit beneficiary accounts on the chosen value date. Masav publishes a technical specification for building the file, and every record layout, field length and position must come from there - not from an old sample file circulating in the office.
What happens to the file from the moment it is generated
The process is a chain of four gates, and each has its own class of failure:
- Generation. Your system produces the file to the specification, including the header and control records and the reconciliation mechanisms the specification defines.
- Upload to the payments site. Masav scans the structure and flags missing or invalid fields. Structural errors die here.
- Signature and approval. Authorised signatories approve the run and the value date.
- Execution at the banks. The organisation's account is debited and beneficiaries are credited. A failure at this stage comes back in a returns file, not on a screen.
The distinction between gate 2 and gate 4 is the difference between "the file was not accepted" and "the payment did not arrive", and those are two completely different investigations.
Why does one bad record reject the whole batch?
Because a payment file is not a list of independent instructions - it is a single unit with control records. An error that breaks the structure or the control totals invalidates the entire file, while an error affecting one beneficiary is handled at row level.
That explains the correct working pattern: prove the structure before sending, rather than discovering it at upload. Four checks worth running locally first:
- Account number validity. Masav publishes account-validity tooling on its support page; checking locally saves a full round trip.
- Hebrew encoding. Beneficiary names in Hebrew are a permanent source of broken characters, which is exactly why Masav publishes Hebrew character tables alongside the specifications.
- Control totals. Record counts and total amounts have to reconcile with the control records the specification requires.
- Duplicates. Same beneficiary, same amount, same value date is almost always a mistake rather than an intention.
The three failure points and where each surfaces
| When it fails | Class of failure | How you find out | What you do |
|---|---|---|---|
| At upload | Structure, encoding, mismatched totals | Immediate alert on screen | Fix the generator and regenerate |
| Before the value date | Insufficient funds in the organisation's account, missing signature | The run is not approved | Coordinate with the bank, do not edit the file |
| After execution | Beneficiary account closed or wrong | Returns file, days later | Update the supplier record and re-pay |
The third row is why the returns file has to be read automatically rather than sitting in a mailbox. Its counterpart on the collections side is covered in reading the Masav returns file and updating customer debt.
Value date, transmission times and business days
The value date is a field the organisation sets, not something derived from the moment of upload. Two design consequences follow, and both are easy to miss.
First, an uploaded file is not an executed file. Between upload and value date there is a window in which the run can still be coordinated with the bank, so any internal report that marks invoices "paid" at upload time is running ahead of reality. Second, the timetable depends on business days and transmission windows that Masav publishes on its support pages - not on the general calendar.
- A run scheduled for a non-business day will not execute that day, which affects the payment terms you promised a supplier.
- Holiday eves and vacation periods shorten the effective window, so a fixed "10th of the month" run needs logic that moves forward rather than backward.
- If the system derives the value date automatically from invoice date plus payment terms, there has to be a step that aligns it to a valid business calendar before the file is built.
The check that prevents most surprises is trivial: display the computed value date on the approval screen, before signature, rather than only inside the file.
What changes when the specification is revised?
Masav's specifications carry a revision date, and Masav publishes notices about changes that require preparation - for example a notice about bank identification codes being retired under a Bank of Israel directive, with a defined effective date. A system that built its file once, five years ago, will not learn about a change like that until the file fails.
The practical preparation is simple: store the specification version the file was built to, assign someone to watch the Masav specifications page, and keep a test path where a file can be checked before a real upload.
How this connects to invoice approval
The payment file should be the output of a process, not its starting point. The order that works: an invoice is captured, approved, matched to an order, checked against a valid withholding certificate, and only then joins a "ready to pay" pool. The payment run takes that pool, builds a file, and produces an exceptions report at the same time.
Skip that stage and the file becomes the place where problems surface that should have surfaced two weeks earlier - a wrong deduction, a duplicate supplier, or an invoice approved twice. The full sequence is described in supplier invoice approval through to a Masav file, and the pre-check in automated supplier verification.
What to have ready before writing the generator
- A valid institution code from your bank, and an active Masav account.
- The current payments-file specification from the Masav site, not a sample file from another system.
- A decision on who is authorised to sign and how that is recorded.
- A mechanism producing a unique reference per payment, so a return can be matched back to it.
- A log of every file sent, including its contents, so you can reconstruct exactly what went out.
Sources
Frequently asked questions
Where do I find the exact record layout for a Masav file?
In the official specification Masav publishes on its file-specifications page, under the payments-file specification. It carries a revision date. Do not rely on a sample file from another system or on old internal documentation, because field positions and lengths change between versions.
What is the difference between a rejected file and a returned payment?
A file rejection happens at upload, before money moves, and comes from the file's structure or control records. A return happens after execution, when the bank could not credit the beneficiary account, and reaches you in a dedicated returns file carrying the reason for the return.
Do supplier payments also need an institution code?
Yes. The organisation is identified to Masav by an institution code, obtained from the bank where its account is held, after approval. It is a prerequisite for joining the service, not a technical parameter you can decide on yourself while writing the generator.
A file uploaded successfully but one supplier got no money. What now?
Check that period's returns file and find the record by its reference number. The reason will be stated there - a closed account or incorrect details, for example. Correct the supplier record at source, document the change, and issue the payment again in the next run.
Keep reading
Related service
Business Automation
I build custom automations that remove repetitive work end to end.
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 meHave 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.
