Skip to main content
PATCH
/
stores
/
{storeId}
/
customers
/
{customerId}
/
balance
Update customer balance
curl --request PATCH \
  --url https://api.komerza.com/stores/{storeId}/customers/{customerId}/balance \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "newBalance": 1,
  "comment": "<string>"
}
'
{
  "success": true,
  "message": "<string>",
  "code": "<string>",
  "data": "<unknown>"
}

Authorizations

Authorization
string
header
required

Your API key goes here

Path Parameters

storeId
string<uuid>
required

The ID of the store.

customerId
string<uuid>
required

The ID of the customer whose balance to update.

Body

The form containing the new balance value.

Form used to update a customer's balance for a given store.

newBalance
number<currency>
required

The new balance to set for the customer. Must be zero or positive.

Required range: x >= 0
comment
string | null

Optional comment or reason for this balance update, for audit purposes.

Maximum string length: 256

Response

The object was successfully updated.

Represents a default generic response for API endpoints.

success
boolean
required

Indicates whether the operation or response was successful.

message
string | null

A descriptive message providing additional context or information about the response.

code
string | null

The error code (if there was an error) to use when referencing the error

data
any | null

The data object encapsulated within the response, representing the core output of the API operation