Help / Payroll
MPIN to e-PDD
MPIN in the UJP schema from the locked payroll run: municipalities, signed XML, sending through the UJP web service and checking the status.
On this page
MPIN (the monthly calculation for integrated collection) is made from the locked payroll run. KontoCloud puts it together according to the UJP schema (mpin.xsd), signs it with the legal entity’s certificate and sends it through the UJP web service for e-PDD. Instead of sending it, you can upload the signed file to e-PDD by hand.
Important: sending through the UJP web service has not yet been checked with a real submission. The UJP has no public test address for this web service, and a trial submission with a certificate registered in e-PDD has not been made yet. The assumptions about the codes (type of employment, movement, hours) and the formats of the month, dates and amounts need to be confirmed by the UJP. Until that is confirmed, check every MPIN before sending it, or upload the signed file to e-PDD by hand and check what the system replies.
Where it is
- Open Payroll run (Payroll group).
- In Locked runs, click the payroll run.
- Below the payroll run table is the MPIN to e-PDD section. The explanation reads: “The calculation in the UJP schema. It is signed with the legal entity’s certificate and sent through the UJP web service, or the signed file is uploaded to e-PDD by hand.”
The Export menu of the table above this section has the MPIN (CSV) item. It is an internal overview for checking, not a file for filing.
Who can do what
Only the administrator and the accountant do and see everything in this section. The database does not allow records from other roles and does not show them the data. In read-only mode no new records are accepted (KC070).
What you need
- A locked payroll run. Only the latest version is sent to the UJP. If you are viewing an older one, the screen shows “This is not the latest version of the calculation; only the latest one is sent to UJP.”
- The EDB of the legal entity.
- For each employee: EMBG, bank account (15 digits) and municipality. The EMBG and the account are entered in Employees, and the municipality here.
- A certificate of the legal entity. It is the same certificate as for e-Invoice: the server certificate (.p12) or the local signer with a USB token or a local .p12. It is set up in e-Invoice (UJP).
- For sending through the web service: the legal entity’s username in e-PDD.
Settings
At the top of the section are the three settings:
| Field | What it is | Default |
|---|---|---|
| e-PDD username | the username under which the legal entity is registered in e-PDD | empty |
| Payer kind | code from the UJP code list (3 digits) | 110 (employer, legal entity) |
| Obligation kind | code from the UJP code list (3 digits) | 101 (salary and contributions for the relevant month) |
Enter them and click Save. The settings apply to all payroll runs of the legal entity. Every save is a new version; the old one stays recorded. The server refuses an unknown code with “Unknown payer kind code” or “Unknown obligation kind code”.
Employees in the MPIN
The table shows the employees from the payroll run: #, First name, EMBG, Municipality, Employment, Movement, Days, Hours and Gross.
Only employment rows go into the MPIN. Service contracts and author contracts are listed below the table: “Not in the MPIN (service or author contracts): …”.
Municipality
For each employee, choose a municipality in the Municipality column (“Choose a municipality”). The choice is saved immediately with the message “Municipality saved”. The municipality belongs to the employee, not to the payroll run, so it also applies to the following months. Every change is a new version. Once the UJP has accepted the MPIN, choosing a municipality in that payroll run is disabled.
How the other columns are filled in
The values are taken from the employment contract that was valid when the payroll run was locked:
- Employment: 0050 if the contract is 40 hours a week, 0047 if it is less.
- Movement: 1 if the contract covers the whole month; 4 if it started in the month; 2 if it ended in the month; 6 if it both started and ended in the month.
- Days: the calendar days of the month in which the contract is valid.
- Hours: the working days (Monday to Friday) in that part of the month × hours per week / 5.
- Gross, the contributions, the tax and the net come from the locked payroll run.
- Calculation kind (UJP MPIN guide): the advance (100) and the additional payment (102) have no days, hours, movement, annual leave or sick leave, only the amounts and without the work-injury contribution (field 3.42 is 0); the header carries the month of filing, not the month of the calculation. The additional payment uses employment 0050. The final calculation (333) and the correction (103) carry the full data for the month, the correction only for the selected persons.
Note: these rules are assumptions awaiting confirmation from the UJP (see above). If your case is different, do not send the MPIN.
Problems before sending
If something is missing, the problems are shown in red above the table, for example:
- “…: no employment contract”
- “EMBG must have 13 digits” or “EMBG appears more than once in the payroll run”
- “unknown municipality code” (no municipality chosen)
- “the bank account must have 15 digits”
- “the e-PDD username is empty”
While there is a problem, the Signed XML and Send to UJP buttons are disabled. If you call them from the API or the CLI, the server returns “The MPIN is not complete: …”.
Files for uploading by hand
The Export menu has two items:
- Unsigned XML downloads the MPIN in the UJP schema, without a signature:
MPIN_<YYYYMM>_v<version>_nepotpisana.xml. It is useful for checking. - Signed XML signs the MPIN with the legal entity’s certificate and downloads it as
MPIN_<EDB>_<YYYYMM>.xml. The signature is XAdES-BES, RSA-SHA512, embedded in the file. You can upload this file to e-PDD by hand.
If you sign with the local signer, it shows a signature request of the type “Sending to UJP” with the description “MPIN for MM.YYYY (N employees)”. You need to confirm it. If signing fails, the message is “Signing failed: …”.
Sending to the UJP
- Check the settings, the municipalities and the figures.
- Click Send to UJP. The message is “MPIN sent to UJP”.
KontoCloud signs the MPIN, packs it into a ZIP and sends it to the UJP web service for e-PDD. By default it is sent to the production address of e-PDD (e-pdd.ujp.gov.mk). The Environment choice (Test or Production) from e-Invoice does not apply to MPIN.
Without a username, the server returns “The e-PDD username is missing (Payroll → MPIN → Settings)”.
Submissions to the UJP
Every submission is recorded in the Submissions to UJP table: Date, Status, Transaction, Error and User. The status is:
- Accepted: the UJP has accepted the MPIN.
- Being checked: the UJP has received it but is running additional checks.
- Rejected: the UJP has rejected it. Error shows the code and the messages from the UJP.
For a submission that is being checked, click Check status ·
When the UJP accepts it
When the UJP accepts the MPIN, the database marks it as filed on its own, with the reference “e-PDD transaction N”. The MPIN deadline for that month in Deadlines is closed. The Send to UJP button becomes disabled.
If you file the MPIN in e-PDD by hand, enter the Reference of the filed MPIN and click MPIN filed. This also closes the deadline.
What the database refuses
| Message | Code |
|---|---|
| The MPIN is filed for the latest version of the payroll run | KC158 |
| The MPIN for this payroll run has already been accepted in e-PDD | KC324 |
| The status of this submission is already final | KC325 |
Settings, municipalities, submissions and checks are never changed or deleted. A correction of the payroll run is a new version of the payroll run, and so a new MPIN.
Audit trail, archive and CLI
The audit trail records the settings (without the username), the choice of municipality and every submission and check (with the SHA-256 of the file and of the certificate). Names, EMBGs and amounts are not written there. MPIN submissions go into the archive.
From the CLI: kc payroll mpin-epdd (overview and unsigned XML), mpin-sign, mpin-submit, mpin-check, mpin-settings and municipality.
Something unclear or wrong? Write to us at [email protected].