Papaya Pay · 2023 – 2024

Digital Presentment: paying medical bills from a text message

Tech lead for partner integrations; front end, API and reminder engine ← all work

Stack: React, TypeScript, GraphQL, Java / Spring Boot, NestJS, Postgres, Redis, SMS

  • About 50,000 bills a month presented to patients
  • Built the patient-facing screens, the API that turns a statement into a payable bill, and the SMS reminder engine
  • Patient health information kept out of unverified requests and out of the consumer app's data

Healthcare billers send out statements, and a lot of patients never get around to them. Digital Presentment takes a biller’s statement file and turns each statement into a text message with a link. The patient taps it, confirms who they are, sees their bill, and pays it, all without installing anything. It now presents about 50,000 bills a month.

What I Worked On

I was the tech lead for our partner integrations, and I worked across the front end, the API, and the reminder engine.

On the front end, I built the verification, bill detail, line item, and payment screens in React and TypeScript on top of GraphQL. As partners came on board they kept asking for more, so I added things like partial-payment locks, redirects for patients with multiple bills, short links, and a “remind me later” experiment.

In the Java API, I wrote the mutation that turns a presented statement into a bill someone can actually pay. It fills in the invoice and patient details automatically, and it keeps patient health information out of our consumer photo-bill flow, which runs on the same backend.

The reminder engine is a NestJS service that schedules text reminders. I added cancel-on-payment using a change-stream watcher (so nobody gets reminded about a bill they already paid), one-time welcome messages, Redis deduplication so a patient never gets the same message twice, and a rate limiter so we stayed inside our SMS provider’s limits.

On the partner side, I was the technical point of contact for a healthcare billing partner’s integration, and I made the statement parser changes that brought on 171 of their provider payees in a few waves.

The Hard Parts

Healthcare has a couple of constraints most consumer products don’t. Patient data rules decide what’s allowed to show up in a URL, an API response, or a log. And every partner has its own statement format and its own idea of what “paid” means. Most of the engineering was getting one flow to work for all of them without forking it into a separate version for each partner.