Gravity Payments: gift card processing backend rebuild

We replaced the client's gift card backend, running the old and new systems side by side during the move.

The old and new backends run side by side while the data moves across in batches. The new backend replays the latest transactions, then card processing switches over in a planned window at night.

Project snapshot

Client
Client logoPayment processor
Industry
Fintech: payment processing
Region
Seattle, USA
Duration
About 10 months
Team
3 people1 developer, 1 project manager, 1 QA
Budget
$10k–49k
Delivered
  • New gift card processing backend
  • Database schema design
  • Data migration
  • API integration
Key stack
  • Node.js
  • React
  • PostgreSQL
  • AWS Lambda

The client is a payment processor in Seattle, and Techuz rebuilt the server backend that processes its gift cards on Node.js, PostgreSQL and AWS. We replaced the old system with a new one and ran both side by side while the data moved across. The work took about 10 months, and processing time per transaction fell from 20 seconds to about 8.

The client: a payment processor with a gift card service

The client is a payment processing company based in Seattle. Gift cards are one of the services it runs, and every card and transaction goes through a server backend.

That backend is the part we rebuilt. Customers never see it, but every gift card payment depends on it.

The challenge: an old system that couldn't simply be switched off

The old backend was holding the client back.

The tricky part was the move. Gift cards and their transaction history had to reach the new system while the old one kept working.

Here's what the new backend had to get right:

  • Processing each transaction faster than the old system
  • Bringing every card and transaction across to the new database
  • Keeping card processing running during the move
  • Switching over in a planned window at night
  • Meeting the client's non-functional requirements

Key decisions and why we made them

Three choices shaped this project. We rebuilt instead of patching, ran both systems side by side during the migration, and chose a stack to fit the client's non-functional requirements.

The migration

  1. The old backend keeps processing
  2. Data moves to the new PostgreSQL database: In batches
  3. Transactions are replayed on the new backend
  4. Planned switch-over: At night
  5. The new backend takes over
  1. A rebuild, not another patch

    The easy option was to keep patching the old backend. We rebuilt it instead, with a new database schema, the structure that holds every card and transaction. We also built new APIs, the connections other systems use to reach the backend.

  2. Both systems side by side during the move

    We didn't switch over in one go. The old and new backends ran side by side while the data moved across.

    Here's how it works. We moved the data in batches. Then we replayed transactions on the new backend to bring it up to date, then switched over in a planned window at night.

  3. A stack chosen for the client's non-functional requirements

    Non-functional requirements describe how a system must behave, such as how fast and how reliably it runs, rather than what it does. The client had its own set, and we picked the stack to match.

    We built on Node.js, React and PostgreSQL, a relational database, on AWS. Parts of the system run on AWS Lambda, which runs code on demand with no servers for the client to manage.

What we built

We built a new server backend for gift card processing. It covers the database schema, the data migration from the old system and the API integrations that connect it. We also built the front end of its admin sections in React.

What the new backend gave the client

Faster gift card transactionsA rebuilt backend on Node.js and AWS
Every card and its history keptData migrated in batches into PostgreSQL
Connections for other systemsNew APIs
A system in a current languageNode.js in place of the old language
Parts of the system with no servers to manageAWS Lambda, serverless functions

How the project ran

The work covered schema design, the new backend, the API integrations and the data migration, and it closed with a planned switch-over at night.

The results

The new backend cut each transaction from 20 seconds to about 8. Gift cards and their transaction history moved across from the old system.

Processing time per transaction, down from 20 seconds
~8 sec
Gift cards moved to the new backend
4K+
Transactions moved
20K+

Source: Techuz project figures.

Tech stack

  1. Back end

  2. Admin front end

  3. Database

    • PostgreSQL
  4. Cloud

    • AWS
    • AWS Lambdaserverless

Questions about this project

  • Run the old and new systems side by side, and move the data in stages rather than all at once. For the client, we moved data in batches and replayed transactions on the new backend to bring it up to date. Then we switched over in a planned window at night.

  • Usually when the problems sit in the foundations: speed, an outdated language and code that's hard to change. A patch fixes one symptom at a time. That's why we rebuilt the client's gift card backend instead of patching it.

  • They describe how a system must behave, such as how fast and how reliably it runs, rather than which features it has. For the client, we chose Node.js, PostgreSQL and AWS Lambda because they suited the client's non-functional requirements.

Get a Ballpark Estimate for Your Project

Tell us what you're building. We reply within 24 hours and send a ballpark estimate within 48.

Tell us about your project

A few lines are enough. We reply within 24 hours.

By sending this form I confirm that I have read and accept the Privacy Policy