# Create Manual Adjustment Create a manual adjustment to correct ledger entries. Adjustment Types: - DISCOUNT_CORRECTION - Fix discount calculation error - FEE_CORRECTION - Adjust fee amount - CREDIT_MEMO - Issue credit to account - DEBIT_MEMO - Charge additional amount - WRITE_OFF - Bad debt write-off Authorization: Requires special permission level for manual adjustments. All adjustments include a full audit trail. Endpoint: POST /adjustments Version: 1.0.0 Security: OAuth2 ## Request fields (application/json): - `adjustmentType` (string, required) Type of adjustment Enum: "DISCOUNT_CORRECTION", "FEE_CORRECTION", "CREDIT_MEMO", "DEBIT_MEMO", "WRITE_OFF" - `accountId` (string) Account to adjust - `chargeId` (string) Related charge (optional) - `invoiceId` (string) Related invoice (optional) - `amount` (integer, required) Adjustment amount in cents - `reason` (string, required) Detailed reason for adjustment - `debitAccountCode` (string) Account code to debit - `creditAccountCode` (string) Account code to credit - `metadata` (object) Additional metadata for audit ## Response 201 fields (application/json): - `id` (string, required) - `entityId` (string, required) - `adjustmentType` (string, required) Enum: "DISCOUNT_CORRECTION", "FEE_CORRECTION", "CREDIT_MEMO", "DEBIT_MEMO", "WRITE_OFF" - `accountId` (string) - `chargeId` (string) - `invoiceId` (string) - `amount` (integer, required) - `reason` (string, required) - `adminUserId` (string, required) ID of admin who created the adjustment - `adminUserEmail` (string) Email of admin who created the adjustment - `status` (string, required) Enum: "PENDING", "APPROVED", "APPLIED", "REJECTED" - `journalEntryId` (string) Linked journal entry (if applied) - `debitAccountCode` (string) - `creditAccountCode` (string) - `approvedBy` (string) ID of admin who approved (if required) - `approvedAt` (string) - `appliedAt` (string) - `metadata` (object) - `optimisticLockVersion` (integer) Optimistic locking version (managed by Hibernate @Version). Prevents concurrent update conflicts. - `createdAt` (string, required) - `updatedAt` (string) ## Response 400 fields (application/json): - `result` (object, required) - `result.status` (string, required) Response status (always ERROR for error responses) Enum: "ERROR" - `error` (object, required) - `error.responseCode` (string, required) Response code (numeric or contains numbers, e.g., "404", "409", "500", "ERR001") Example: "404" - `error.responseMessage` (array, required) Array of error message strings for multiple error details Example: ["Charge not found","The requested charge ID does not exist in the system"] ## Response 401 fields (application/json): - `result` (object, required) - `result.status` (string, required) Response status (always ERROR for error responses) Enum: "ERROR" - `error` (object, required) - `error.responseCode` (string, required) Response code (numeric or contains numbers, e.g., "404", "409", "500", "ERR001") Example: "404" - `error.responseMessage` (array, required) Array of error message strings for multiple error details Example: ["Charge not found","The requested charge ID does not exist in the system"] ## Response 403 fields (application/json): - `result` (object, required) - `result.status` (string, required) Response status (always ERROR for error responses) Enum: "ERROR" - `error` (object, required) - `error.responseCode` (string, required) Response code (numeric or contains numbers, e.g., "404", "409", "500", "ERR001") Example: "404" - `error.responseMessage` (array, required) Array of error message strings for multiple error details Example: ["Charge not found","The requested charge ID does not exist in the system"]