# Create a loan charge or deactivate overdue charges

`POST /lokta-lms/api/v1/loans/{loanId}/charges`

Creates a Loan Charge | Deactivate overdue Loan Charges

## Parameters
- `loanId` (path, integer, required): loanId
- `command` (query, string): command

## Request body (application/json)
- `amount` (number)
- `chargeId` (integer)
- `dateFormat` (string)
- `dueDate` (string)
- `externalId` (string)
- `locale` (string)

## Responses
- `200`: OK

## Response fields
- `clientId` (integer)
- `loanId` (integer)
- `officeId` (integer)
- `resourceExternalId` (string)
- `resourceId` (integer)

## Example request (cURL)
```bash
curl -X POST \
  'https://default.lokta.tech/lokta-lms/api/v1/loans/{loanId}/charges' \
  -u '{username}:{password}' \
  -H 'Tenant-Identifier: default' \
  -H 'Content-Type: application/json' \
  -d '{
  "amount": 100,
  "chargeId": 2,
  "dateFormat": "dd MMMM yyyy",
  "dueDate": "29 April 2013",
  "externalId": "786444UUUYYH7",
  "locale": "en"
}'
```

## Example response
```json
{
  "clientId": 1,
  "loanId": 1,
  "officeId": 1,
  "resourceExternalId": "95174ff9-1a75-4d72-a413-6f9b1cb988b7"
}
```

Interactive: https://developer.lokta.ai/reference#operation/createOrPayLoanCharge
