---
title: "Partial update payment"
method: PATCH
path: "/payments/{id}/"
tags: ["Payments"]
---

# Partial update payment

`PATCH /payments/{id}/`

Endpoint for partially updating an existing payment.

## Path parameters

- `id` string, required

## Headers

- `X-Wafeq-Idempotency-Key` string

## Request body

- PatchedPayment — A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations
  - `amount` number, double — The total amount of the payment including fees. Must be greater than zero.
  - `bill_payments` BillPayment[] — A list of objects to represent bill payments. Required if paying bills.
    - `amount` number, double, required — The amount of the payment. Must be greater than zero.
    - `amount_to_pcy` number, double, required — The amount in the payment currency. Must be greater than zero.
    - `bill` string, required — The unique identifier of the bill to be paid.
    - `created_ts` string, date-time, required — The timestamp in UTC when the payment was created
    - `modified_ts` string, date-time, required — The timestamp in UTC when the payment was last modified
  - `contact` string — The unique identifier of the contact associated with this payment.
  - `cost_center` string, nullable — The unique identifier of the cost center associated with this payment.
  - `created_ts` string, date-time — The timestamp in UTC when the payment was created
  - `credit_note_payments` CreditNotePayment[] — A list of objects to represent credit note payments. Required if applying credit notes.
    - `amount` number, double, required — The amount of the payment. Must be greater than zero.
    - `amount_to_pcy` number, double, required — The amount in the payment currency. Must be greater than zero.
    - `created_ts` string, date-time, required — The timestamp in UTC when the payment was created
    - `credit_note` string, required — The unique identifier of the credit note to be applied.
    - `modified_ts` string, date-time, required — The timestamp in UTC when the payment was last modified
  - `credit_notes` AdvanceCreditNote[] — A list with a single object to record a customer advance (money received before any invoice exists). A matching credit note is auto-generated.
    - `amount` number, double, required — The advance amount in the payment currency. Must be greater than zero.
    - `credit_note_number` string, required — The number of the credit note auto-generated to back this customer advance. Read-only field.
  - `currency` 'AED' | 'SAR' | 'USD' | 'EUR' | 'CAD' | 'AFN' | 'ALL' | 'AMD' | 'ARS' | 'AUD' | 'AZN' | 'BAM' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BND' | 'BOB' | 'BRL' | 'BWP' | 'BYN' | 'BZD' | 'CDF' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'GBP' | 'GEL' | 'GHS' | 'GNF' | 'GTQ' | 'HKD' | 'HNL' | 'HRK' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KHR' | 'KMF' | 'KRW' | 'KWD' | 'KZT' | 'LBP' | 'LKR' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MOP' | 'MUR' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SDG' | 'SEK' | 'SGD' | 'SOS' | 'SYP' | 'THB' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'UYU' | 'UZS' | 'VES' | 'VND' | 'XAF' | 'XOF' | 'YER' | 'ZAR' | 'ZMW' — * `AED` - AED ⃱ * `SAR` - SAR ⃁ * `USD` - USD $ * `EUR` - EUR € * `CAD` - CAD $ * `AFN` - AFN ؋ * `ALL` - ALL Lek * `AMD` - AMD դր. * `ARS` - ARS $ * `AUD` - AUD $ * `...` Full information for [CurrencyEnum](currencyenum)
  - `date` string, date — The date when the payment was made or received.
  - `debit_note_payments` DebitNotePayment[] — A list of objects to represent debit note payments. Required if paying debit notes.
    - `amount` number, double, required — The amount of the payment. Must be greater than zero.
    - `amount_to_pcy` number, double, required — The amount in the payment currency. Must be greater than zero.
    - `created_ts` string, date-time, required — The timestamp in UTC when the payment was created
    - `debit_note` string, required — The unique identifier of the debit note to be paid.
    - `modified_ts` string, date-time, required — The timestamp in UTC when the payment was last modified
  - `debit_notes` AdvanceDebitNote[] — A list with a single object to record a supplier advance (money paid before any bill exists). A matching debit note is auto-generated.
    - `amount` number, double, required — The advance amount in the payment currency. Must be greater than zero.
    - `debit_note_number` string, required — The number of the debit note auto-generated to back this supplier advance. Read-only field.
  - `employee` string — The unique identifier of the employee associated with this payment. Required for payslip payments.
  - `exchange_rate` number, double, nullable — The exchange rate to the organization base currency at the time of the payment.
  - `external_id` string — External identifier for the payment.
  - `id` string — The unique identifier of the payment. Read-only field.
  - `invoice_payments` InvoicePayment[] — A list of objects to represent invoice payments. Required if paying invoices.
    - `amount` number, double, required — The amount to pay off in the invoice currency. Must be greater than zero.
    - `amount_to_pcy` number, double, required — The amount in the payment currency. Must be greater than zero.
    - `created_ts` string, date-time, required — The timestamp in UTC when the payment was created
    - `invoice` string, required — The unique identifier of the invoice to be paid.
    - `modified_ts` string, date-time, required — The timestamp in UTC when the payment was last modified
  - `legacy_id` string — [Deprecated] The legacy identifier of the payment.
  - `modified_ts` string, date-time — The timestamp in UTC when the payment was last modified
  - `paid_through_account` string — The account used for this payment. Must be a valid payment account.
  - `payment_fees` number, double — The fees paid for this payment. If set, must be greater than zero.
  - `payment_fees_account` string, nullable — The account to categorize the payment fees. Required if payment_fees is set.
  - `payment_request` string — The unique identifier of the associated payment request. Read-only field.
  - `payment_type` string — The derived type of the payment (e.g. SUPPLIER_ADVANCE, CUSTOMER_ADVANCE, INVOICE, BILL). Read-only field.
  - `payslip_payments` PayslipPayment[] — A list of objects to represent payslip payments. Required if paying payslips.
    - `amount` number, double, required — The amount of the payment. Must be greater than zero.
    - `amount_to_pcy` number, double, required — The amount in the payment currency. Must be greater than zero.
    - `created_ts` string, date-time, required — The timestamp in UTC when the payment was created
    - `modified_ts` string, date-time, required — The timestamp in UTC when the payment was last modified
    - `payslip` string, required — The unique identifier of the payslip to be paid.
  - `project` string, nullable — The unique identifier of the project associated with this payment.
  - `reference` string

