Building an In-House ID Confidence Detection System

How we replaced an expensive vendor with Gemini 2.0 and AWS Rekognition, saving $90k monthly while improving accuracy and compliance.

$90k
Monthly savings
85%
Accuracy improvement
500ms
Processing time
100%
Age verification coverage

At Majority, we were paying a vendor over $90k monthly for document verification services that weren't meeting our needs. The system was slow, expensive, and struggled with the diverse ID formats from our global user base. Building an in house solution seemed risky, but the results exceeded expectations.

Sometimes the best vendor is the one you build yourself. Especially when existing solutions don't fit your specific use case.

The Vendor Problem

Third party ID verification services work well for standard use cases, but fintech companies often have unique requirements. Our vendor struggled with:

  • Non US documents and varying ID formats
  • High false positive rates on legitimate documents
  • Slow processing times affecting user experience
  • Limited customization for our specific compliance needs
  • Escalating costs as our user base grew

Build vs Buy Decision

Build in house when vendor solutions don't fit your core business requirements, costs are escalating rapidly, or you need full control over the system.

The Gemini 2.0 Approach

We leveraged Google's Gemini 2.0 for document authenticity analysis. The model excels at understanding document structure, detecting inconsistencies, and generating confidence scores for various document types. Key advantages:

  • Handles multiple languages and document formats
  • Learns from our specific user patterns
  • Provides detailed confidence scoring
  • Continuously improves with more data

Age Verification with AWS Rekognition

Compliance requires us to verify users are 18+. AWS Rekognition's facial analysis API provides age estimates that we use to flag potentially underage users for manual review. This creates a safety net for compliance while maintaining user experience.

Compliance Strategy

Use ML for initial screening, but always have human review for edge cases. Err on the side of caution for regulatory requirements.

System Architecture

Our solution combines multiple services for comprehensive document verification:

  • Document Processing: Gemini 2.0 analyzes document authenticity and extracts key information
  • Face Analysis: AWS Rekognition estimates age and matches photo to selfie
  • Confidence Scoring: Combined algorithms generate overall confidence scores
  • Decision Engine: Business rules determine approval, rejection, or manual review

Implementation Challenges

Building an in house system wasn't without obstacles:

  • Data Quality: Training models required clean, diverse datasets
  • Edge Cases: Handling unusual document types and edge cases
  • Compliance: Ensuring the system meets all regulatory requirements
  • Performance: Maintaining speed while improving accuracy

Key Success Factors

  • Start Simple: Begin with basic document verification, then add complexity
  • Measure Everything: Track accuracy, speed, and user impact continuously
  • Human Oversight: Always include manual review for high risk cases
  • Iterative Improvement: Use real data to continuously refine the system

Business Impact

The financial benefits were immediate, but the strategic advantages were even more valuable:

  • $90k monthly cost savings with better performance
  • Faster processing improving user onboarding experience
  • Better accuracy reducing false positives and user friction
  • Full control over compliance and customization
  • Valuable IP and expertise for future products

The real value isn't just cost savings—it's gaining control over a critical business function and building competitive advantages.

When to Build In House

Consider building your own solution when:

  • Vendor costs are growing faster than your revenue
  • Existing solutions don't fit your specific requirements
  • You have the technical expertise and resources
  • The functionality is core to your business advantage
  • Regulatory requirements need custom handling

Lessons Learned

  • Start with a minimum viable system and iterate quickly
  • Invest heavily in monitoring and quality assurance
  • Plan for regulatory audits from the beginning
  • Build with scale in mind—design for 10x growth
  • Document everything for compliance and knowledge transfer

Building in house ID verification was one of our best strategic decisions. It saved money, improved performance, and gave us complete control over a critical business function. Sometimes the best solution is the one you build yourself.