Merot Payroll API
One central service that calculates payroll and generates the UJP МПИН and e-PDD files for North Macedonia. The same engine Merot HRS runs on, exposed over a REST API for any instance or customer.
What the service does
The Payroll API is a stateless HTTP service. Every request carries its own data — no client or company is stored on the server. Two groups of endpoints: calculation (gross↔net) and file generators for UJP submission.
- Payroll calculation with the contribution-base cap and net→gross inversion.
- МПИН XML and TXT, and e-PDD GI XML — exactly in the shape UJP accepts.
- Sick leave, overtime, night, holiday hours, and corrections.
- Any legal entity is passed in the request — ЕДБ (tax id), ЕМБС (registration no.) and the rest.
Base URL and authentication
Every request carries an X-API-Key header. Keys are issued per integrator — contact us for access.
Base URL https://api.payroll.merot.com Header X-API-Key: <your-key> Content application/jsonReference
| Method & path | Description |
|---|---|
| POST /api/v1/calculate | One-employee calculation — grossSalary or targetNet (inverse). |
| POST /api/v1/calculate/batch | Batch calculation (up to 500). |
| POST /api/v1/generators/mk/mpin-xml | МПИН XML for UJP. |
| POST /api/v1/generators/mk/mpin-txt | МПИН semicolon TXT. |
| POST /api/v1/generators/mk/pddgi-xml | e-PDD GI XML (contractor / other personal income). |
| GET /api/v1/generators | List available generators per country. |
| GET /api/v1/rates | Current rates and config per country. |
Generate an МПИН XML for any legal entity
The legal entity is defined in the employer block — nothing is hardcoded per company. The identity gross − contributions − PIT = net must hold.
POST /api/v1/generators/mk/mpin-xml X-API-Key: <your-key> { "periodMonth": 6, "periodYear": 2026, "vidObvrska": "110", "workingHours": 176, "employer": { "taxId": "4030007636033", "registrationNumber": "7609230", "name": "ПРИМЕР ДООЕЛ", "vidObvrznik": "101", "address": "Партизанска 5", "city": "Скопје", "municipalityCode": "040", "postalCode": "1230", "phone": "023246899", "email": "info@primer.mk" }, "records": [ { "embg": "2403980410018", "firstName": "Александар", "lastName": "Ацев", "grossSalary": 65000, "netSalary": 47268, "pension": 12220, "health": 4875, "additionalHealth": 325, "employmentContrib": 780, "pit": 3680, "personalAllowance": 10932, "totalContributions": 18200, "workingHours": 176, "bankAccount": "210501611620323", "municipalityCode": "103" } ] } → 200 application/xml (<MpinCalculation> … </MpinCalculation>)Sick-leave fields (sickCompanyHours, sickCompanyRate, sickCompanyPay, sickFundHours, sickFundPay) are per employee and omitted when there is no leave.
Want an API key?
We issue keys per integrator and help wire your HRS instance or system in.
Contact us