Featured Answer:
CityBase is a government utility billing and payment platform used by cities and municipalities to collect citizen payments for utilities, permits, and other services through online portals and payment kiosks. While CityBase provides web-based admin and kiosk management tools, the platform has limited or restricted API access. Browser automation helps automate utility billing and kiosk workflows, sync revenue data with city financial systems, and export kiosk and payment reporting.
Table of Contents
- Introduction
- Why Use Browser Automation for CityBase?
- Setting Up CityBase Automation
- Automating Utility Billing and Payment Kiosks
- Syncing Revenue Data with City Financial Systems
- Exporting Revenue Data for City Financials
- Exporting Kiosk and Payment Reporting
- Exporting Kiosk Summary by Period
- Syncing with External Systems
- Best Practices
- Resources
- Conclusion
Introduction
CityBase is a government utility billing and payment platform used by cities and municipalities to collect citizen payments for utilities, permits, and other services through online portals and payment kiosks. While CityBase provides web-based admin and kiosk management tools, the platform has limited or restricted API access for many government users. Browser automation provides a reliable solution to automate utility billing and payment kiosk workflows, sync revenue data with city financial systems, and export kiosk and payment reporting directly through the CityBase web interface, enabling streamlined citizen payments and fiscal compliance.
Why Use Browser Automation for CityBase?
- Limited API Access: CityBase has restricted or no API access for many government users and jurisdictions
- Utility Billing and Kiosks: Automate kiosk monitoring, payment batch retrieval, and utility billing workflows
- Revenue Sync: Sync revenue and transaction data from CityBase with city financial, ERP, or general ledger systems
- Kiosk and Payment Reporting: Export kiosk usage, payment volume, and revenue reports by kiosk, location, or period
- Batch Processing: Retrieve and process payment batches from kiosks and online channels for reconciliation
- Multi-Channel: Aggregate data from kiosks, web, and other payment channels for unified reporting
- Compliance and Audit: Produce transaction and kiosk documentation for auditors and oversight
- Dashboard-Only Features: Many admin and reporting views are only available through the web interface
Setting Up CityBase Automation
Here's how to automate CityBase workflows using browser automation:
import { chromium } from 'playwright';
const response = await fetch("https://api.anchorbrowser.io/api/sessions", {
method: "POST",
headers: {
"anchor-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
'headless': false,
'proxy': { 'type': 'residential', 'country': 'US' }
}),
});
const { id } = await response.json();
const connectionString = `wss://connect.anchorbrowser.io?apiKey=YOUR_API_KEY&sessionId=${id}`;
const browser = await chromium.connectOverCDP(connectionString);
const context = browser.contexts()[0];
const ai = context.serviceWorkers()[0];
const page = context.pages()[0];
await page.goto("https://admin.citybase.com/");
await ai.evaluate(JSON.stringify({
prompt: 'Log in to CityBase admin using the provided credentials. Complete any MFA or security verification and wait for the dashboard to load.'
}));
Automating Utility Billing and Payment Kiosks
Automate kiosk monitoring, payment batch retrieval, and utility billing workflows:
const automateUtilityBillingAndKiosks = async (page, ai, config) => {
const { action, kioskIds, dateRange } = config;
await ai.evaluate(JSON.stringify({
prompt: 'Navigate to the Kiosks, Payment Kiosks, or Utility Billing section in CityBase admin'
}));
if (action === 'batch') {
await ai.evaluate(JSON.stringify({
prompt: `Retrieve or export payment batches for date range ${dateRange.start} to ${dateRange.end}. Include kiosk ID, transaction count, total amount, and batch status. Export or download batch report.`
}));
} else if (action === 'kiosk_status') {
await ai.evaluate(JSON.stringify({
prompt: `View kiosk status for kiosks: ${kioskIds?.join(', ') || 'all'}. Export or extract status (online, offline, last transaction, cash level if shown).`
}));
} else if (action === 'transactions') {
await ai.evaluate(JSON.stringify({
prompt: `Export transactions for kiosks and/or online for date range ${dateRange.start} to ${dateRange.end}. Include transaction ID, kiosk/channel, amount, service type, date, status. Export as CSV or Excel.`
}));
}
const download = await page.waitForEvent('download', { timeout: 15000 }).catch(() => null);
return download ? await download.path() : null;
};
const getKioskPaymentSummary = async (page, ai, kioskId, dateRange) => {
await ai.evaluate(JSON.stringify({
prompt: `Navigate to kiosk ${kioskId} (or Kiosk Reports) and set date range ${dateRange.start} to ${dateRange.end}. Export or read payment summary: transaction count, total amount, by service type. Return or download.`
}));
const download = await page.waitForEvent('download').catch(() => null);
return download ? await download.path() : null;
};
Syncing Revenue Data with City Financial Systems
Export CityBase revenue and transaction data and sync with city financial, ERP, or general ledger:
const syncRevenueDataWithCityFinancials = async (page, ai, params) => {
const { dateRange, includeKiosk, fundCode } = params;
await ai.evaluate(JSON.stringify({
prompt: 'Navigate to the Revenue, Transactions, or Export section in CityBase admin'
}));
await ai.evaluate(JSON.stringify({
prompt: `Set date range from ${dateRange.start} to ${dateRange.end}. Include kiosk and online channels. Export revenue/transaction data including: transaction ID, date, amount, service type (utility, permit, etc.), payment method, kiosk/channel, status, fee, net amount, and any fund or department code. Export as CSV or Excel.`
}));
const download = await page.waitForEvent('download');
const exportPath = await download.path();
const transactions = await parseCSV(exportPath);
for (const txn of transactions) {
await postRevenueToCityFinancials(txn, fundCode);
await page.waitForTimeout(200);
}
return { exportPath, count: transactions.length };
};
Exporting Revenue Data for City Financials
Export revenue and transaction data in a format ready for city financial systems:
const exportRevenueForCityFinancials = async (page, ai, dateRange, format) => {
await ai.evaluate(JSON.stringify({
prompt: 'Navigate to the Revenue, Transactions, or Reports section in CityBase'
}));
await ai.evaluate(JSON.stringify({
prompt: `Export all completed transactions (kiosk and online) for date range ${dateRange.start} to ${dateRange.end}. Include: transaction ID, date, amount, fee, net, service type, payment method, kiosk/channel ID, status, and any GL or fund code. Export as ${format || 'CSV'} or Excel.`
}));
const download = await page.waitForEvent('download');
return await download.path();
};
Exporting Kiosk and Payment Reporting
Generate and export kiosk usage and payment reports by kiosk, location, or period:
const exportKioskAndPaymentReporting = async (page, ai, reportParams) => {
const { reportType, dateRange, kioskIds } = reportParams;
await ai.evaluate(JSON.stringify({
prompt: 'Navigate to the Reports, Kiosk Reports, or Payment Reports section in CityBase admin'
}));
await ai.evaluate(JSON.stringify({
prompt: `Select ${reportType} (Kiosk Summary, Payment Volume by Kiosk, Revenue by Channel, or Transaction Detail). Set date range from ${dateRange.start} to ${dateRange.end}. Filter by kiosk(s) if specified: ${kioskIds?.join(', ') || 'all'}.`
}));
await ai.evaluate(JSON.stringify({
prompt: 'Generate the report. Include: kiosk ID, location, transaction count, total amount, breakdown by service type, payment method, and any downtime or exception data. Export as Excel or PDF.'
}));
const download = await page.waitForEvent('download');
return await download.path();
};
Exporting Kiosk Summary by Period
Export kiosk and payment summary for a specific period:
const exportKioskSummaryByPeriod = async (page, ai, periodEnd, kioskId) => {
await ai.evaluate(JSON.stringify({
prompt: 'Navigate to the Kiosk Reports or Payment Reports section in CityBase'
}));
await ai.evaluate(JSON.stringify({
prompt: `Generate kiosk and payment report for period ending ${periodEnd}. Filter by kiosk ${kioskId || 'all'}. Include transaction count, revenue, breakdown by service and payment method. Export as Excel or CSV.`
}));
const download = await page.waitForEvent('download');
return await download.path();
};
Syncing with External Systems
Export revenue and kiosk data for city ERP, accounting, or reporting:
const syncToExternalSystem = async (page, ai, dataType) => {
await ai.evaluate(JSON.stringify({
prompt: 'Navigate to the Export or Reports section in CityBase admin'
}));
await ai.evaluate(JSON.stringify({
prompt: `Export ${dataType} (revenue, transactions, kiosk summary, or payment batches) in the format required for our city financial, ERP, or reporting system. Include all necessary fields for posting and reconciliation.`
}));
const download = await page.waitForEvent('download');
return await download.path();
};
Best Practices
- Security: Use secure credential storage and support MFA where required for CityBase admin; treat payment data as highly sensitive
- Rate Limiting: Add delays between requests (5–10 seconds) to avoid triggering rate limits or security flags
- Data Validation: Verify exported revenue and kiosk data before posting to city financial systems
- Error Handling: Implement retry logic for transient failures and session timeouts
- PCI and Privacy: Do not export or store full card numbers; ensure automation follows PCI and agency data handling rules
- Reconciliation Timing: Align revenue export and sync with city close cycles and kiosk settlement schedules
- Audit Trail: Log all automation actions and retain exports for audit and dispute resolution
- Session Management: Handle session timeouts and re-authentication for scheduled sync and report jobs
- Idempotency: When syncing to city financials, avoid double-posting by tracking which transactions have already been synced
Resources
- Anchor Browser Documentation - Complete API reference and guides
- Anchor Browser Playground - Try browser automation in your browser
Conclusion
Browser automation provides a flexible and reliable alternative to API access for CityBase utility billing and payment kiosk workflows. By leveraging intelligent browser agents, you can automate utility billing and payment kiosk operations, sync revenue data with city financial systems, and export kiosk and payment reporting—workflows that aren't easily achievable through manual processes or limited API access. Whether you need to monitor kiosks, post revenue to the general ledger, or run kiosk and payment reports, browser automation enables efficient citizen payment operations for governments using CityBase.
Start automating your CityBase workflows today and streamline your utility billing and kiosk reporting!