SafePay

Inspiration

Cross-border commerce has become easier than ever, but trust has not. Whether buying a product from another country, paying a freelancer, or completing a business transaction, both parties often face the same question: Who goes first? **

Existing escrow platforms can be expensive, limited to specific regions, or locked into a single payment provider. Many businesses and individuals also struggle to move money across different financial systems such as banks, mobile money, stablecoins, and cryptocurrencies.

We built SafePay to solve this problem by creating a programmable agreement and settlement platform that lets people define the terms of a transaction. At the same time, SafePay securely manages funding, settlement, and dispute resolution.

What it does

SafePay allows two or more parties to create programmable agreements that define how funds should move.

Funds are securely held until the agreed conditions are met, after which SafePay automatically settles the transaction using the most suitable payment provider.

The platform supports features such as:

  • Secure escrow
  • Milestone payments
  • Cross-border settlements
  • Fiat and cryptocurrency support
  • Intelligent payment routing
  • AI-assisted risk monitoring
  • AI-assisted dispute analysis
  • Develop APIs for businesses and marketplaces

Instead of being tied to a single payment network, SafePay is designed to orchestrate multiple providers behind one unified platform.

How we built it

SafePay is being built using a modular architecture that separates agreements, custody, settlement, routing, risk analysis, and provider integrations into independent services.

Our technology stack includes:

  • TypeScript
  • Node.js
  • PostgreSQL
  • React
  • Next.js
  • Cloudflare Workers
  • Flutterwave
  • Wise (planned)
  • Kotani Pay (planned)
  • TON Blockchain
  • OpenAI APIs for AI-assisted features

We focused heavily on creating a clean architecture that makes it easy to add new payment providers without changing the core business logic.

Challenges we ran into

The biggest challenge wasn't writing code. It was designing a system flexible enough to support many different payment flows while remaining simple to use.

Cross-border payments introduce challenges such as multiple currencies, provider availability, settlement timing, compliance requirements, and dispute handling. We spent significant time designing an architecture where these concerns remain isolated while the user experiences a single, seamless workflow.

Another challenge has been integrating with payment providers, each of which has different APIs, onboarding requirements, and sandbox environments.

Accomplishments that we're proud of

We're proud of building a strong architectural foundation that treats agreements as programmable financial contracts rather than simple escrow transactions.

Some highlights include:

  • A modular payment orchestration architecture
  • Intelligent provider routing
  • AI-assisted risk and dispute workflows
  • Support for milestone-based transactions
  • A design that can grow from escrow into a broader programmable settlement platform

Most importantly, we've turned an ambitious idea into a working platform that continues to evolve.

What we learned

Building financial infrastructure requires much more than software engineering.

We've learned the importance of designing for trust, auditability, security, extensibility, and regulatory considerations from the very beginning. We also learned that investing time in architecture early makes future expansion significantly easier.

AI also proved valuable beyond automation by helping improve risk analysis, payment routing decisions, and dispute support.

What's next for SafePay

Our roadmap includes:

  • Completing payment provider integrations
  • Expanding cross-border settlement support
  • Launching developer APIs
  • Introducing programmable payment automation
  • Enhancing AI-powered risk detection and dispute resolution
  • Supporting businesses, marketplaces, and AI agents through programmable financial agreements

Our long-term vision is for SafePay to become the infrastructure layer that enables trusted digital agreements and intelligent settlements anywhere in the world.

Share this project:

Updates

Submission history