Checking account statement
A monthly statement with wires, card purchases abroad and checks
- Template
- DOCX
- Export as
- PDF, DOCX, ODT, HTML, PNG +25 more
- Carbone
- 5.0+
Generate checking account statements from your core banking system
Banks, credit unions and fintech platforms send a periodic statement for every checking account: in the US, Regulation E requires one for each monthly cycle with an electronic transfer, and Regulation DD sets what it shows about interest and fees. The core banking system exports the month of the account as JSON, and the Carbone API returns the statement as a PDF, ready for online banking or a window envelope.
In this example, Larchmere Bank sends the September statement of a joint Premier Checking account: 49 transactions, including incoming and outgoing wires with their remittance text, ACH debits with the originator details, card purchases in euros with the exchange rate and a foreign transaction fee, and checks. These entries take one to four lines, so the template places them on each page according to their real height. The bank, the customers and the merchants are fictional, and every page is marked as a specimen.
In this example, you will:
- Summarize the month on page 1: balances, interest, fees and the error resolution notice
- Compute the running balance of each transaction
- Estimate the height of each transaction in points and group the transactions by page
- Print the page totals, the balance brought forward and the balance carried forward
- List the checks paid and the daily ending balance
What the statement shows
- Page 1: the account and the statement period, the address and telephone number for questions, the account summary (beginning balance, deposits and other credits, checks paid, withdrawals and other debits, fees, ending balance), the annual percentage yield earned, the interest earned, the number of days in the period, and the total overdraft fees and total returned item fees for the period and the year to date, as required by 12 CFR 1030.11.
- Account activity: for each transaction, the posting date, the type, the payee or payer with the city or the ATM location, the amount and the balance. Fees appear on their own lines.
- Account details: the checks paid, with a mark on a gap in the check sequence, and the ledger balance at the end of each day with activity.
- The error resolution notice of page 1 uses the model text for periodic statements of Regulation E, appendix A-3.
How to paginate transactions of variable height
1. Compute the running balance
Write the tags that prepare the data at the top of the template. They print nothing, so they can sit at the end of the Account summary heading:
{d.transactions[].amount:cumSum:add(d.openingBalance):set(.balance)}
{d.transactions[].balance:sub(.amount):set(.before)}:cumSum adds up the amounts of the previous transactions, and :set stores the balance after each transaction in a new balance field. The second tag stores the balance before the transaction, used for the balance brought forward.
2. Estimate the height of each transaction
In this layout, a transaction takes 18 points for its first line, plus 10 points for each line of details. The Description column holds about 52 characters of details per line:
{d.transactions[].details:len:div(52):ceil:mul(10):add(18):cumSum:set(.bottom)}- :len counts the characters of the details, :div and :ceil turn them into a number of lines, and :mul and :add turn the lines into points. A card purchase with empty details takes 18 points, a wire with its remittance text takes 48.
:cumSumadds up the heights, sobottomis the position of the end of each transaction from the start of the list.
3. Group the transactions by page
A page of account activity holds 565 points of transactions, below the table header and above the page totals. Divide the position by this height to get the page number, then group the transactions by page in a new pages array:
{d.transactions[].bottom:div(565):ceil:set(.page)}
{d.transactions[]:set(d.pages[id=.page].rows[])}Keep a margin of one long transaction in this height: a transaction that crosses the limit moves to the next page with the ones that follow.
4. Repeat a page for each group
- Write
{d.pages[i]}in the Account activity heading, which has the Page break before option, and{d.pages[i+1]}in the paragraph after the table. Carbone repeats the heading and the table for each page. - The first row prints the balance brought forward with the first transaction of the page:
{d.pages[i].rows[i=0].before:formatN(2)}. - The transaction row loops on
{d.pages[i].rows[i]}. The details sit in a second paragraph of the description cell, removed when they are empty:{d.pages[i].rows[i].details:ifEM:drop(p)}. The withdrawal and deposit columns show the amount without a sign, with an inline condition:{d.pages[i].rows[i].amount:ifLT(0):abs:formatN(2):elseShow('')}. - The page totals use array filters inside the aggregator:
{d.pages[i].rows[amount<0].amount:aggSum:abs:formatN(2)}. - The balance carried forward adds the totals of all the pages so far to the opening balance:
{d.pages[i].rows[].amount:aggSum:cumSum:add(...openingBalance):formatN(2)}.
5. Summarize the month
The account summary filters the transactions by sign and type, with the number of transactions in parentheses:
{d.transactions[amount>0].amount:aggCount}
{d.transactions[type=Check].amount:aggSum:abs:formatC}
{d.transactions[amount<0, type!=Check, type!=Fee].amount:aggSum:abs:formatC}
{d.transactions[].amount:aggSum:add(d.openingBalance):formatC}The checks paid loop on {d.transactions[i, type=Check].check}, and a gap field prints the asterisk: {d.transactions[i, type=Check].gap:ifEQ(true):show('*'):elseShow('')}. The daily ending balance groups the transactions by date with {d.transactions[]:set(d.days[id=.date].rows[])}, then prints {d.days[i].rows[].amount:aggSum:cumSum:add(...openingBalance):formatN(2)} for each day. The header and the footer hold the account, the period and the page number.
Related Examples
Trusted by 800+ paid customers in 40+ countries














