Overview
Period closing locks past accounting periods by creating aPERIOD_CLOSE journal entry that transfers all income and expense account balances to retained earnings. This prevents modifications to closed periods and finalizes financial results.
Permission required:
periods:close (to close/undo periods), reports:read (to preview)Period closing is a critical accounting control that ensures financial records remain accurate and unchanged after review.API Endpoints
Close Period
Close the next unclosed accounting period:| Header | Type | Required | Description |
|---|---|---|---|
x-organization-id | string | Yes | Organization ID |
x-idempotency-key | string | Yes | Unique key to prevent duplicate closes |
Preview Period Close
Preview what will happen when period is closed:Undo Last Period Close
Reverse the most recent period close:| Header | Type | Required | Description |
|---|---|---|---|
x-organization-id | string | Yes | Organization ID |
x-idempotency-key | string | Yes | Unique key to prevent duplicate undo operations |
How Period Closing Works
1. Period Determination
First close (no prior periods closed):- Finds earliest transaction date (or organization creation date if no transactions)
- Determines period window containing that date
- That becomes the first period to close
- Finds last closed period’s end date
- Next period = period immediately following last closed period
- Automatic sequential closing
- Cannot close current period (period containing today’s date)
- Can only close completed past periods
2. Income & Expense Analysis
For the period being closed, the system:-
Finds all INCOME and EXPENSE account transactions
- Only POSTED journal entries
- Excludes PERIOD_CLOSE entries
- Date range: periodStart to periodEnd
-
Calculates net balance per account
-
Identifies non-zero accounts
- Skips accounts with zero net balance
- Only accounts with activity need closing entries
3. PERIOD_CLOSE Journal Entry
Creates journal entry withkind = 'PERIOD_CLOSE' that:
For INCOME accounts (normal credit balance):
- DEBIT the income account (zeros it out)
- CREDIT Retained Earnings (increases equity)
- CREDIT the expense account (zeros it out)
- DEBIT Retained Earnings (decreases equity)
- Interest Income balance: 0 (was 200,000)
- Operating Expenses balance: 0 (was 75,000)
- Retained Earnings balance: +125,000
4. Transaction Lock
After period close entry is posted: Cannot create/modify transactions with dates in closed period:- ❌ Cannot record deposits dated in closed month
- ❌ Cannot edit loans from closed period
- ❌ Cannot delete expenses from closed period
- ❌ Cannot create manual journal entries dated in closed period
- ❌ System validation error: “Transaction date in closed period”
- ✅ View historical transactions (read-only)
- ✅ Generate reports for closed periods
- ✅ Export data for audits
- ✅ See journal entries and balances
- ✅ Loan payments for loans originated in closed periods
- ✅ Reports can aggregate closed + open periods
Why Close Periods
Financial integrity:- Prevents retroactive changes to finalized records
- Creates immutable historical snapshots
- Ensures reports don’t change after distribution
- Transfers net income to retained earnings
- Prepares income/expense accounts for new period
- Resets temporary accounts to zero
- Demonstrates internal controls over financial records
- Provides clear period boundaries
- Establishes audit trail
- Peace of mind that past periods are final
- Prevents accidental backdating
- Stops fraudulent modifications
Accounting Period Types
Your organization’s accounting period is configured in settings:| Period Type | Frequency | Example Close Dates |
|---|---|---|
| MONTHLY | Every month | Jan 31, Feb 28, Mar 31… |
| QUARTERLY | Every 3 months | Mar 31, Jun 30, Sep 30, Dec 31 |
| YEARLY | Annually | Dec 31 (or fiscal year-end) |
Before Closing a Period
Closing Workflow
Recommended process:Example: Monthly Close
Scenario: Close June 2026 Timeline:| Date | Action |
|---|---|
| Jul 1 | Record last June transactions |
| Jul 2 | Reconcile June bank statements |
| Jul 3 | Run June trial balance (verify balanced) |
| Jul 3 | Preview period close: GET /period-closing/preview |
| Jul 4 | Generate June financial statements |
| Jul 4 | Review with treasurer, identify net income: 125,000 RWF |
| Jul 5 | Get board approval to close June |
| Jul 5 | Close June period: POST /period-closing/close |
| Jul 6+ | Continue July transactions normally |
- June period locked
- Interest income account zeroed out
- Operating expenses account zeroed out
- Retained earnings increased by 125,000 RWF (net income)
- Cannot modify June transactions anymore
Undoing a Period Close
When to undo:- Major error discovered after close (misposted transaction)
- Audit requires adjustment to closed period
- Bank reconciliation error found post-close
- Incorrect period closed by mistake
- ❗ Can ONLY undo the most recent period close
- ❗ Cannot undo arbitrary past periods (e.g., if June, July, August closed, can only undo August)
- ❗ To undo June, must first undo August, then July, then June
- Finds most recent PERIOD_CLOSE journal entry
- Marks it as REVERSED (status = ‘REVERSED’)
- Creates REVERSAL journal entry with opposite debits/credits
- Original: DEBIT Interest Income, CREDIT Retained Earnings
- Reversal: CREDIT Interest Income, DEBIT Retained Earnings
- Period reopens - can now modify transactions in that period
- Make necessary corrections
- Re-run all reports
- Get re-approval
- Close period again
Sequential Closing
Backend enforces sequential closing automatically: ✅ Correct sequence:- Close January
- Close February
- Close March
- Close April
- Close January → Close March (skipping February) ❌ NOT ALLOWED
- Financial statements build on prior periods
- Retained earnings balance carries forward
- Must finalize periods in chronological order
- If last closed = January 31, next close = February 1-28
- If no periods closed, next close = earliest transaction period
Year-End Closing
Additional considerations for fiscal year-end:
Note: Income and expense accounts reset to zero after each period close (monthly, quarterly, or yearly depending on your period type).
Common Errors
“No completed accounting period available to close” Cause: Current period (containing today’s date) cannot be closed. Solution: Wait until period ends. For monthly: wait until next month starts.“User is not part of this organization” Cause: Authenticated user doesn’t have organization membership. Solution: Verify user has organization access and correct
x-organization-id header.
“x-idempotency-key header is required” Cause: Missing idempotency key header. Solution: Add unique
x-idempotency-key to request:
“No closed period available to undo” Cause: Attempting to undo when no periods have been closed. Solution: Verify periods have been closed using preview endpoint.
“Last closed period has already been undone” Cause: Attempting to undo same period multiple times. Solution: Check if period already reopened. Cannot undo twice.
Best Practices
Period closing checklist:Timing:
- ✅ Close monthly within 7 days of month-end
- ✅ Don’t rush - complete all reconciliation first
- ✅ Schedule consistent close date (e.g., 5th of following month)
- ✅ Always preview before closing (use
/period-closing/preview) - ✅ Compare net income to Profit & Loss report
- ✅ Get second person to verify before closing
- ✅ Review validation warnings in preview response
- ✅ Document any unusual items before closing
- ✅ Maintain closing checklist (paper or digital)
- ✅ Note closing in board minutes (if required)
- ✅ Document reason if period undone
- ✅ Create database backup before closing each period
- ✅ Archive financial statements immediately after close
- ✅ Keep backups for 7+ years
- ✅ Use unique idempotency key for each close/undo
- ✅ Format:
period-close-YYYY-MM-DD-timestamp - ✅ Prevents accidental duplicate closes
- ✅ Only undo for critical errors
- ✅ Get management approval before undoing
- ✅ Document reason for undo in audit trail
- ✅ Re-close promptly after corrections
Troubleshooting
Q: Accidentally closed period too early (still have transactions to record) A: Undo immediately:Q: Need to record transaction dated in closed period A: Option 1 (if critical): Undo period, add transaction, re-close Option 2 (recommended): Record in current period with note:
Q: Audit requires changes to closed year A: If must change closed period:
- Undo periods sequentially back to target period
- Make auditor-approved adjustments
- Update all affected reports
- Re-close all periods
- Document in audit report
Q: How do I know which period will close? A: Call preview endpoint first:
periodStart and periodEnd of next period to close.
Q: Can I close periods out of order? A: No. Backend enforces sequential closing. Must close periods chronologically.
Q: What happens to INCOME/EXPENSE accounts after closing? A: They are zeroed out. Balance transfers to RETAINED_EARNINGS. Accounts reset for next period.
Q: Can I undo period close from 6 months ago? A: Only if no periods closed after it. Can only undo most recent period. To undo 6 months ago, must sequentially undo all periods closed since then.
Related Topics
Profit & Loss Report
View net income before closing
Balance Sheet
Verify retained earnings after close
Journal Entries
View PERIOD_CLOSE entries
Monthly Closing Checklist
Complete period-end procedures