## Response `200`

- Payment — A ModelSerializer that takes additional arguments for "fields", "omit" and "expand" in order to control which fields are displayed, and whether to replace simple values with complex, nested serializations
  - `amount` number, double, required — The total amount of the payment including fees. Must be greater than zero.
  - `bill_payments` BillPayment[] — A list of objects to represent bill payments. Required if paying bills.
    - `amount` number, double, required — The amount of the payment. Must be greater than zero.
    - `amount_to_pcy` number, double, required — The amount in the payment currency. Must be greater than zero.
    - `bill` string, required — The unique identifier of the bill to be paid.
    - `created_ts` string, date-time, required — The timestamp in UTC when the payment was created
    - `modified_ts` string, date-time, required — The timestamp in UTC when the payment was last modified
  - `contact` string — The unique identifier of the contact associated with this payment.
  - `cost_center` string, nullable — The unique identifier of the cost center associated with this payment.
  - `created_ts` string, date-time, required — The timestamp in UTC when the payment was created
  - `credit_note_payments` CreditNotePayment[] — A list of objects to represent credit note payments. Required if applying credit notes.
    - `amount` number, double, required — The amount of the payment. Must be greater than zero.
    - `amount_to_pcy` number, double, required — The amount in the payment currency. Must be greater than zero.
    - `created_ts` string, date-time, required — The timestamp in UTC when the payment was created
    - `credit_note` string, required — The unique identifier of the credit note to be applied.
    - `modified_ts` string, date-time, required — The timestamp in UTC when the payment was last modified
  - `credit_notes` AdvanceCreditNote[] — A list with a single object to record a customer advance (money received before any invoice exists). A matching credit note is auto-generated.
    - `amount` number, double, required — The advance amount in the payment currency. Must be greater than zero.
    - `credit_note_number` string, required — The number of the credit note auto-generated to back this customer advance. Read-only field.
  - `currency` 'AED' | 'SAR' | 'USD' | 'EUR' | 'CAD' | 'AFN' | 'ALL' | 'AMD' | 'ARS' | 'AUD' | 'AZN' | 'BAM' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BND' | 'BOB' | 'BRL' | 'BWP' | 'BYN' | 'BZD' | 'CDF' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'GBP' | 'GEL' | 'GHS' | 'GNF' | 'GTQ' | 'HKD' | 'HNL' | 'HRK' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KHR' | 'KMF' | 'KRW' | 'KWD' | 'KZT' | 'LBP' | 'LKR' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MOP' | 'MUR' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SDG' | 'SEK' | 'SGD' | 'SOS' | 'SYP' | 'THB' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'UYU' | 'UZS' | 'VES' | 'VND' | 'XAF' | 'XOF' | 'YER' | 'ZAR' | 'ZMW', required — * `AED` - AED ⃱ * `SAR` - SAR ⃁ * `USD` - USD $ * `EUR` - EUR € * `CAD` - CAD $ * `AFN` - AFN ؋ * `ALL` - ALL Lek * `AMD` - AMD դր. * `ARS` - ARS $ * `AUD` - AUD $ * `...` Full information for [CurrencyEnum](currencyenum)
  - `date` string, date, required — The date when the payment was made or received.
  - `debit_note_payments` DebitNotePayment[] — A list of objects to represent debit note payments. Required if paying debit notes.
    - `amount` number, double, required — The amount of the payment. Must be greater than zero.
    - `amount_to_pcy` number, double, required — The amount in the payment currency. Must be greater than zero.
    - `created_ts` string, date-time, required — The timestamp in UTC when the payment was created
    - `debit_note` string, required — The unique identifier of the debit note to be paid.
    - `modified_ts` string, date-time, required — The timestamp in UTC when the payment was last modified
  - `debit_notes` AdvanceDebitNote[] — A list with a single object to record a supplier advance (money paid before any bill exists). A matching debit note is auto-generated.
    - `amount` number, double, required — The advance amount in the payment currency. Must be greater than zero.
    - `debit_note_number` string, required — The number of the debit note auto-generated to back this supplier advance. Read-only field.
  - `employee` string — The unique identifier of the employee associated with this payment. Required for payslip payments.
  - `exchange_rate` number, double, nullable — The exchange rate to the organization base currency at the time of the payment.
  - `external_id` string — External identifier for the payment.
  - `id` string, required — The unique identifier of the payment. Read-only field.
  - `invoice_payments` InvoicePayment[] — A list of objects to represent invoice payments. Required if paying invoices.
    - `amount` number, double, required — The amount to pay off in the invoice currency. Must be greater than zero.
    - `amount_to_pcy` number, double, required — The amount in the payment currency. Must be greater than zero.
    - `created_ts` string, date-time, required — The timestamp in UTC when the payment was created
    - `invoice` string, required — The unique identifier of the invoice to be paid.
    - `modified_ts` string, date-time, required — The timestamp in UTC when the payment was last modified
  - `legacy_id` string, required — [Deprecated] The legacy identifier of the payment.
  - `modified_ts` string, date-time, required — The timestamp in UTC when the payment was last modified
  - `paid_through_account` string, required — The account used for this payment. Must be a valid payment account.
  - `payment_fees` number, double — The fees paid for this payment. If set, must be greater than zero.
  - `payment_fees_account` string, nullable — The account to categorize the payment fees. Required if payment_fees is set.
  - `payment_request` string, required — The unique identifier of the associated payment request. Read-only field.
  - `payment_type` string, required — The derived type of the payment (e.g. SUPPLIER_ADVANCE, CUSTOMER_ADVANCE, INVOICE, BILL). Read-only field.
  - `payslip_payments` PayslipPayment[] — A list of objects to represent payslip payments. Required if paying payslips.
    - `amount` number, double, required — The amount of the payment. Must be greater than zero.
    - `amount_to_pcy` number, double, required — The amount in the payment currency. Must be greater than zero.
    - `created_ts` string, date-time, required — The timestamp in UTC when the payment was created
    - `modified_ts` string, date-time, required — The timestamp in UTC when the payment was last modified
    - `payslip` string, required — The unique identifier of the payslip to be paid.
  - `project` string, nullable — The unique identifier of the project associated with this payment.
  - `reference` string

---

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