---
title: "Update payment"
method: PATCH
path: "/payments/{companyId}/{customId}"
tags: ["Payments"]
---

# Update payment

`PATCH /payments/{companyId}/{customId}`

Updates the synchronization status, error message, registration status or additional info of a payment identified by `customId`. If none of the provided fields change the existing payment, the update is a no-op. Note that updating a `customId` that does not match any payment also returns `200` without applying any change — no `404` is raised. Setting `error` without `sync` marks the payment as synchronized with the error recorded.

## Path parameters

- `customId` string, required
- `companyId` string, required

## Request body

- PatchPaymentsRequestSchema
  - `sync` boolean, nullable — Marks the payment as synchronized with the accounting system.
  - `additionalInfo` object, nullable — Free-form key/value metadata to attach to the payment.
  - `error` string, nullable — Error message to record against the payment. Sending an empty string clears a previously set error.
  - `registered` boolean, nullable — Marks the payment as registered in the accounting system.

## Response `200`

Successful Response

- ModifyPaymentsResponseSchema
  - `id` string, required — Embat payment ID

## Other responses

- `401` — Unauthorized. The bearer token is missing, invalid or expired.
- `404` — Not found. The requested resource or `companyId` does not exist.
- `422` — Validation Error
- `500` — Unexpected error. Contact support if it persists.

---

[API](https://skmtc.net/embat/apis/embat-api.md) · [All operations](https://skmtc.net/embat/apis/embat-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/embat/embat-api/revisions/36ca48bf4489/schema)
