How to Build Expense Management Software Like Expensify: Receipt Scanning, Policy Enforcement, and Real Costs
Building expense management software costs $120K-$280K and takes 12-24 weeks. Core: mobile OCR (Veryfi), policy engine, approval workflows, ERP sync. RaftLabs builds custom expense modules for SaaS platforms where Expensify connectors fall short.
Key Takeaways
- Core expense management (receipt capture, OCR, basic approval, reimbursement) costs $120K-$160K and takes 12-14 weeks.
- Veryfi API ($0.08/receipt) gives better accuracy than general OCR for receipts. Google Cloud Vision and AWS Textract ($1.50/1,000 images) miss receipt-specific fields like tax amount and payment method.
- The policy engine evaluates each expense on submit and flags violations. A policy flag never blocks submission. It flags for reviewer attention.
- Build custom when you need expense management as a feature inside a larger finance or HR platform, or when you have ERP integration requirements Expensify's connectors do not support.
- For mileage, use Google Maps Distance Matrix API. For per diem, store GSA rates (US) or HMRC rates (UK) and compute based on destination and day count.
Building expense management software costs $120,000-$280,000 and takes 12-24 weeks. The core system has five moving parts: mobile receipt capture with OCR, a configurable policy engine, multi-level approval workflows, mileage and per diem calculations, and ERP integration for accounting sync and reimbursement.
According to Gartner's 2024 Finance & Accounting Market Guide, the average enterprise spends 1.3% of revenue on T&E (travel and expense) processing. For a $50M business, that's $650K per year. Manual expense processing costs companies $26.63 per report on average, versus $6.85 when automated, according to GBTA Foundation research. At 1,000 expense reports per month, manual processing costs $319,560 more per year than automated.
"The ROI case for expense automation isn't about software cost. It's about the policy enforcement gap. Manual expense review catches roughly 20% of policy violations. Automated policy engines catch over 90%. The difference shows up in year-end spend analysis as unrecoverable leakage." -- Brian Kalish, Executive Director, Finance & Treasury at APQC, speaking at the AFP Annual Conference 2023
Most companies should use Expensify ($5-$9/user/month) or Ramp (free for card users). Build custom when expense management belongs inside a larger product, when your ERP integration requirements exceed what Expensify's connectors support, or when you serve an industry with compliance requirements that off-the-shelf tools don't address.
The expense lifecycle
Every expense goes through the same steps. The employee photographs a receipt. OCR extracts the merchant, amount, date, currency, and payment method. The employee confirms the data and submits. The policy engine checks the expense against company rules. The expense routes to the right approver based on amount, department, and category. The approver reviews and approves or rejects. Finance runs reimbursement via payroll or direct deposit.
Each step has variations by company policy. The architecture must support those variations without requiring code changes.
Receipt capture and OCR
Levvel Research found that 79% of organizations still rely on paper receipts for at least some expense categories, and that manual data entry from those receipts is the single biggest source of errors in expense workflows. The fix is OCR. But not all OCR is equal for receipt data.
The core UX is photo capture on mobile. The user opens the app, photographs the receipt, and the system extracts the data. This sounds simple. The OCR step is where most teams underestimate the work.
The pipeline runs like this:
- User captures the receipt photo on mobile
- Image uploads to S3
- OCR service processes the image
- Extracted data returns: merchant name, total amount, tax amount, date, currency, payment method
- User reviews and corrects any errors
- Corrected expense submits to the approval queue
OCR options: Google Cloud Vision API and AWS Textract both charge $1.50/1,000 images. Both were built for general document OCR. They work, but they miss receipt-specific fields. Veryfi API charges $0.08/receipt and was built specifically for receipts. It understands receipt structure. It extracts tax breakdowns, tip amounts, and payment method in ways general OCR misses. At 500 employees submitting 10 receipts per month each, Veryfi costs $400/month. That's worth it for the accuracy improvement.
After extraction, the user sees a pre-filled form. They correct any errors and submit. This confirmation step is not optional. OCR accuracy is never 100%.
Policy engine
Companies set expense policies. Maximum meal amounts ($75 for dinner, $25 for lunch). Categories (travel, meals, office supplies). Receipt thresholds (required above $25). Pre-approval requirements (amounts over $500 need manager sign-off before the employee spends). Country-specific per diem rates.
The policy engine evaluates each expense on submit. It checks every rule and flags violations. A policy flag does not block submission. It attaches a flag to the expense so the reviewer sees it.
This distinction matters. If you block flagged expenses, employees call the help desk. If you pass them through with flags, reviewers catch the issues during normal approval. Finance teams prefer the second approach.
Policies are configurable rules stored in the database. They are not hardcoded. An admin sets the rules. The engine reads them at evaluation time.
A policy rule has four parts: the condition (expense category equals "meals"), the threshold (amount greater than $75), the scope (applies to all employees in the US), and the action (flag with message "Exceeds meal limit").
Approval workflows
Simple approval chains have two steps: manager approves, then finance approves. Complex chains add levels based on amount and department.
A real example from a mid-market company: submit to direct manager, then cost center manager if the expense exceeds $500, then department VP if it exceeds $1,000, then CFO if it exceeds $5,000, then finance for payment processing.
Build the workflow as a configurable chain. Each step has: the approver role, the condition for escalation to the next step, and a timeout action (auto-approve after 5 days, or auto-escalate to the next approver).
Each approver sees a queue. For each expense: the employee name, expense category, amount, date, merchant, receipt image, policy flags, and any prior approver comments. One button to approve. One to reject with a required comment.
Approval notifications go out via email. Include a direct approve/reject link in the email so approvers can act without logging in. This reduces approval cycle time significantly.
Mileage and per diem
Mileage claims work differently from receipt-based expenses. The employee enters a start address and end address. The app calls Google Maps Distance Matrix API to calculate the driving distance. The system multiplies the distance by the company's per-mile reimbursement rate. In the US, the IRS standard rate is $0.67/mile for 2024. The employee submits the claim. No receipt required.
Per diem is a daily allowance for meals and incidentals during business travel. The employee enters the travel destination and the number of days. The system applies the appropriate per diem rate. In the US, GSA publishes per diem rates by city. In the UK, HMRC publishes subsistence rates. Store these rate tables in your database and update them annually.
Per diem is entered as a day count, not as individual receipts. This is the entire point of per diem: eliminate the burden of tracking every meal receipt during travel.
Multi-currency and FX
Employees who travel internationally submit expenses in local currency. The system must store both the original currency and amount, and the converted amount at the exchange rate on the expense date.
Use Open Exchange Rates API or Fixer.io for daily historical rates. Both have free tiers for daily rates. Call the API when the expense is submitted to get the rate for the expense date.
Store: original amount, original currency, exchange rate, converted amount, reimbursement currency. Always use the rate on the date the expense occurred. Do not convert at reimbursement time using a current rate.
Corporate card reconciliation
Employees with company cards (Visa, Amex corporate, Ramp) do not enter every expense manually. The card provider sends transaction data via a bank feed or API.
For Amex corporate cards, use the Amex @Work API. For Ramp cards, use Ramp's API. Transactions appear in the app automatically. The employee matches transactions to receipts, confirms the category, and submits. Unmatched transactions after 30 days flag for review.
This flow reverses the standard flow. Instead of the employee initiating, the transaction arrives from the card provider. The employee's job is to categorize and attach receipts, not to enter amounts.
ERP and payroll integration
Approved expenses must flow to accounting. ERP integration is where most custom builds earn their cost.
QuickBooks Online: Use the QBO API to push expense reports as bills or journal entries. Standard connector. Well-documented.
Xero: Use the Xero API. Similar to QBO in complexity.
NetSuite: Use SuiteQL and the NetSuite REST API. More complex. NetSuite's data model requires mapping expense categories to subsidiary-specific chart of accounts.
SAP: Use iDOC or the SAP REST API. The most complex integration. Large enterprises often have custom SAP configurations.
For reimbursement, you have two options. Export to payroll (ADP, Paychex, or Gusto payroll API) so expenses are included in the next payroll run. Or direct ACH via Stripe or Plaid for same-week reimbursement outside the payroll cycle.
Expensify's connectors have real limits here. Their QuickBooks and Xero connectors work for standard setups. When you have a custom NetSuite configuration, a multi-subsidiary SAP setup, or a proprietary ERP, you need a custom integration layer.
Tech stack
Mobile: React Native for receipt capture
Web dashboard: React (employee portal, approver queue, finance dashboard)
Backend: Node.js
Database: PostgreSQL
File storage: AWS S3 (receipt images)
OCR: Veryfi API
Mileage: Google Maps Distance Matrix API
FX rates: Open Exchange Rates API
Reimbursement: Stripe (ACH), or payroll API (ADP/Gusto)
Accounting sync: QBO API, Xero API, NetSuite REST API
Job queue: BullMQ (approval notification jobs, payment processing)
Cost and timeline
Core expense management (receipt capture, OCR, basic approval, reimbursement export): $120,000-$160,000, 12-14 weeks.
This covers: mobile receipt capture, Veryfi OCR integration, a two-step approval workflow, policy flag engine with basic rules, CSV/QBO export, and direct ACH reimbursement via Stripe.
Full platform (everything above plus corporate card reconciliation, multi-currency, ERP integrations, per diem, configurable policy engine, mileage, admin dashboard): $200,000-$280,000, 18-24 weeks.
The cost difference comes from ERP integration complexity. A NetSuite or SAP integration alone takes 4-6 weeks.
Build vs. buy
Use Expensify ($5-$9/user/month, up to $18/user/month for enterprise) when expense management is a standalone need. For 500 employees, Expensify costs $30,000-$108,000/year. That is well below the cost of building.
Use Ramp or Brex (free for card users) when your employees use company cards and you want zero cost. Both include built-in expense management for cardholders.
Use Concur ($8-$12/user/month) for enterprise-scale deployments with complex travel policy requirements.
Build custom when:
You need expense management as a feature inside a larger finance or HR platform. You cannot ask your customers to log into Expensify separately from your product.
You have ERP integration requirements that Expensify's connectors cannot support. Custom NetSuite subsidiaries, SAP with non-standard configurations, or proprietary ERP systems.
You serve government contractors with FAR/DFARS compliance requirements. These require specific audit trails and cost accounting standards that general expense tools do not support.
You operate in markets where Expensify is not available or practical (specific countries, highly regulated industries, public sector).
See how to build an app like QuickBooks for context on how the accounting layer connects to expense data.
For most finance SaaS startups, the decision is straightforward: if expense management is the core product, build it. If it is one feature among many in a vertical platform, build a custom module. If your users just need to track expenses, point them to Expensify or Ramp.
The builds that justify custom expense management are industry-specific platforms (construction job costing, healthcare practice management, law firm billing) where the expense data feeds directly into job cost reports, matter billing, or compliance documentation that the platform already owns.
RaftLabs has shipped finance modules for healthcare practice management platforms, construction job-costing tools, and HR SaaS products in exactly these contexts. The consistent pattern: the client built their core product on a third-party expense tool, hit a wall when their ERP or compliance requirement exceeded the tool's connectors, and then needed a custom build that should have been planned from the start. If your platform has reached the point where Expensify's limitations are blocking product value, it is time to scope a custom build. Start with MVP development to validate the core workflow before building the full platform. See our SaaS application development service for how the accounting layer typically connects to expense data.
Frequently asked questions
- Core expense management (receipt capture, OCR, basic approval workflows, reimbursement) costs $120,000-$160,000 and takes 12-14 weeks. A full platform with corporate card reconciliation, multi-currency, ERP integrations, per diem, and a configurable policy engine costs $200,000-$280,000 over 18-24 weeks.
- Veryfi API is the best choice for receipts specifically. It understands receipt structure and extracts merchant name, total, tax, date, currency, and payment method with higher accuracy than general OCR. It costs $0.08/receipt. Google Cloud Vision and AWS Textract both charge $1.50/1,000 images but were built for general document OCR, not receipts.
- Store the original currency and amount alongside the converted amount at the exchange rate on the expense date. Use Open Exchange Rates API or Fixer.io for daily FX rates. Reimburse in the employee's home currency. Never convert at the time of reimbursement using a current rate. Always use the rate on the date the expense occurred.
- Approval workflows are configurable chains with condition-based escalation. A simple chain: employee submits, manager approves, finance approves, reimbursement runs. A complex chain adds cost center manager approval, VP approval above $1,000, and CFO approval above $5,000. Build the workflow as a configurable rule set stored in the database, not hardcoded logic.
- Build when: you need expense management as a feature inside a vertical SaaS product (not as a standalone tool), you have ERP integration requirements Expensify's connectors do not support, you serve government contractors with FAR/DFARS compliance requirements, or you operate in markets where Expensify is unavailable or impractical.
Ask an AI
Get an instant summary of this post from your preferred AI assistant.
Related articles

How to build appliance repair and home service dispatch software
Appliance repair businesses lose customers on the second visit. A technician drives to a job, diagnoses the problem, and the part is not on the van. The customer waits 5 days. Here is how to build the software that fixes that, and everything else that makes or breaks a repair dispatch operation.

How to Build an App Like Donorbox: Nonprofit Donation Management
A nonprofit raising $1M/year pays $15,000 to Donorbox. A hospital foundation raising $5M/year pays $18,000 and loses control of its donor data. Here's what it costs to build your own, and what you actually get for the money.

How to Build an App Like Buildium: Tenant Management, Lease Tracking, and Real Costs for PropTech Founders
Buildium charges up to $460/month. A 200-unit portfolio manager pays $1,500-$5,500 per year. Custom property management software pays back in 2-3 years. Here is exactly how to build it.
