Skip to content

Xero: Updates a payslip

Xero payrollAu.updatePayslip: arguments, response, policy and SDK examples.

← Payroll au operations · Get started

Operation xero.payroll_au_updatepayslip

Provider route: POST /payroll.xro/1.0/Payslip/{PayslipID}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/xero with npm, or alter-sdk-xero with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { XeroIntegration } from "@alter-ai/xero";
async function execute(input: Parameters<XeroIntegration["payrollAu"]["updatePayslip"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new XeroIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.payrollAu.updatePayslip(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_xero import XeroIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = XeroIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.payroll_au.update_payslip(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.PayslipIDstringRequired within parentFormat: uuid
headersobjectRequired within parentAdditional keys: not allowed
headers.xero-tenant-idstringRequired within parent
headers.Idempotency-KeystringOptional
bodyarrayRequired within parent
body[]ModelEach itemExpand Updates a payslip — request body — body item

Referenced models: Updates a payslip — request body — body item

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Updates a payslip — response body

Referenced models: Updates a payslip — response body

12 more schemas are linked from the tables above, on the schema pages.

Updates a payslip — response body
FieldTypePresenceDescription and constraints
$objectRoot
PayslipsarrayOptional
Payslips[]ModelEach itemExpand Retrieves for a payslip by a unique payslip id — response body — Payslip

Referenced models: Retrieves for a payslip by a unique payslip id — response body — Payslip

Updates a payslip — request body — body item
FieldTypePresenceDescription and constraints
$objectRoot
DeductionLinesarrayOptional
DeductionLines[]ModelEach itemExpand Updates a payslip — request body — body item Deduction Lines item
EarningsLinesarrayOptional
EarningsLines[]ModelEach itemExpand Updates a payslip — request body — body item Earnings Lines item
LeaveAccrualLinesarrayOptional
LeaveAccrualLines[]ModelEach itemExpand Updates a payslip — request body — body item Leave Accrual Lines item
LeaveEarningsLinesarrayOptional
LeaveEarningsLines[]ModelEach itemExpand Updates a payslip — request body — body item Leave Earnings Lines item
ReimbursementLinesarrayOptional
ReimbursementLines[]ModelEach itemExpand Updates a payslip — request body — body item Reimbursement Lines item
SuperannuationLinesarrayOptional
SuperannuationLines[]ModelEach itemExpand Updates a payslip — request body — body item Superannuation Lines item
TaxLinesarrayOptional
TaxLines[]ModelEach itemExpand Updates a payslip — request body — body item Tax Lines item
TimesheetEarningsLinesarrayOptional
TimesheetEarningsLines[]ModelEach itemExpand Updates a payslip — request body — body item Earnings Lines item

Referenced models: Updates a payslip — request body — body item Deduction Lines item, Updates a payslip — request body — body item Earnings Lines item, Updates a payslip — request body — body item Leave Accrual Lines item, Updates a payslip — request body — body item Leave Earnings Lines item, Updates a payslip — request body — body item Reimbursement Lines item, Updates a payslip — request body — body item Superannuation Lines item, Updates a payslip — request body — body item Tax Lines item

Retrieves for a payslip by a unique payslip id — response body — Payslip
FieldTypePresenceDescription and constraints
$objectRoot
DeductionLinesarrayOptional
DeductionLines[]ModelEach itemExpand Retrieves for a payslip by a unique payslip id — response body — Payslip Deduction Lines item
DeductionsJSONOptional
Deductions (anyOf 1)numberAlternativeThe Deductions for the Payslip
Format: double
Deductions (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
EarningsLinesarrayOptional
EarningsLines[]ModelEach itemExpand Retrieves for a payslip by a unique payslip id — response body — Payslip Earnings Lines item
EmployeeIDstringOptionalThe Xero identifier for an employee
Format: uuid
FirstNamestringOptionalFirst name of employee
LastNamestringOptionalLast name of employee
LeaveAccrualLinesarrayOptional
LeaveAccrualLines[]ModelEach itemExpand Retrieves for a payslip by a unique payslip id — response body — Payslip Leave Accrual Lines item
LeaveEarningsLinesarrayOptional
LeaveEarningsLines[]ModelEach itemExpand Retrieves for a payslip by a unique payslip id — response body — Payslip Leave Earnings Lines item
NetPayJSONOptional
NetPay (anyOf 1)numberAlternativeThe NetPay for the Payslip
Format: double
NetPay (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
PayslipIDstringOptionalXero identifier for the payslip
Format: uuid
ReimbursementLinesarrayOptional
ReimbursementLines[]ModelEach itemExpand Retrieves for a payslip by a unique payslip id — response body — Payslip Reimbursement Lines item
ReimbursementsJSONOptional
Reimbursements (anyOf 1)numberAlternativeThe Reimbursements for the Payslip
Format: double
Reimbursements (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
SuperJSONOptional
Super (anyOf 1)numberAlternativeThe Super for the Payslip
Format: double
Super (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
SuperannuationLinesarrayOptional
SuperannuationLines[]ModelEach itemExpand Retrieves for a payslip by a unique payslip id — response body — Payslip Superannuation Lines item
TaxJSONOptional
Tax (anyOf 1)numberAlternativeThe Tax for the Payslip
Format: double
Tax (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
TaxLinesarrayOptional
TaxLines[]ModelEach itemExpand Retrieves for a payslip by a unique payslip id — response body — Payslip Tax Lines item
TimesheetEarningsLinesarrayOptional
TimesheetEarningsLines[]ModelEach itemExpand Retrieves for a payslip by a unique payslip id — response body — Payslip Earnings Lines item
UpdatedDateUTCstringOptionalLast modified timestamp
Read only: true
WagesJSONOptional
Wages (anyOf 1)numberAlternativeThe Wages for the Payslip
Format: double
Wages (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Retrieves for a payslip by a unique payslip id — response body — Payslip Deduction Lines item, Retrieves for a payslip by a unique payslip id — response body — Payslip Earnings Lines item, Retrieves for a payslip by a unique payslip id — response body — Payslip Leave Accrual Lines item, Retrieves for a payslip by a unique payslip id — response body — Payslip Leave Earnings Lines item, Retrieves for a payslip by a unique payslip id — response body — Payslip Reimbursement Lines item, Retrieves for a payslip by a unique payslip id — response body — Payslip Superannuation Lines item, Retrieves for a payslip by a unique payslip id — response body — Payslip Tax Lines item

Updates a payslip — request body — body item Deduction Lines item
FieldTypePresenceDescription and constraints
$objectRoot
AmountnumberOptionalDeduction type amount
Format: double
CalculationTypestringOptionalOne of: FIXEDAMOUNT, PRETAX, POSTTAX
DeductionTypeIDstringRequired within parentXero deduction type identifier
Format: uuid
NumberOfUnitsnumberOptionalDeduction number of units
Format: double
PercentagenumberOptionalThe Percentage of the Deduction
Format: double
Updates a payslip — request body — body item Earnings Lines item
FieldTypePresenceDescription and constraints
$objectRoot
AmountnumberOptionalEarnings rate amount
Format: double
AnnualSalarynumberOptionalAnnual salary for earnings line
Format: double
CalculationTypestringOptionalOne of: USEEARNINGSRATE, ENTEREARNINGSRATE, ANNUALSALARY
EarningsRateIDstringRequired within parentXero unique id for earnings rate
Format: uuid
FixedAmountnumberOptionalEarnings rate amount. Only applicable if the EarningsRate RateType is Fixed
Format: double
NormalNumberOfUnitsnumberOptionalNormal number of units for EarningsLine. Applicable when RateType is "MULTIPLE"
Format: double
NumberOfUnitsnumberOptionalEarnings rate number of units.
Format: double
NumberOfUnitsPerWeeknumberOptionalnumber of units for earning line
Format: double
RatePerUnitnumberOptionalRate per unit of the EarningsLine.
Format: double

SDK function policy ID: xero.payroll_au_updatepayslip. Catalog operation: payroll_au.updatePayslip. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.