---
title: "PUT /api/app/sales/payment"
method: PUT
path: "/api/app/sales/payment"
tags: ["Sales"]
---

# PUT /api/app/sales/payment

`PUT /api/app/sales/payment`

## Request

- Base URL: `https://api.khaasfood.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.khaasfood.com/api/app/sales/payment`
- Auth: OAuth 2
  - Authorization code: `https://api.khaasfood.com/connect/authorize`
  - Token URL: `https://api.khaasfood.com/connect/token`

## Request body

- KhaasFoodSalesDTOsProductSaleCreateUpdateDto
  - `id` string, uuid, nullable
  - `orderNumber` string, nullable
  - `givenAmount` number, double
  - `overallDiscountPercentage` number, double
  - `overallDiscountAmount` number, double
  - `totalDiscountAmount` number, double
  - `totalAmount` number, double
  - `paidAmount` number, double
  - `dueAmount` number, double
  - `changeAmount` number, double
  - `payableAmount` number, double
  - `deliveryCharge` number, double
  - `redeemedPoint` integer
  - `redeemedAmount` number, double
  - `deliveryDate` string, date-time
  - `deliveryDates` string[], nullable
  - `remarks` string, nullable
  - `customerNote` string, nullable
  - `warehouseId` string, uuid
  - `orderState` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
  - `saleFrom` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14
  - `saleChannel` 0 | 1 | 2 | 3 | 4 | 5
  - `saleType` 0 | 1 | 2 | 3 | 4 | 5 | 6
  - `dealerId` string, uuid, nullable
  - `distributorId` string, uuid, nullable
  - `deliveryAddress` KhaasFoodSalesDTOsProductSaleCustomerAddressDto
    - `addressId` string, uuid, nullable
    - `addressName` string, nullable
    - `isHome` boolean
    - `isOffice` boolean
    - `contactName` string, nullable
    - `contactPhone` string, nullable
    - `streetAddress` string, nullable
    - `district` string, nullable
    - `country` string, nullable
    - `thana` string, nullable
    - `postCode` string, nullable
    - `area` string, nullable
    - `specialNote` string, nullable
    - `isSaveAble` boolean
    - `isShowInMobile` boolean
  - `billingAddress` KhaasFoodSalesDTOsProductSaleCustomerAddressDto
    - `addressId` string, uuid, nullable
    - `addressName` string, nullable
    - `isHome` boolean
    - `isOffice` boolean
    - `contactName` string, nullable
    - `contactPhone` string, nullable
    - `streetAddress` string, nullable
    - `district` string, nullable
    - `country` string, nullable
    - `thana` string, nullable
    - `postCode` string, nullable
    - `area` string, nullable
    - `specialNote` string, nullable
    - `isSaveAble` boolean
    - `isShowInMobile` boolean
  - `customer` KhaasFoodSalesDTOsProductSaleCustomerDto
    - `customerId` string, uuid, nullable
    - `name` string, nullable
    - `phone` string, nullable
    - `isRestrictRedeem` boolean
    - `isOverMaxOrderLimitPerMonth` boolean
    - `kamUserName` string, nullable
  - `payments` KhaasFoodSalesDTOsProductSalePaymentDto[], nullable
    - `id` string, uuid, nullable
    - `walletId` string, uuid
    - `amount` number, double
    - `transactionNumber` string, nullable
    - `remarks` string, nullable
    - `isSaleReturnPayment` boolean, nullable
    - `returnSaleId` string, uuid, nullable
  - `lineItems` KhaasFoodSalesDTOsProductSaleLineItemDto[], nullable
    - `id` string, uuid, nullable
    - `productDetailId` string, uuid
    - `productDetailName` string, nullable
    - `unitPrice` number, double
    - `quantity` number, double
    - `demandQuantity` number, double, nullable
    - `discountPercentage` number, double
    - `discountPerUnit` number, double
    - `maxQuantityForDiscount` number, double, nullable
    - `discountTotal` number, double
    - `totalPrice` number, double
    - `type` 1 | 2 | 3 | 4 | 5
    - `isSaleable` boolean, nullable
    - `isCollapsed` boolean
  - `appliedCouponCode` string, nullable
  - `isUseReferralReward` boolean
  - `usedReferralRewardAmount` number, double
  - `saleReturnTagIds` string[], nullable
  - `returnReason` 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
  - `returnNote` string, nullable
  - `isReturn` boolean
  - `creationTime` string, date-time
  - `removedLineItems` KhaasFoodSalesDTOsRemovedSaleLineItemDto[], nullable
    - `saleDetailId` string, uuid
    - `reason` 1 | 2 | 3
  - `deletedSkus` KhaasFoodSalesDTOsSaleDetailDeleteLogDto[], nullable
    - `id` string, uuid
    - `productDetailId` string, uuid
    - `productName` string, nullable
    - `quantity` number, double
    - `salePricePerUnit` number, double
    - `reason` 1 | 2 | 3
    - `reasonText` string, nullable
    - `deletedAt` string, date-time
    - `deletedBy` string, nullable
  - `isDemandOrder` boolean

## Response `200`

Success

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `500`: Server Error
- `501`: Server Error

## Changes

> 11 revisions in range; 1 not diffed.

- **2026-11-01** `664d574d3e4d`: 16 info
  - added the new optional request property `billingAddress/isHome` (media type: application/json-patch+json)
  - added the new optional request property `billingAddress/isHome` (media type: application/json)
  - added the new optional request property `billingAddress/isHome` (media type: text/json)
  - added the new optional request property `billingAddress/isHome` (media type: application/*+json)
  - …12 more
- **2026-10-07** `89e4afdc079d`: 12 info
  - added the new optional request property `creationTime` (media type: application/json-patch+json)
  - added the new optional request property `creationTime` (media type: application/json)
  - added the new optional request property `creationTime` (media type: text/json)
  - added the new optional request property `creationTime` (media type: application/*+json)
  - …8 more

[Operation history](https://skmtc.dev/khaasfood/apis/khaasfood-api/changes/api/app/sales/payment/put.md)

---

[API](https://skmtc.dev/khaasfood/apis/khaasfood-api.md) - [All operations](https://skmtc.dev/khaasfood/apis/khaasfood-api/llms.txt) - [OpenAPI document](https://skmtc.dev/khaasfood/apis/khaasfood-api/revisions/149b6034bea9?raw)
