For AI agents: markdown of this page — /docs-content-en/entities/pay-systems/update.md documentation index — /llms.txt
Update a pay system
PATCH /v1/pay-systems/:id
Updates selected fields of a pay system. Send the fields directly in the JSON body, without a fields wrapper.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Parameterid (path) |
Typeinteger | Requiredyes | DescriptionPositive integer ID of the pay system. Source: GET /v1/pay-systems. |
Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
Fieldname |
Typestring | Requiredno | DescriptionNew pay system name. Must not be empty. |
FieldpersonTypeId |
Typeinteger | Requiredno | DescriptionPayer type ID from GET /v1/person-types. Must belong to the pay system's registry. |
FieldbxRestHandler |
Typestring | Requiredno | DescriptionHandler code from the code field returned by GET /v1/pay-systems/handlers. |
Fielddescription |
Typestring | Requiredno | DescriptionPay system description. |
Fieldactive |
Typestring | Requiredno | DescriptionActivity flag: Y for active, N for inactive. |
FieldnewWindow |
Typestring | Requiredno | DescriptionOpen the payment page in a new window: Y or N. |
FieldxmlId |
Typestring | Requiredno | DescriptionExternal ID. |
Fieldlogo |
Typearray | Requiredno | DescriptionLogo as [filename, base64]. Decoded file size must not exceed 2 MiB. |
Send a nonempty JSON object. Fields outside the table are rejected.
Examples
curl — personal key
curl -X PATCH "https://vibecode.bitrix24.com/v1/pay-systems/41" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Business invoice payment"
}'
curl — OAuth application
curl -X PATCH "https://vibecode.bitrix24.com/v1/pay-systems/41" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Business invoice payment"
}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/pay-systems/41', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Business invoice payment"
}),
})
const { success, data } = await res.json()
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/pay-systems/41', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Business invoice payment"
}),
})
const { success, data } = await res.json()
Response fields
HTTP 200. Returns the updated pay system.
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success. |
Fielddata |
Typeobject | DescriptionUpdated pay system. Full field reference: Pay system fields. |
Response example
Main fields are shown. Full field reference: Pay system fields.
{
"success": true,
"data": {
"id": 41,
"name": "Business invoice payment",
"actionFile": "my_payment_handler",
"newWindow": "N",
"active": "N",
"entityRegistryType": "ORDER",
"personTypeId": 5,
"xmlId": "invoice-20261014"
}
}
Error response example
400 — the request body contains the unsupported field unexpected:
{
"success": false,
"error": {
"code": "READONLY_FIELD",
"message": "Field 'unexpected' is not writable for this operation"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
Descriptionid is not a positive integer, a field has an invalid type, or the logo has an invalid format. |
| HTTP400 | CodeMISSING_REQUIRED_FIELDS |
DescriptionThe JSON body is empty or name is empty. |
| HTTP400 | CodeREADONLY_FIELD |
DescriptionThe body contains a field not supported by this operation. |
| HTTP413 | CodePAYLOAD_TOO_LARGE |
DescriptionThe decoded logo exceeds 2 MiB or the JSON body exceeds 3 MiB. |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionThe pay system was not found during the update or subsequent read. |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionInsufficient permissions, a built-in pay system, or the OAuth application does not own the handler. |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionA business error occurred. Details are in error.message. |
| HTTP502 | CodeBITRIX_RESPONSE_INVALID |
DescriptionThe response to the operation or subsequent read has an invalid structure. |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key lacks the pay_system scope. |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionThe key is restricted to read operations. |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe key has no configured Bitrix24 credentials. |
For common API errors, see Error codes.