# Update a Charge

`PUT /lokta-lms/api/v1/charges/{chargeId}`

Updates the details of a Charge.

## Parameters
- `chargeId` (path, integer, required): chargeId

## Request body (application/json)
- `active` (boolean)
- `amount` (number)
- `capitalizable` (boolean)
- `capitalizeByDefault` (boolean)
- `chargeAppliesTo` (integer)
- `chargeCalculationType` (integer)
- `chargePaymentMode` (integer)
- `chargeTimeType` (integer)
- `code` (string)
- `currencyCode` (string)
- `eirClassification` (integer)
- `enablePaymentType` (boolean)
- `feeFrequency` (string)
- `feeInterval` (string)
- `feeOnMonthDay` (string)
- `locale` (string)
- `maxCap` (number)
- `minCap` (number)
- `monthDayFormat` (string)
- `name` (string)
- `paymentTypeId` (integer)
- `penalty` (boolean)
- `taxGroupId` (integer)

## Responses
- `200`: OK

## Response fields
- `changes` (PutChargesChargeIdRequest): PutChargesChargeIdRequest
- `resourceId` (integer)

## Example request (cURL)
```bash
curl -X PUT \
  'http://localhost:8080/lokta-lms/api/v1/charges/{chargeId}' \
  -u '{username}:{password}' \
  -H 'Tenant-Identifier: default' \
  -H 'Content-Type: application/json' \
  -d '{
  "active": true,
  "amount": 0,
  "capitalizable": true,
  "capitalizeByDefault": true,
  "chargeAppliesTo": 1,
  "chargeCalculationType": 1,
  "chargePaymentMode": 1,
  "chargeTimeType": 1,
  "code": "string",
  "currencyCode": "string"
}'
```

## Example response
```json
{
  "changes": {
    "active": true,
    "amount": 230.56,
    "chargeAppliesTo": 1,
    "chargeCalculationType": 1
  },
  "resourceId": 1
}
```

Interactive: https://developer.lokta.ai/reference.html#operation/updateCharge
