selected work

StartupAI

Multi-tenant B2B lead-generation SaaS with subscription billing and an AI router

class
B2B lead-generation SaaS
state
on request
built with
Python · Flask · Celery · Redis · PostgreSQL · iyzico

A finished build, not hosted at present. Source is private; walkthrough on request.

StartupAI is a multi-tenant SaaS for finding and contacting B2B leads: users sign up into tiered plans, pay through iyzico, and run AI automations that are part of the product itself rather than a bolted-on chat widget. It is a finished build that is not hosted at present; the source is private, and a walkthrough is available on request.

the problem

Handling real payments safely is the actual constraint on a subscription SaaS: a billing flow has to survive retried requests, duplicate submissions and webhook redelivery without ever charging a customer twice or leaving a subscription in an inconsistent state. Background AI work also has to run without blocking the request that triggered it, which is why an async task queue sits behind the payment path rather than the AI calls happening inline.

how it is built

  • Multi-user accounts with subscription tiers.
  • iyzico payment integration: verified callbacks, automatic renewal, cancellation and refund flows.
  • Idempotency guards in front of the charge path, so a retried or duplicated request resolves to one charge, not two.
  • A multi-provider AI router with circuit breakers and daily token budgets, so one provider failing or one tenant overspending does not take the product down with it.
  • Waterfall email discovery and verification, sending through Gmail and Outlook OAuth, and a deliverability engine.
  • Celery workers with Redis as the broker for background work, decoupled from the request/response cycle.
  • PostgreSQL for durable state.
  • An admin panel for internal operations.
  • Built end to end by one person.

the hard parts

  • Payment callbacks are verified rather than trusted on arrival: iyzico's callback has to be authenticated and reconciled against local order state before a subscription is marked paid, or a spoofed or duplicated callback could unlock paid access for free.
  • Idempotency guards sit specifically in front of the charge path, so a retried request — a double-click, a client that timed out and retried, a redelivered webhook — resolves to the same outcome instead of a second charge.

Need something like this built?

Backend systems, payment and API integrations, AI pipelines, and the interfaces in front of them. Freelance or contract, remote.

emircan@emircancaglar.com