DEV Community

Daniel Ioni
Daniel Ioni

Posted on

Building a Non-Custodial Bitcoin Payment Verifier with Node.js and Electrum

Accepting Bitcoin is easy.

Verifying that a payment really happened — without turning your web application into a wallet — is the more interesting engineering problem.

While building the monetization layer for Zorgax, part of the open-source MyZubster ecosystem, we wanted a strict security boundary:

The application may verify a payment, but it must never need a seed phrase or private key and must never sign a transaction.

This article explains the architecture we built around Node.js and Electrum.

The problem

Imagine a subscription checkout.

The backend creates an order for a user:

  • plan: Zorgax Pro
  • price: EUR-denominated
  • asset: BTC
  • destination: a configured Bitcoin receiving address
  • expected BTC amount: calculated from a trusted server-side quote

The user then sends Bitcoin.

At this point, we must answer a deceptively simple question:

Did the expected transaction actually pay the expected amount to the expected address?

We cannot trust a browser request saying:


json
{
  "paid": true
}

That makes the system slightly more boring.

For payment infrastructure, boring is a feature.


Ho volutamente scritto **“implementation is still evolving”** e indicato il payment-intent persistente come passo successivo: evita di presentare il sistema come production-ready prima del test end-to-end.

Per DEV è già nel formato corretto: il front matter è supportato ufficialmente, i tag sono limitati a quattro e gli URL GitHub possono essere incorporati tramite Liquid/embed. :contentReference[oaicite:1]{index=1}

Come cover userei una grafica **16:9/1000×420** con: `Browser → Zorgax → BTC Verifier → Electrum → Bitcoin`, e sotto una linea separata `Private keys / signing: outside the application`. DEV raccomanda 1000×420 per la cover. :contentReference[oaicite:2]{index=2} 
## Explore the MyZubster Marketplace

The payment-verification work is part of a broader experiment: connecting a multichain economic layer to the MyZubster Marketplace and Metaverse.

The Marketplace supports the economic interaction layer around:

- BTC
- ETH
- XMR
- TARI
- MYZ
- barter
- free exchanges

The key principle remains the same:

> The Marketplace coordinates economic activity, but it does not need custody of users' private keys.

### Links

🌍 **MyZubster**
https://www.myzubster.com/

🛒 **MyZubster Marketplace repository**
https://github.com/MyZubster-Ecosystem/MyZubster-Marketplace

🧩 **Marketplace implementation in the core platform**
https://github.com/MyZubster-Ecosystem/myzubster/blob/main/frontend/src/pages/MarketplacePage.js

💻 **MyZubster core repository**
https://github.com/MyZubster-Ecosystem/myzubster

🔐 **BTC/Electrum verifier — PR #815**
https://github.com/MyZubster-Ecosystem/myzubster/pull/815

🔎 **Trusted payment verification — PR #814**
https://github.com/MyZubster-Ecosystem/myzubster/pull/814

🌐 **Multichain Marketplace / Wallet Hub — PR #811**
https://github.com/MyZubster-Ecosystem/myzubster/pull/811
Enter fullscreen mode Exit fullscreen mode

Top comments (0)