[POST] .../v1/paymenttype/edit
Edits payment method. Use this method to update a payment method's display data, account linkage, availability or cash/non-cash behavior without changing historical payment records. It returns row_affected, requires a positive id and validates that a provided name does not exceed 150 characters before saving. The caller must have payment method edit permission; missing body, invalid id or field values, denied access, missing records, related-data restrictions and storage errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| account_id | Int64 | Optional | Account ID used by the payment method. |
| enabled | String | Optional | Payment method availability: true - available everywhere, frontoffice - available only at the cash register, backoffice - available only in BackOffice, false - unavailable. Allowed values: True, Frontoffice, Backoffice, False. |
| id | Int64 | Required | Payment method ID. |
| is_cash | Boolean | Optional | Indicates whether the payment is cash. |
| kkm_code | Int64 | Optional | Fiscal payment code. -1 means the payment is not registered in the cash register. |
| name | String | Optional | Payment method name. Maximum length is 150 characters. |
| shortkey | Int32 | Optional | Hotkey used for the payment method. |
Request Example
{
"id": 3,
"name": "Bank card terminal",
"account_id": 42,
"is_cash": false,
"kkm_code": 1,
"shortkey": 2,
"enabled": "True"
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Update | Update operation result. |
Response Example
{
"ok": true,
"result": {
"row_affected": 1
}
}