Papaya Pay · Nov 2024 – Apr 2025

Switching sponsor banks without a rewrite

Principal engineer; owned the shared payments library and ops tooling changes ← all work

Stack: PHP, Java / Spring Boot, Card-issuing API, ACH, Feature flags

  • Card issuing and ACH moved to the new bank across five services while the business kept running
  • An off switch for every money-moving path before any traffic moved
  • The old bank's code deleted afterward instead of left around just in case

A bill-pay platform moves money in a few different ways. We issue virtual cards to pay billers, we pull and push money over ACH, and we send refunds. All of that runs through a sponsor bank, and in late 2024 we needed to move to a new one.

We didn’t build a new payments layer for it. We changed the code we already had, one piece at a time across the five repositories that talked to the bank, in an order where we could stop at any point if something went wrong.

Off Switches First

The first changes I merged didn’t move anything to the new bank. They added ways to turn things off: debit and ACH transfers, the “transfer to us” option operators used, and virtual card creation for a specific card program. Each one was a flag the operations team could flip themselves without waiting on a deploy. If something went sideways in the middle of the night, someone could just turn it off instead of waiting on an engineer to wake up and write a hotfix.

Running Both Banks at Once

Our virtual card code assumed there was only ever one bank. I changed the shared payments library so card creation looked at the funding bank and account behind each bill, which let both banks’ card programs run side by side for a while instead of everything hinging on one cutover night. The webhooks that receive card events learned to verify signatures from both programs, and the Java payments API handled both until we shut off card creation on the old one.

Refunds

Refunds were the trickiest part. A payment made before the switch had to be refunded the same way it came in, and for some of them that wasn’t possible anymore because the merchant account behind them had changed. Those became credits instead of refunds, and the code made that call rather than leaving an operator to figure it out case by case.

Cleaning Up

Once the new bank was handling all of the card issuing and ACH refunds, I went back and deleted the old bank’s code from the payments library, the webhooks, and our admin tools. I don’t like leaving dead code paths around in anything that moves money. The next person to touch it has to figure out whether that code still matters, and guessing wrong in payments code is expensive. I don’t really think of a migration as done until the old code is gone.