# Create/Define a Charge

`POST /lokta-lms/api/v1/charges`

Define a new charge that can later be associated with loans and savings through their respective product definitions or directly on each account instance.

## 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
- `resourceId` (integer)

## Example request (cURL)
```bash
curl -X POST \
  'http://localhost:8080/lokta-lms/api/v1/charges' \
  -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
{
  "resourceId": 1
}
```

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