Расчёт выплат · Записи · Платежи
payroll_record_payment
Попробуйте три запроса
- Вы указываетеPayeeid
- ПомощникПодготовка
- Вы получаетеПредпросмотр
Подготовь «Расчёт выплат / Записи / Платежи». Для изменения нужны payeeId, periodStart. Покажи объект и ожидаемый эффект до выполнения.
- payeeId
- Параметр
- periodStart
- Параметр
- periodEnd
- Параметр
- Вы указываетеСогласованные значения
- ПомощникОдин вызов
- Вы получаетеОтвет операции
На учебной записи подготовь «Расчёт выплат / Записи / Платежи» с параметром payeeId = DEMO-101. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
- payeeId
- DEMO-101
- accountId
- DEMO-101
- categoryId
- DEMO-101
- Вы указываетеИсходный ответ
- ПомощникСверка результата
- Вы получаетеПодтверждение
Проверь результат «Расчёт выплат / Записи / Платежи» по исходному ответу. Покажи тип операции, payment. Объясни, чем подтвердить эффект для выбранного объекта.
- ЗапросСохранить исходный ключ
- ОтветПроверить статус
- ПроверкаСверить эффект операции
Как работает действие
Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения.
Описание разработчика
Record an already completed employee payment as one expense in the existing company ledger. Requires current OAuth and employee permissions, company-wide payroll and finance access, native protected payroll write authority, and a verified employee recipient. Payee and explicit period are stored in the protected operation receipt; the native ledger user_id remains the recorder. No earnings, amount due, bank transfer, invoice or final payroll settlement is inferred. Preserve the exact request and use payroll_get_record_payment_result after uncertainty.
Параметры запроса
- payeeId
- Exact employee Firebase UID. The server requires active protected membership in this company plus a consistent employee profile; a profile label alone is insufficient. обязательно по схеме · string
- periodStart
- Explicit inclusive payroll period start, YYYY-MM-DD. This labels the completed payment; no earnings are calculated. обязательно по схеме · string
- periodEnd
- Explicit inclusive payroll period end, YYYY-MM-DD, on or after periodStart and at most 366 days later. обязательно по схеме · string
- amount
- Amount already paid to this employee, in the selected account’s native units. This does not send money or establish salary owed. обязательно по схеме · number · максимум 1000000000000
- accountId
- Existing company financial account that funded the completed payment. Currency is resolved from this account. обязательно по схеме · string
- categoryId
- Existing company expense-enabled category. This operation does not create categories or infer a payroll category. обязательно по схеме · string
- paidAt
- When the payment occurred, with an explicit time zone and at most six fractional second digits. Future dates beyond five minutes are rejected; omitted means server commit time. необязательно · string
- comment
- Business reason for recording or correcting an already completed employee payment. Never include credentials. обязательно по схеме · string · до символов 1000
- requestId
- Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
Что вернёт команда
- operation
- Explicit bookkeeping operation performed atomically. обязательно по схеме · string · варианты record, reverse, correct
- payment
- New expense record for record/correct, or null for a reversal. обязательно по схеме · object / null
- reversedPaymentId
- Original payment reversed by reverse/correct, or null for a new record. обязательно по схеме · string / null
- reversal
- Appended inverse effect, or null for a new record. обязательно по схеме · object / null
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"payeeId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Exact employee Firebase UID. The server requires active protected membership in this company plus a consistent employee profile; a profile label alone is insufficient."
},
"periodStart": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
"description": "Explicit inclusive payroll period start, YYYY-MM-DD. This labels the completed payment; no earnings are calculated."
},
"periodEnd": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
"description": "Explicit inclusive payroll period end, YYYY-MM-DD, on or after periodStart and at most 366 days later."
},
"amount": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1000000000000,
"description": "Amount already paid to this employee, in the selected account’s native units. This does not send money or establish salary owed."
},
"accountId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Existing company financial account that funded the completed payment. Currency is resolved from this account."
},
"categoryId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Existing company expense-enabled category. This operation does not create categories or infer a payroll category."
},
"paidAt": {
"description": "When the payment occurred, with an explicit time zone and at most six fractional second digits. Future dates beyond five minutes are rejected; omitted means server commit time.",
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"comment": {
"type": "string",
"minLength": 1,
"maxLength": 1000,
"description": "Business reason for recording or correcting an already completed employee payment. Never include credentials."
},
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,128}$",
"description": "Stable identifier for this exact operation. Reuse unchanged arguments after an uncertain response."
}
},
"required": [
"payeeId",
"periodStart",
"periodEnd",
"amount",
"accountId",
"categoryId",
"comment",
"requestId"
],
"additionalProperties": false
}Выход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": [
"record",
"reverse",
"correct"
],
"description": "Explicit bookkeeping operation performed atomically."
},
"payment": {
"anyOf": [
{
"type": "object",
"properties": {
"paymentId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Canonical immutable expense transaction ID for this recorded employee payment."
},
"payeeId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Verified employee recipient, stored in the protected operation receipt rather than overloading the native ledger author field."
},
"periodStart": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
"description": "Recorded inclusive pay-period start; not calculated earnings."
},
"periodEnd": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
"description": "Recorded inclusive pay-period end; not proof of final payroll settlement."
},
"amount": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Recorded expense amount in native account units."
},
"currency": {
"type": "string",
"minLength": 1,
"maxLength": 32,
"description": "Currency marker copied from the verified source account."
},
"accountId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Company financial account debited by this entry."
},
"categoryId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Verified expense-enabled category."
},
"paidAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
"description": "Recorded absolute time of the completed payment."
},
"recordedBy": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Connected employee who recorded the entry; this remains the native transactions.user_id author."
},
"comment": {
"type": "string",
"maxLength": 1000,
"description": "Recorded business reason."
},
"revision": {
"type": "string",
"pattern": "^[a-f0-9]{32}$",
"description": "Exact immutable payment revision returned by a successful payment record or correction."
}
},
"required": [
"paymentId",
"payeeId",
"periodStart",
"periodEnd",
"amount",
"currency",
"accountId",
"categoryId",
"paidAt",
"recordedBy",
"comment",
"revision"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "New expense record for record/correct, or null for a reversal."
},
"reversedPaymentId": {
"anyOf": [
{
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$"
},
{
"type": "null"
}
],
"description": "Original payment reversed by reverse/correct, or null for a new record."
},
"reversal": {
"anyOf": [
{
"type": "object",
"properties": {
"transactionId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Appended inverse credit transaction; the original expense remains immutable."
},
"accountId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Original source account receiving the inverse bookkeeping effect."
},
"amount": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Exact original amount reversed without currency conversion."
},
"currency": {
"type": "string",
"minLength": 1,
"maxLength": 32,
"description": "Unchanged original account currency."
},
"recordedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
"description": "Server timestamp of the correcting bookkeeping entry."
}
},
"required": [
"transactionId",
"accountId",
"amount",
"currency",
"recordedAt"
],
"additionalProperties": false
},
{
"type": "null"
}
],
"description": "Appended inverse effect, or null for a new record."
}
},
"required": [
"operation",
"payment",
"reversedPaymentId",
"reversal"
],
"additionalProperties": false
}