Sample Word Templates - Ready to Create
This guide provides 6 complete Word document templates that you can create in Microsoft Word and test immediately. Each template includes the exact content to type and sample test data.
Template 1: Simple Loan Agreement (Beginner Level)
Create in Word:
File Name: loan-agreement-simple.docx
Content to type in Word:
═══════════════════════════════════════════════════════════════════
LOAN AGREEMENT
═══════════════════════════════════════════════════════════════════
Agreement Number: {{agreementNumber}}
Date: {{agreementDate}}
BORROWER INFORMATION
─────────────────────────────────────────────────────────────────
Name: {{customerName}}
Customer ID: {{customerId}}
Email: {{email}}
Phone: {{phone}}
LOAN DETAILS
─────────────────────────────────────────────────────────────────
Loan Amount: ${{loanAmount}}
Interest Rate: {{interestRate}}% per annum
Loan Tenure: {{tenure}} months
Monthly Payment: ${{monthlyPayment}}
First Payment Date: {{firstPaymentDate}}
{{#if collateralRequired}}
COLLATERAL INFORMATION
─────────────────────────────────────────────────────────────────
Collateral Type: {{collateralType}}
Description: {{collateralDescription}}
Estimated Value: ${{collateralValue}}
{{/if}}
SIGNATURES
─────────────────────────────────────────────────────────────────
Borrower: ____________________ Date: ____________
Lender: ____________________ Date: ____________
Test Context Data:
{
"agreementNumber": "LA-2026-001234",
"agreementDate": "January 17, 2026",
"customerName": "John Michael Doe",
"customerId": "CUST-789456",
"email": "john.doe@email.com",
"phone": "+1 555-0123",
"loanAmount": "50,000.00",
"interestRate": "12.5",
"tenure": "24",
"monthlyPayment": "2,365.22",
"firstPaymentDate": "February 17, 2026",
"collateralRequired": true,
"collateralType": "Motor Vehicle",
"collateralDescription": "2020 Toyota Corolla, VIN: 1HGBH41JXMN109186",
"collateralValue": "18,500.00"
}
JavaScript to Test:
var testLoanAgreement = doCmd('DocumentRenderV2Command', {
Data: {
documentName: 'loan-agreement-simple',
context: JSON.stringify({
agreementNumber: "LA-2026-001234",
agreementDate: "January 17, 2026",
customerName: "John Michael Doe",
customerId: "CUST-789456",
email: "john.doe@email.com",
phone: "+1 555-0123",
loanAmount: "50,000.00",
interestRate: "12.5",
tenure: "24",
monthlyPayment: "2,365.22",
firstPaymentDate: "February 17, 2026",
collateralRequired: true,
collateralType: "Motor Vehicle",
collateralDescription: "2020 Toyota Corolla, VIN: 1HGBH41JXMN109186",
collateralValue: "18,500.00"
}),
isPdfOutput: false
}
});
console.log('Success:', testLoanAgreement.isSuccessful);
console.log('Message:', testLoanAgreement.message);
Template 2: Account Statement with Table (Intermediate Level)
Create in Word:
File Name: account-statement.docx
Content to type in Word:
═══════════════════════════════════════════════════════════════════
BankLingo Financial Services
123 Banking Street, Suite 100
Financial District, NY 10001
═══════════════════════════════════════════════════════════════════
ACCOUNT STATEMENT
Account Holder: {{customerName}}
Account Number: {{accountNumber}}
Account Type: {{accountType}}
Statement Period: {{periodStart}} to {{periodEnd}}
Statement Date: {{statementDate}}
─────────────────────────────────────────────────────────────────
SUMMARY
─────────────────────────────────────────────────────────────────
Opening Balance: ${{openingBalance}}
Total Credits: ${{totalCredits}}
Total Debits: ${{totalDebits}}
─────────────────────────────────────────────────────────────────
Closing Balance: ${{closingBalance}}
═══════════════════════════════════════════════════════════════════
TRANSACTION HISTORY
═══════════════════════════════════════════════════════════════════
Now create a TABLE with 5 columns and 4 rows:
| Date | Transaction ID | Description | Debit | Credit | Balance |
|---|---|---|---|---|---|
{{#transactions}} | |||||
{{date}} | {{transactionId}} | {{description}} | {{debit}} | {{credit}} | {{balance}} |
{{/transactions}} |
After the table, add:
═══════════════════════════════════════════════════════════════════
Questions? Contact us at: support@banklingo.com | +1 800-BANKING
This is a computer-generated statement and does not require a signature.
═══════════════════════════════════════════════════════════════════
Test Context Data:
{
"customerName": "Sarah Johnson",
"accountNumber": "ACC-8877665544",
"accountType": "Savings Account",
"periodStart": "December 1, 2025",
"periodEnd": "December 31, 2025",
"statementDate": "January 5, 2026",
"openingBalance": "5,250.00",
"totalCredits": "3,500.00",
"totalDebits": "1,200.00",
"closingBalance": "7,550.00",
"transactions": [
{
"date": "Dec 1, 2025",
"transactionId": "TXN-001",
"description": "Opening Balance",
"debit": "",
"credit": "",
"balance": "5,250.00"
},
{
"date": "Dec 5, 2025",
"transactionId": "TXN-002",
"description": "Salary Deposit",
"debit": "",
"credit": "3,000.00",
"balance": "8,250.00"
},
{
"date": "Dec 10, 2025",
"transactionId": "TXN-003",
"description": "Rent Payment",
"debit": "1,000.00",
"credit": "",
"balance": "7,250.00"
},
{
"date": "Dec 15, 2025",
"transactionId": "TXN-004",
"description": "Grocery Store",
"debit": "200.00",
"credit": "",
"balance": "7,050.00"
},
{
"date": "Dec 20, 2025",
"transactionId": "TXN-005",
"description": "Interest Credit",
"debit": "",
"credit": "500.00",
"balance": "7,550.00"
}
]
}
JavaScript to Test:
var testStatement = doCmd('DocumentRenderV2Command', {
Data: {
documentName: 'account-statement',
context: JSON.stringify({
customerName: "Sarah Johnson",
accountNumber: "ACC-8877665544",
accountType: "Savings Account",
periodStart: "December 1, 2025",
periodEnd: "December 31, 2025",
statementDate: "January 5, 2026",
openingBalance: "5,250.00",
totalCredits: "3,500.00",
totalDebits: "1,200.00",
closingBalance: "7,550.00",
transactions: [
{
date: "Dec 1, 2025",
transactionId: "TXN-001",
description: "Opening Balance",
debit: "",
credit: "",
balance: "5,250.00"
},
{
date: "Dec 5, 2025",
transactionId: "TXN-002",
description: "Salary Deposit",
debit: "",
credit: "3,000.00",
balance: "8,250.00"
},
{
date: "Dec 10, 2025",
transactionId: "TXN-003",
description: "Rent Payment",
debit: "1,000.00",
credit: "",
balance: "7,250.00"
},
{
date: "Dec 15, 2025",
transactionId: "TXN-004",
description: "Grocery Store",
debit: "200.00",
credit: "",
balance: "7,050.00"
},
{
date: "Dec 20, 2025",
transactionId: "TXN-005",
description: "Interest Credit",
debit: "",
credit: "500.00",
balance: "7,550.00"
}
]
}),
isPdfOutput: false
}
});
console.log('Generated:', testStatement.isSuccessful);
Template 3: Payment Schedule Table (Table Repetition)
Create in Word:
File Name: payment-schedule.docx
Content:
═══════════════════════════════════════════════════════════════════
LOAN REPAYMENT SCHEDULE
═══════════════════════════════════════════════════════════════════
Borrower: {{borrowerName}}
Loan Number: {{loanNumber}}
Loan Amount: ${{loanAmount}}
Interest Rate: {{interestRate}}%
Tenure: {{tenure}} months
═══════════════════════════════════════════════════════════════════
MONTHLY PAYMENT BREAKDOWN
═══════════════════════════════════════════════════════════════════
Create a TABLE with 6 columns:
| Payment No. | Due Date | Principal | Interest | Total Payment | Remaining Balance |
|---|---|---|---|---|---|
{{#schedule}} | |||||
{{paymentNumber}} | {{dueDate}} | ${{principal}} | ${{interest}} | {{totalPayment}} | ${{remainingBalance}} |
{{/schedule}} |
After table:
═══════════════════════════════════════════════════════════════════
Total Interest to be Paid: ${{totalInterest}}
Total Amount to be Repaid: ${{totalRepayment}}
Note: Payments are due on the date specified. Late payments will incur penalties.
═══════════════════════════════════════════════════════════════════
Test Context Data:
{
"borrowerName": "Michael Chen",
"loanNumber": "LOAN-2026-5678",
"loanAmount": "10,000.00",
"interestRate": "10.0",
"tenure": "6",
"totalInterest": "287.48",
"totalRepayment": "10,287.48",
"schedule": [
{
"paymentNumber": "1",
"dueDate": "Feb 17, 2026",
"principal": "1,619.02",
"interest": "83.33",
"totalPayment": "1,714.58",
"remainingBalance": "8,380.98"
},
{
"paymentNumber": "2",
"dueDate": "Mar 17, 2026",
"principal": "1,632.52",
"interest": "69.83",
"totalPayment": "1,714.58",
"remainingBalance": "6,748.46"
},
{
"paymentNumber": "3",
"dueDate": "Apr 17, 2026",
"principal": "1,646.13",
"interest": "56.23",
"totalPayment": "1,714.58",
"remainingBalance": "5,102.33"
},
{
"paymentNumber": "4",
"dueDate": "May 17, 2026",
"principal": "1,659.86",
"interest": "42.52",
"totalPayment": "1,714.58",
"remainingBalance": "3,442.47"
},
{
"paymentNumber": "5",
"dueDate": "Jun 17, 2026",
"principal": "1,673.71",
"interest": "28.69",
"totalPayment": "1,714.58",
"remainingBalance": "1,768.76"
},
{
"paymentNumber": "6",
"dueDate": "Jul 17, 2026",
"principal": "1,768.76",
"interest": "14.74",
"totalPayment": "1,714.58",
"remainingBalance": "0.00"
}
]
}
JavaScript to Test:
var testSchedule = doCmd('DocumentRenderV2Command', {
Data: {
documentName: 'payment-schedule',
context: JSON.stringify({
borrowerName: "Michael Chen",
loanNumber: "LOAN-2026-5678",
loanAmount: "10,000.00",
interestRate: "10.0",
tenure: "6",
totalInterest: "287.48",
totalRepayment: "10,287.48",
schedule: [
{
paymentNumber: "1",
dueDate: "Feb 17, 2026",
principal: "1,619.02",
interest: "83.33",
totalPayment: "1,714.58",
remainingBalance: "8,380.98"
},
{
paymentNumber: "2",
dueDate: "Mar 17, 2026",
principal: "1,632.52",
interest: "69.83",
totalPayment: "1,714.58",
remainingBalance: "6,748.46"
},
{
paymentNumber: "3",
dueDate: "Apr 17, 2026",
principal: "1,646.13",
interest: "56.23",
totalPayment: "1,714.58",
remainingBalance: "5,102.33"
},
{
paymentNumber: "4",
dueDate: "May 17, 2026",
principal: "1,659.86",
interest: "42.52",
totalPayment: "1,714.58",
remainingBalance: "3,442.47"
},
{
paymentNumber: "5",
dueDate: "Jun 17, 2026",
principal: "1,673.71",
interest: "28.69",
totalPayment: "1,714.58",
remainingBalance: "1,768.76"
},
{
paymentNumber: "6",
dueDate: "Jul 17, 2026",
principal: "1,768.76",
interest: "14.74",
totalPayment: "1,714.58",
remainingBalance: "0.00"
}
]
}),
isPdfOutput: false
}
});
Template 4: Collection Notice (Multiple Conditionals)
Create in Word:
File Name: collection-notice.docx
Content:
═══════════════════════════════════════════════════════════════════
COLLECTION NOTICE
*** URGENT - ACTION REQUIRED ***
═══════════════════════════════════════════════════════════════════
Notice Date: {{noticeDate}}
Notice Number: {{noticeNumber}}
TO: {{customerName}}
{{customerAddress}}
{{customerCity}}, {{customerState}} {{customerZip}}
RE: Overdue Payment - Account Number {{accountNumber}}
Dear {{customerName}},
Our records indicate that your account is past due. Please review the
details below and remit payment immediately.
ACCOUNT INFORMATION
─────────────────────────────────────────────────────────────────
Account Number: {{accountNumber}}
Loan Number: {{loanNumber}}
Original Due Date: {{originalDueDate}}
Days Past Due: {{daysPastDue}} days
AMOUNT BREAKDOWN
─────────────────────────────────────────────────────────────────
Overdue Principal: ${{overduePrincipal}}
Overdue Interest: ${{overdueInterest}}
Late Fees: ${{lateFees}}
─────────────────────────────────────────────────────────────────
TOTAL AMOUNT DUE: ${{totalAmountDue}}
PAYMENT DEADLINE: {{paymentDeadline}}
{{#if isSecondNotice}}
*** SECOND NOTICE ***
This is your second notice regarding this overdue payment. Immediate
action is required to avoid further collection activities.
{{/if}}
{{#if isFinalNotice}}
*** FINAL NOTICE ***
This is your FINAL NOTICE before we proceed with collection actions.
Your account will be referred to our legal department if payment is
not received by {{paymentDeadline}}.
{{/if}}
CONSEQUENCES OF NON-PAYMENT:
{{#if hasLegalAction}}
• Legal action may be initiated
• Additional legal fees will be added to your balance
{{/if}}
• Additional late fees will continue to accrue
• Negative impact on your credit score
• Account may be referred to collection agency
HOW TO PAY:
─────────────────────────────────────────────────────────────────
{{#each paymentMethods}}
Option {{index}}: {{method}}
{{details}}
{{/each}}
For payment arrangements or questions, please contact:
Collections Department
Phone: {{collectionsPhone}}
Email: {{collectionsEmail}}
Reference Number: {{noticeNumber}}
We strongly encourage you to contact us immediately to resolve this matter.
Sincerely,
Collections Department
BankLingo Financial Services
═══════════════════════════════════════════════════════════════════
Test Context Data (First Notice):
{
"noticeDate": "January 17, 2026",
"noticeNumber": "CN-2026-001",
"customerName": "Robert Williams",
"customerAddress": "456 Oak Avenue",
"customerCity": "Springfield",
"customerState": "IL",
"customerZip": "62701",
"accountNumber": "ACC-445566",
"loanNumber": "LOAN-2025-9999",
"originalDueDate": "December 15, 2025",
"daysPastDue": "33",
"overduePrincipal": "1,500.00",
"overdueInterest": "125.00",
"lateFees": "75.00",
"totalAmountDue": "1,700.00",
"paymentDeadline": "January 24, 2026",
"isSecondNotice": false,
"isFinalNotice": false,
"hasLegalAction": false,
"collectionsPhone": "+1 800-555-0199",
"collectionsEmail": "collections@banklingo.com",
"paymentMethods": [
{
"index": "1",
"method": "Online Payment",
"details": "Visit www.banklingo.com/payments"
},
{
"index": "2",
"method": "Phone Payment",
"details": "Call +1 800-555-0199 (available 24/7)"
},
{
"index": "3",
"method": "Bank Transfer",
"details": "Account: 1234567890, Routing: 987654321"
}
]
}
Test Context Data (Final Notice):
{
"noticeDate": "January 17, 2026",
"noticeNumber": "CN-2026-002-FINAL",
"customerName": "Robert Williams",
"customerAddress": "456 Oak Avenue",
"customerCity": "Springfield",
"customerState": "IL",
"customerZip": "62701",
"accountNumber": "ACC-445566",
"loanNumber": "LOAN-2025-9999",
"originalDueDate": "December 15, 2025",
"daysPastDue": "60",
"overduePrincipal": "3,000.00",
"overdueInterest": "250.00",
"lateFees": "200.00",
"totalAmountDue": "3,450.00",
"paymentDeadline": "January 24, 2026",
"isSecondNotice": false,
"isFinalNotice": true,
"hasLegalAction": true,
"collectionsPhone": "+1 800-555-0199",
"collectionsEmail": "collections@banklingo.com",
"paymentMethods": [
{
"index": "1",
"method": "Online Payment",
"details": "Visit www.banklingo.com/payments"
},
{
"index": "2",
"method": "Phone Payment",
"details": "Call +1 800-555-0199 (available 24/7)"
},
{
"index": "3",
"method": "Bank Transfer",
"details": "Account: 1234567890, Routing: 987654321"
}
]
}
JavaScript to Test (First Notice):
var testCollectionFirst = doCmd('DocumentRenderV2Command', {
Data: {
documentName: 'collection-notice',
context: JSON.stringify({
noticeDate: "January 17, 2026",
noticeNumber: "CN-2026-001",
customerName: "Robert Williams",
customerAddress: "456 Oak Avenue",
customerCity: "Springfield",
customerState: "IL",
customerZip: "62701",
accountNumber: "ACC-445566",
loanNumber: "LOAN-2025-9999",
originalDueDate: "December 15, 2025",
daysPastDue: "33",
overduePrincipal: "1,500.00",
overdueInterest: "125.00",
lateFees: "75.00",
totalAmountDue: "1,700.00",
paymentDeadline: "January 24, 2026",
isSecondNotice: false,
isFinalNotice: false,
hasLegalAction: false,
collectionsPhone: "+1 800-555-0199",
collectionsEmail: "collections@banklingo.com",
paymentMethods: [
{ index: "1", method: "Online Payment", details: "Visit www.banklingo.com/payments" },
{ index: "2", method: "Phone Payment", details: "Call +1 800-555-0199 (available 24/7)" },
{ index: "3", method: "Bank Transfer", details: "Account: 1234567890, Routing: 987654321" }
]
}),
isPdfOutput: false
}
});
Template 5: Certificate (Fancy Formatting)
Create in Word:
File Name: deposit-certificate.docx
Content (Use fancy fonts and borders):
[Add a decorative page border: Design → Page Borders → Art]
╔═══════════════════════════════════════════════════════════════╗
║ ║
║ 🏦 BankLingo Financial Services ║
║ ║
╚═══════════════════════════════════════════════════════════════╝
CERTIFICATE OF DEPOSIT
Certificate Number: {{certificateNumber}}
Issue Date: {{issueDate}}
This is to certify that
{{customerName}}
Customer ID: {{customerId}}
has deposited with BankLingo Financial Services
the sum of
${{depositAmount}}
under the following terms:
┌────────────────────────────┬──────────────────────────────────┐
│ Interest Rate │ {{interestRate}}% per annum │
├────────────────────────────┼──────────────────────────────────┤
│ Deposit Tenure │ {{tenure}} months │
├────────────────────────────┼──────────────────────────────────┤
│ Maturity Date │ {{maturityDate}} │
├────────────────────────────┼──────────────────────────────────┤
│ Maturity Amount │ ${{maturityAmount}} │
├────────────────────────────┼──────────────────────────────────┤
│ Early Withdrawal Penalty │ {{penaltyRate}}% │
└────────────────────────────┴──────────────────────────────────┘
{{#if autoRenewal}}
This certificate will automatically renew for another {{tenure}} months
at the prevailing interest rate unless written notice is received
30 days before maturity.
{{/if}}
{{#if isJoint}}
JOINT ACCOUNT HOLDERS:
{{#each jointHolders}}
• {{name}} (ID: {{id}})
{{/each}}
{{/if}}
Issued at: {{branchName}}
Branch Code: {{branchCode}}
_______________________________
Authorized Signatory
{{signatoryName}}
{{signatoryTitle}}
╔═══════════════════════════════════════════════════════════════╗
║ This is a valuable document. Please keep it in a safe place. ║
║ Present this certificate at maturity for redemption. ║
║ ║
║ For inquiries: {{contactPhone}} | {{contactEmail}} ║
╚═══════════════════════════════════════════════════════════════╝
Test Context Data (Single Holder):
{
"certificateNumber": "CD-2026-001122",
"issueDate": "January 17, 2026",
"customerName": "Emily Thompson",
"customerId": "CUST-998877",
"depositAmount": "25,000.00",
"interestRate": "5.5",
"tenure": "12",
"maturityDate": "January 17, 2027",
"maturityAmount": "26,375.00",
"penaltyRate": "2.0",
"autoRenewal": false,
"isJoint": false,
"branchName": "Downtown Branch",
"branchCode": "DTN-001",
"signatoryName": "James Anderson",
"signatoryTitle": "Branch Manager",
"contactPhone": "+1 800-555-0100",
"contactEmail": "support@banklingo.com"
}
Test Context Data (Joint Account):
{
"certificateNumber": "CD-2026-001123",
"issueDate": "January 17, 2026",
"customerName": "David and Maria Rodriguez",
"customerId": "CUST-556677",
"depositAmount": "50,000.00",
"interestRate": "6.0",
"tenure": "24",
"maturityDate": "January 17, 2028",
"maturityAmount": "56,180.00",
"penaltyRate": "2.5",
"autoRenewal": true,
"isJoint": true,
"jointHolders": [
{
"name": "David Rodriguez",
"id": "CUST-556677-A"
},
{
"name": "Maria Rodriguez",
"id": "CUST-556677-B"
}
],
"branchName": "Westside Branch",
"branchCode": "WST-005",
"signatoryName": "Patricia Lee",
"signatoryTitle": "Senior Manager",
"contactPhone": "+1 800-555-0100",
"contactEmail": "support@banklingo.com"
}
JavaScript to Test:
var testCertificate = doCmd('DocumentRenderV2Command', {
Data: {
documentName: 'deposit-certificate',
context: JSON.stringify({
certificateNumber: "CD-2026-001122",
issueDate: "January 17, 2026",
customerName: "Emily Thompson",
customerId: "CUST-998877",
depositAmount: "25,000.00",
interestRate: "5.5",
tenure: "12",
maturityDate: "January 17, 2027",
maturityAmount: "26,375.00",
penaltyRate: "2.0",
autoRenewal: false,
isJoint: false,
branchName: "Downtown Branch",
branchCode: "DTN-001",
signatoryName: "James Anderson",
signatoryTitle: "Branch Manager",
contactPhone: "+1 800-555-0100",
contactEmail: "support@banklingo.com"
}),
isPdfOutput: true // Generate as PDF
}
});
Template 6: Payment Receipt (Simple with Multiple Conditionals)
Create in Word:
File Name: payment-receipt.docx
Content:
═══════════════════════════════════════════════════════════════════
PAYMENT RECEIPT
═══════════════════════════════════════════════════════════════════
Receipt Number: {{receiptNumber}}
Receipt Date: {{receiptDate}}
Receipt Time: {{receiptTime}}
RECEIVED FROM
─────────────────────────────────────────────────────────────────
Name: {{customerName}}
Account Number: {{accountNumber}}
Customer ID: {{customerId}}
PAYMENT DETAILS
─────────────────────────────────────────────────────────────────
Payment Amount: ${{paymentAmount}}
Payment Method: {{paymentMethod}}
{{#if isCheck}}
Check Number: {{checkNumber}}
Bank Name: {{bankName}}
{{/if}}
{{#if isCash}}
Cash Received: ${{cashReceived}}
Change Given: ${{changeGiven}}
{{/if}}
{{#if isOnline}}
Transaction ID: {{transactionId}}
Payment Gateway: {{gateway}}
{{/if}}
Reference Number: {{referenceNumber}}
APPLIED TO
─────────────────────────────────────────────────────────────────
{{#if isLoanPayment}}
Loan Number: {{loanNumber}}
Payment Type: {{paymentType}}
Principal Paid: ${{principalPaid}}
Interest Paid: ${{interestPaid}}
{{/if}}
{{#if isAccountDeposit}}
Deposit Type: {{depositType}}
New Balance: ${{newBalance}}
{{/if}}
ACCOUNT STATUS AFTER PAYMENT
─────────────────────────────────────────────────────────────────
{{#if isLoanPayment}}
Remaining Loan Balance: ${{remainingBalance}}
Next Payment Due Date: {{nextDueDate}}
Next Payment Amount: ${{nextPaymentAmount}}
{{/if}}
{{#if isFullPayment}}
*** LOAN FULLY PAID ***
Your loan has been completely settled. Thank you!
{{/if}}
═══════════════════════════════════════════════════════════════════
Thank you for your payment!
Questions? Contact us at: support@banklingo.com | +1 800-BANKING
This is a computer-generated receipt and does not require a signature.
═══════════════════════════════════════════════════════════════════
Test Context Data (Loan Payment - Check):
{
"receiptNumber": "REC-2026-555444",
"receiptDate": "January 17, 2026",
"receiptTime": "10:35 AM",
"customerName": "Amanda Foster",
"accountNumber": "ACC-334455",
"customerId": "CUST-112233",
"paymentAmount": "1,500.00",
"paymentMethod": "Check",
"isCheck": true,
"isCash": false,
"isOnline": false,
"checkNumber": "2345",
"bankName": "First National Bank",
"referenceNumber": "REF-789456123",
"isLoanPayment": true,
"isAccountDeposit": false,
"loanNumber": "LOAN-2025-4321",
"paymentType": "Regular Monthly Payment",
"principalPaid": "1,250.00",
"interestPaid": "250.00",
"remainingBalance": "15,750.00",
"nextDueDate": "February 17, 2026",
"nextPaymentAmount": "1,500.00",
"isFullPayment": false
}
Test Context Data (Final Loan Payment - Online):
{
"receiptNumber": "REC-2026-555445",
"receiptDate": "January 17, 2026",
"receiptTime": "2:15 PM",
"customerName": "Kevin Martinez",
"accountNumber": "ACC-778899",
"customerId": "CUST-445566",
"paymentAmount": "2,125.50",
"paymentMethod": "Online Payment",
"isCheck": false,
"isCash": false,
"isOnline": true,
"transactionId": "TXN-WEB-998877665544",
"gateway": "BankLingo Payment Portal",
"referenceNumber": "REF-101010101",
"isLoanPayment": true,
"isAccountDeposit": false,
"loanNumber": "LOAN-2024-7890",
"paymentType": "Final Payment",
"principalPaid": "2,000.00",
"interestPaid": "125.50",
"remainingBalance": "0.00",
"nextDueDate": "N/A",
"nextPaymentAmount": "0.00",
"isFullPayment": true
}
Test Context Data (Cash Deposit):
{
"receiptNumber": "REC-2026-555446",
"receiptDate": "January 17, 2026",
"receiptTime": "4:45 PM",
"customerName": "Lisa Chang",
"accountNumber": "ACC-223344",
"customerId": "CUST-667788",
"paymentAmount": "500.00",
"paymentMethod": "Cash",
"isCheck": false,
"isCash": true,
"isOnline": false,
"cashReceived": "520.00",
"changeGiven": "20.00",
"referenceNumber": "REF-202020202",
"isLoanPayment": false,
"isAccountDeposit": true,
"depositType": "Savings Account Deposit",
"newBalance": "3,750.00",
"isFullPayment": false
}
JavaScript to Test (Loan Payment):
var testReceipt = doCmd('DocumentRenderV2Command', {
Data: {
documentName: 'payment-receipt',
context: JSON.stringify({
receiptNumber: "REC-2026-555444",
receiptDate: "January 17, 2026",
receiptTime: "10:35 AM",
customerName: "Amanda Foster",
accountNumber: "ACC-334455",
customerId: "CUST-112233",
paymentAmount: "1,500.00",
paymentMethod: "Check",
isCheck: true,
isCash: false,
isOnline: false,
checkNumber: "2345",
bankName: "First National Bank",
referenceNumber: "REF-789456123",
isLoanPayment: true,
isAccountDeposit: false,
loanNumber: "LOAN-2025-4321",
paymentType: "Regular Monthly Payment",
principalPaid: "1,250.00",
interestPaid: "250.00",
remainingBalance: "15,750.00",
nextDueDate: "February 17, 2026",
nextPaymentAmount: "1,500.00",
isFullPayment: false
}),
isPdfOutput: false
}
});
Summary of Templates
| # | Template Name | File Name | Features Demonstrated | Complexity |
|---|---|---|---|---|
| 1 | Simple Loan Agreement | loan-agreement-simple.docx | Basic variables, single conditional | Beginner |
| 2 | Account Statement | account-statement.docx | Table repetition, arrays | Intermediate |
| 3 | Payment Schedule | payment-schedule.docx | Complex table, calculations | Intermediate |
| 4 | Collection Notice | collection-notice.docx | Multiple conditionals, arrays | Advanced |
| 5 | Deposit Certificate | deposit-certificate.docx | Fancy formatting, nested conditionals | Advanced |
| 6 | Payment Receipt | payment-receipt.docx | Mutually exclusive conditionals | Advanced |
Quick Testing Script
Create a process or command chain to test all templates:
// Test all templates
var results = {
loanAgreement: null,
statement: null,
schedule: null,
collection: null,
certificate: null,
receipt: null
};
// Test 1: Loan Agreement
results.loanAgreement = doCmd('DocumentRenderV2Command', {
Data: {
documentName: 'loan-agreement-simple',
context: JSON.stringify({/* context from Template 1 */}),
isPdfOutput: false
}
});
// Test 2: Account Statement
results.statement = doCmd('DocumentRenderV2Command', {
Data: {
documentName: 'account-statement',
context: JSON.stringify({/* context from Template 2 */}),
isPdfOutput: false
}
});
// ... repeat for all templates
// Summary
var summary = {
totalTests: 6,
passed: 0,
failed: 0,
results: []
};
for (var key in results) {
if (results[key].isSuccessful) {
summary.passed++;
summary.results.push({
template: key,
status: 'SUCCESS',
message: results[key].message
});
} else {
summary.failed++;
summary.results.push({
template: key,
status: 'FAILED',
error: results[key].message
});
}
}
console.log('Test Summary:', summary);
return summary;
Next Steps
- Create each Word document by copying the content into Microsoft Word
- Format as desired (fonts, colors, borders)
- Save with the specified filename
- Upload to BankLingo using CreateDocumentTemplateDefinitiionCommand
- Test each template using the provided JavaScript code
- Verify output by downloading and opening the generated document
All test data is ready to copy-paste!