Inspiration

If you're pipe bursts at night and you call a plumber who doesn't pick up, you'll probably just call the next company on Google. For small owner-operator businesses, that's one more job they could have gotten but missed. When they do answer, the owner also faces a risk: wake a technician and dispatch a truck at 2 AM to someone who might cancel or a job that might not even be worth charging for. Reading a card number aloud doesn't fix it: 77% of people don't want to read their card to a phone agent (Eckoh, 2025), least of all to an AI at night.

AI receptionists book appointments. Nobody secures the visit before the truck rolls. That's the gap for the 107,004 US plumbing and HVAC companies with employees, 78% of them with fewer than 10 people (US Census, 2022).

What Call Captain does

Ava answers the after-hours line: a real phone number, a "Talk to us now" button on the contractor's website, or the browser.

  1. Safety first. She walks the caller to the water shutoff and keeps them away from water near outlets. A gas smell means leave the house and call 911, and no dispatch.
  2. Triage and service area. Name, address and ZIP, the problem, a callback number. The ZIP is checked against the owner's service area (counties) in code.
  3. An arrival time first. "Marcus can be there in 20 to 30 minutes. Does that work?", estimated from the technician's starting ZIP to the caller's ZIP.
  4. Secured with PayPal while they're still on the line. "Can we get a card on file?" Nothing is charged tonight; it's free to cancel until the technician heads out, and after that only the $79 trip fee, which goes toward the bill. A secure PayPal form on the caller's screen saves PayPal, Venmo or a card with PayPal Vault, $0. On a phone call, the caller types the card on the keypad and the server saves it to PayPal Vault. The AI never hears or sees a card number. Owners who want money reserved can choose a $149 PayPal hold instead (authorized now, captured after the job).
  5. Live confirmation. The moment PayPal confirms, the server injects a notice into the live conversation and Ava says "You're all set" on her own.
  6. Dispatch by phone. Ava phones the on-call technician, briefs him, and he accepts by voice. The homeowner hears "Marcus just confirmed, about 20 minutes." If he can't make it, the visit goes back to secured (no trip fee) and the owner is alerted. No texting needed.
  7. On site, the customer approves the final bill on their own phone (QR code or the tech's phone), and only then is the card on file charged. With a hold, PayPal captures the bill from it and releases the rest, or applies the hold and the rest is paid right there with PayPal, Venmo or Pay Later. The approval is recorded with time and device.
  8. Fair cancellations. Free until the technician heads out; after that only the $79 trip fee is charged to the card on file (or kept from the hold).
  9. The owner's command center. A live Jobs grid and a PayPal payments ledger (AG Grid), an AI overnight briefing with who to call back, one-click refunds, and push alerts on their phone from the installable app.
  10. Set up in minutes. Paste your website and the AI fills in services, service area, fees, policies and FAQs; describe your area in plain words and it's mapped to counties; pick a voice and languages (Ava switches languages mid-call); forward your after-hours line; add the call button to your website with one line of code.

How we built it

PayPal (sandbox) runs every money moment.

  • Vault v3 setup tokens → JS SDK v6 save button (PayPal, Venmo) or Card Fields → payment tokens: card on file, $0, saved on the caller's screen mid-call (the default).
  • Vault v3 setup token with the card from SignalWire's secure keypad collector → payment token: card on file on a phone call.
  • Vaulted, merchant-initiated charges (stored_credential) only after the customer's on-screen approval, and for the trip fee after a late cancellation.
  • The owner's alternative, a hold: Orders v2 AUTHORIZE → JS SDK v6 buttons (PayPal, Venmo, guest card) → authorize; on a phone call, Orders v2 with payment_source.card from the keypad.
  • Authorization capture (partial capture releases the rest), void, and a partial capture for the trip fee.
  • Orders v2 CAPTURE with Pay Later for the balance above the hold.
  • Refunds across captures.
  • Webhooks verified with verify-webhook-signature, which reconcile anything that happens outside the browser (a caller who closes the tab right after approving a hold still gets it, and Ava still confirms).
  • PayPal-Request-Id on every write, and a ledger keyed by PayPal id so retries and webhooks can't double count.

AI

  • Voice agent: SignalWire AI (SWML, gpt-4.1-mini, Cartesia voices, multilingual). Its tools are the only way it can touch money or dispatch. Business rules live in code, not in the prompt: the server refuses to dispatch until PayPal confirms the card or hold, refuses to secure visits outside the service area, and never accepts spoken card numbers.
  • Agentic commerce with guardrails: the agent starts real payment flows mid-conversation, gets PayPal's result pushed back into the live call, phones a second party with its own AI session, and a human approves the final charge.
  • After each call: a structured ticket for the technician.
  • AI SDK + Vercel AI Gateway: website → agent settings and knowledge; plain-words service area → Census counties; the overnight briefing (numbers computed in code; the AI writes the sentences and picks who to call back).

App: Next.js 16 on Vercel, Neon Postgres, AG Grid Community (Jobs and the payments ledger: live tabs, flashing cells during calls, pinned totals, CSV export, saved layouts), Web Push and an installable app, per-visitor workspaces with signed access tokens so every judge gets a private business.

Challenges we ran into

  • Card data in a voice call. Browser calls can't use the phone keypad hand-off (it drops WebRTC calls), so browser callers use PayPal's own buttons and Card Fields while phone callers use a secure keypad. The AI never sees a card either way.
  • Telling a live AI something it didn't hear. PayPal approvals happen on the caller's screen, outside the conversation; we inject a system notice into the live call so Ava reacts within a second.
  • Two calls at once. Dispatching by phone means a second AI session with the technician that reports back into the caller's session, with honest fallbacks when he declines, doesn't answer, or reaches voicemail.
  • No texting. US texting needs carrier registration that takes weeks, so dispatch is a phone call, owner alerts are push notifications, and the customer approves and pays on their own screen.

Accomplishments that we're proud of

  • An AI that moves money responsibly: nothing charged tonight (a card on file, or a hold); dispatch gated on PayPal in code; the customer approves the final bill on their own device before it's charged.
  • The whole night, end to end, on a real phone line: answer, triage, card on file, dispatch by phone, finish on site, get paid, reconcile.
  • A product an owner could set up from their website in minutes.

What we learned

Homeowners expect to pay after the job, and contractors need to know the visit is covered. A card on file with PayPal Vault gives both: $0 tonight, a trip fee only for a late cancellation, and the bill charged only once the customer approves it. For owners who want money reserved, PayPal's authorize-now, capture-later hold does the same job, and Pay Later turns a surprise $1,800 water heater into something a homeowner can say yes to at 2 AM.

What's next for Call Captain

  • PayPal Commerce Platform onboarding so each contractor is paid directly into their own PayPal business account, with a per-visit platform fee.
  • Text messages once A2P 10DLC registration clears.
  • Multiple technicians, on-call schedules and live arrival times from the technician's phone.

Sources

Built With

  • ag-grid
  • ai-agents
  • neon
  • next.js
  • openai
  • paypal
  • paypal-js-sdk
  • paypal-orders-api
  • paypal-pay-later
  • paypal-vault
  • paypal-webhooks
  • postgresql
  • pwa
  • react
  • signalwire
  • tailwindcss
  • typescript
  • venmo
  • vercel
  • vercel-ai-gateway
  • vercel-ai-sdk
  • web-push
Share this project:

Updates

Submission history