XeroAPI/Xero-OpenAPI

Xero API, create payslips for PayRun in "DRAFT" status

ValentinNikolaev opened this issue · 0 comments

Hello, community

I would be grateful if you could help me with Payslips creation via Xero Api? OpenAPI specification doesnt provide such endpoint. I didn't find any answers to my questions on GitHub, Dev community and official documentation..

If we create PayRun in "DRAFT" status, then PaySlip won't be created:

Realtes to Xero official documentation:
https://developer.xero.com/documentation/api/payrollau/integration-guide/#pay-templates

Any items that are available on the Pay Template will automatically be pre-filled on the PaySlip (including the information from the approved timesheets within the Pay Run window) for scheduled Pay Runs. If there is no Pay Template configured for the employee or if the information needs to be adjusted from the default Pay Template, then Payslips will need to be added/edited using the Payslips endpoint. These modifications must be done while the Pay Run is in DRAFT status.

Note: Unscheduled Pay Runs don’t generate Payslips, so developers will need to do this separately.

In our case Payslips aren't created for a "DRAFT" Pay Runs. So there should be a "CREATE" Api endpoint for payslip as might be assumed. But there is no API endpoint to CREATE new PaySlip for "DRAFT" Pay Run. There's a discrepancy between the Api and the Integration guide.

Realy, no endpoint to create Payslip from API side.

I've checked OpenAPI specification e.t.c and nothing found there either.

Also I've found the same question on Xero developer's forum without an answer https://community.xero.com/developer/discussion/130258174/

So the question is how to create Payslip from the Xero API side?