---
title: "Update Public Payment Allocations"
method: PUT
path: "/v2/public/payments/{payment_id}/allocations"
tags: ["payments"]
---

# Update Public Payment Allocations

`PUT /v2/public/payments/{payment_id}/allocations`

## Request

- Base URL: `https://api.sanka.com`
- URL: `https://api.sanka.com/v2/public/payments/{payment_id}/allocations`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/sankahq/apis/sanka-public-api/docs/v2/public/payments/:payment_id/allocations/put.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `payment_id` string, required

## Query parameters

- `external_id` string, nullable
- `lang` string, nullable
- `language` string, nullable
- `workspace_id` string, nullable

## Headers

- `Accept-Language` string, nullable
- `X-Workspace-Code` string

## Request body

- PaymentAllocationsUpdateRequest
  - `allocations` PaymentAllocationSaveInput[]
    - `invoice_id` string, required
    - `amount` number, required
    - `adjustment_amount` number, nullable
    - `adjustment_type` string, nullable
    - `currency` string, nullable
    - `source` string, nullable
    - `notes` string, nullable

## Response `200`

Successful Response

- UpdatePublicPaymentAllocationsApiV2PublicPaymentsPaymentIdAllocationsPut200Envelope
  - `success` true, required
  - `data` object, required
  - `meta` EnvelopeMeta, required
    - `ctx_id` string, required
    - `pagination` PaginationMeta
      - `page` integer, required
      - `page_size` integer, required
      - `total` integer, required
      - `next_cursor` string, nullable
    - `toast` ToastMessage
      - `variant` 'success' | 'error' | 'info' | 'warning', required
      - `code` string, required
      - `message` string, required
      - `i18n` ToastMessageI18n, required
        - `en` string, required
        - `ja` string, required

## Other responses

- `401`: Error response
- `422`: Error response

## Changes

- **2026-07-21** `91dba803a2c1`: 1 info
  - added the new optional request property `allocations`
- **2026-07-06** `6ce94a6be72c`: 6 info
  - added the optional property `meta/pagination/next_cursor` to the response with the `200` status
  - added the optional property `meta/pagination/next_cursor` to the response with the `401` status
  - added the optional property `meta/pagination/next_cursor` to the response with the `422` status
  - added the optional property `meta/toast` to the response with the `200` status
  - …2 more
- **2026-06-10** `9099b22c3aae`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/sankahq/apis/sanka-public-api/changes/v2/public/payments/:payment_id/allocations/put.md)

---

[API](https://skmtc.dev/sankahq/apis/sanka-public-api.md) - [All operations](https://skmtc.dev/sankahq/apis/sanka-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sankahq/apis/sanka-public-api/revisions/16f03a9e3ab9?raw)
