Payment Systems & Backend Engineering

Multi-Chain Stablecoin Payment Gateway

An independent project exploring dependable payment workflows: server-controlled invoices, verification of on-chain transfers on Solana and EVM networks, idempotency and replay protection.

Independent engineering project. Built to explore reliable payment workflow design — not a commercial client engagement. It has not been independently security-audited and is not presented as a production payment service or as compliant with any financial regulation.

Illustrative interface — not a product screenshot

Overview

This independent project explores what it takes to accept payments dependably. Invoices are created and controlled by the server, every payment attempt is verified against the chain, and the workflow is designed so retries and duplicate submissions cannot produce inconsistent results.

Payment systems fail in subtle ways: a browser reports a payment that never settled, a request is retried and processed twice, or a valid transaction is replayed against a different invoice. The project treats each of these as a design requirement rather than an edge case.

The challenge

The engineering requirements the work had to satisfy:

  • Authenticate users and protect routes that manage invoices.
  • Keep invoice amounts, tokens and recipients under server control.
  • Record payment attempts and verify transactions on Solana and EVM networks.
  • Prevent duplicate processing and transaction replay.
  • Handle pending states so retries are always safe.

Role & contribution

  1. 01Designed and built the project independently, end to end.
  2. 02Implemented authentication, protected routes and server-controlled invoices.
  3. 03Built payment attempt tracking and transaction verification.
  4. 04Implemented invoice idempotency, nonce and replay protection, confirmation rules and retry-safe pending states.
  5. 05Verified network, token, recipient, amount and transaction identity before marking an invoice paid.

Technical architecture

  1. 01 Client

    • Next.js interface

      Authenticated invoice and payment views

  2. 02 Server

    • Protected server routes

      Invoices, attempts, verification

    • Idempotency + nonces

      Duplicate and replay protection

  3. 03 Data

    • SQLite

      Invoices, attempts and verification state

  4. 04 Networks

    • Solana

      Transaction lookup and confirmation

    • EVM networks

      Transaction lookup and confirmation

Simplified architecture overview — simplified for clarity; not a complete system diagram.

Key implemented features

  • Server-controlled invoices

    Amounts, tokens and recipients are set by the server and cannot be altered by the client.

  • Payment attempts

    Each attempt to pay is recorded and tracked through its lifecycle.

  • Transaction verification

    Network, token, recipient, amount and transaction identity are all checked before acceptance.

  • Idempotent invoices

    Repeated requests resolve to the same outcome instead of creating duplicates.

  • Nonce and replay protection

    A transaction cannot be reused to settle a different invoice.

  • Retry-safe pending states

    Unconfirmed payments wait in a pending state that can be re-checked safely.

Development approach

Never trust the client
The browser can report a transaction, but only server-side verification can mark an invoice paid.
Explicit state machine
Invoices move through defined states, with confirmation rules deciding when a payment is final.
Design for retries
Every step can be repeated without changing the result, so transient failures are recoverable.
Chain-agnostic checks
The same verification rules apply across Solana and EVM networks.

Technical stack

  • Next.js
  • TypeScript
  • SQLite
  • Solana
  • EVM integrations

Key engineering considerations

  • Idempotency

    Network failures and double-clicks are normal; the system must produce one outcome per invoice.

  • Replay resistance

    Binding transactions to invoices with nonces prevents one payment from settling twice.

  • Confirmation rules

    A transaction is only treated as final once it meets the configured confirmation criteria.

  • Honest limits

    As an independent project, it demonstrates design principles; it has not undergone external security review.

Next case studyStaridara Medicare

Ideas made dependable.

Want to discuss a similar project?

Tell us about the system you need. We will share how we would approach it and what a sensible first phase could look like.