Расчёт выплат · Чувствительное действие
Расчёт выплат · Сторнирование · Платежи
payroll_reverse_payment
Попробуйте три запроса
Подготовить
- Вы указываетеPaymentid
- ПомощникПодготовка
- Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Расчёт выплат / Сторнирование / Платежи». Для изменения нужны paymentId, комментарий. Покажи объект и ожидаемый эффект до выполнения.
- paymentId
- Параметр
- comment
- Комментарий
Применить
- Вы указываетеСогласованные значения
- ПомощникОдин вызов
- Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Расчёт выплат / Сторнирование / Платежи» с параметром paymentId = DEMO-101. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
- paymentId
- DEMO-101
- comment
- Проверено на учебной записи
Проверить итог
- Вы указываетеИсходный ответ
- ПомощникСверка результата
- Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Расчёт выплат / Сторнирование / Платежи» по исходному ответу. Покажи тип операции, payment. Объясни, чем подтвердить эффект для выбранного объекта.
- До измененияПрочитать версию
- При записиПередать выбранную версию
- После ответаПеречитать объект
Как работает действие
Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения. Прочитайте актуальную версию записи перед подготовкой запроса.
Описание разработчика
Reverse one unchanged payment created by this payroll bookkeeping contract by appending its exact inverse. The original history is retained, and only one reversal or correction is permitted. Requires current OAuth and employee permissions and current protected payroll/finance authority. No refund is sent and no recipient is changed. Legacy salary and other native transactions are excluded. Recover uncertainty through payroll_get_reverse_payment_result.
Параметры запроса
- paymentId
- An immutable payment ID created by payroll_record_payment or payroll_correct_payment. Legacy salary, manual-finance and provider transactions are excluded. обязательно по схеме · string
- expectedRevision
- Версия, прочитанная перед изменением. обязательно по схеме · 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": {
"paymentId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "An immutable payment ID created by payroll_record_payment or payroll_correct_payment. Legacy salary, manual-finance and provider transactions are excluded."
},
"expectedRevision": {
"type": "string",
"pattern": "^[a-f0-9]{32}$",
"description": "Exact immutable payment revision returned by a successful payment record or correction."
},
"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": [
"paymentId",
"expectedRevision",
"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
}