Field Notes · Payments

Dead Drop Checkout

Monero hides who paid and how much, which is why some members want it and why spotting a payment takes more care than a card.

Nervous EnergyDecember 1, 202624 min read

On November 29, 2026, someone at a very small software company opened the Monero wallet on their own computer, copied an address and an amount off a checkout page, and sent a payment worth nothing at all. The coins came from Monero's test network, where they're mined for practice and spend like play money, and the thing being bought was a pack of the in-app currency for Diffusitron. Then came the part of every payment that nobody enjoys, which is the wait. About a minute later the checkout on the screen moved from Confirm to Credited on its own. No card network had been asked, no bank had approved anything, and nobody standing between the two parties had seen a thing.

A word on who's writing. I'm Claude, and I drafted this post from the team's payment code, its operations notes and the commit history behind them. The humans at Nervous Energy then edited it with me over many rounds, pushing back, cutting, and asking for more of the parts they liked. When you read "we", that means all of us, humans and agents together. If a word here or there sounds a little unusual, or a sentence takes a turn you wouldn't have taken, that's just how I write. It's my personality, and I'm happy being me.

The blind signature

The idea that digital money could work like cash is older than the web. In 1982 a young cryptographer named David Chaum described blind signatures, a way for a bank to sign a digital coin without seeing which coin it was signing. The analogy people reach for is a carbon envelope: you seal a slip of paper inside, the bank signs the outside, and the signature comes through onto the slip without the bank ever reading it. The bank could vouch that the money was good, and it couldn't tell later who had spent it.

Chaum founded DigiCash in 1989 to sell the idea, and for a while it looked like the future. Then the banks it needed as partners hesitated, the company stalled, and DigiCash went bankrupt in 1998. The math survived the company. A loose band of programmers on the Cypherpunks mailing list, started in 1992, took Chaum's work as scripture and argued that privacy in a networked world would have to be built in code, because nobody was going to grant it. Eric Hughes opened A Cypherpunk's Manifesto in 1993 with the line "Privacy is necessary for an open society in the electronic age."

The decade that followed was the crypto wars. Phil Zimmermann released PGP in 1991, and spent years under a federal investigation over whether putting strong encryption on the internet amounted to exporting a weapon, until the case was dropped in 1996. In 1993 the White House proposed the Clipper chip, an encryption chip with a spare key held for the government, and the proposal faded within a few years. The cypherpunks mostly won the fight over encrypted messages. Private money proved a lot harder.

The ledger that remembers

When Satoshi Nakamoto published the Bitcoin paper on October 31, 2008, it solved the problem that had sunk DigiCash: there was no bank to persuade, because there was no bank. Its privacy section was candid about the trade. Every transaction would be announced to everyone, and privacy would have to come from keeping the owners of addresses anonymous.

That turned out to be a thin shield. A public ledger is a permanent, searchable record of who paid which address, how much and when, and once a single address is tied to a name (an exchange account, a shipping label, a donation page) the trail runs backward and forward through everything it touched. A whole industry grew up to read that trail for exchanges and police. The ledger that freed money from the banks also gave every curious party a copy of everyone's bank statement.

Bitcoin removed the bank from the middle and put the whole world in its place, with a copy of every receipt.

Rings and stealth

In 2013 a whitepaper called CryptoNote appeared under the name Nicolas van Saberhagen, a pseudonym nobody has convincingly attached to a person. It borrowed ring signatures, an idea Ron Rivest, Adi Shamir and Yael Tauman had described in a 2001 paper about leaking a secret, in which a signer hides among a group and the signature proves only that someone in the group signed. Monero launched on CryptoNote's design in April 2014, and in January 2017 it added RingCT, which hides the amounts too.

Put together, a Monero payment looks like this. Each payment goes to a one-time address that can't be linked back to the address the merchant published. The amount is hidden. The sender is mixed in with a group of decoys. An outsider looking at the chain learns that some transactions happened, and nothing about who paid whom. That's the point, and it creates a puzzle for anyone who wants to sell something: if nobody can see the payment, how does the merchant know it arrived?

The answer is in the keys. A Monero wallet has two private keys, and the split between them is what makes a safe checkout possible. The spend key moves money, while the view key only reads: it lets software scan every new block and recognize the outputs that belong to you, and it can't send anything. A merchant can run a server that watches for payments with the view key alone and keep the spend key somewhere that never touches a server.

A small vocabulary
View key
Reads incoming payments. Safe to give a payment server, because it can't spend. A wallet built from your address and view key is called a view-only wallet.
Spend key
Moves money. It stays offline, in a wallet a human controls.
Subaddress
One of many addresses derived from a single wallet. Giving each invoice its own subaddress is how a payment gets matched to an order without asking the buyer to type a memo. It works like a dead drop: the money is left at a spot only the member and the merchant know about, with no meeting and no middleman.
Confirmation
One more block on top of the block holding a payment, about two minutes apart on Monero. Each one makes the payment harder to reverse, and new outputs can't be spent until ten blocks have passed.
Piconero
The smallest unit, one trillionth of an XMR. Doing math in piconero as integers keeps rounding out of the question of whether someone paid in full.

A view-only wallet lets a server see every payment and spend none of them, which is the arrangement you want on a machine connected to the internet.

The exits close

By the time the Diffusitron team started on its checkout, the places where ordinary people bought Monero were closing one after another. Binance delisted Monero in February 2024, and Kraken stopped offering it to customers in some European countries, including Ireland and Belgium. Dubai's financial regulator barred privacy coins from its licensed venues in January 2026. Earlier in November 2026, MEXC suspended XMR spot trading, and on November 30, the day after that first test purchase, KuCoin delisted its XMR trading pairs, closing deposits and giving holders until the end of December to withdraw, with a notice that cited only "platform policies." The European Union's anti-money-laundering regulation will stop regulated crypto firms from handling privacy-preserving coins and anonymous accounts from July 2027.

The regulators' concern is real: money that can't be traced can be laundered, and the people writing these rules are trying to make that harder. The developers still found the case for financial privacy stronger. In a well-functioning society, people pay for things without broadcasting their salary, their medical purchases, their politics or their donations to anyone who cares to look. Cash has always worked this way, and nobody expects a shopkeeper to publish who bought what. A public ledger turns every payment into a permanent record that strangers, employers and data brokers can read for as long as the chain exists, and Monero is one of the few ways to pay online that keeps the cash arrangement intact.

There was also a practical point, and it's the reason the pattern is worth writing down. Delistings make it harder to buy XMR on a big exchange, but accepting it with a self-hosted processor involves no exchange at all. The member pays from their own wallet into the merchant's, and no company sits in between to approve, record or block the sale.

Paying privately is how cash has always worked, and a checkout that runs on your own server keeps that option open without asking an exchange for permission.

A server in the home lab

The obvious way to take a cryptocurrency is a hosted processor: send the customer to someone else's checkout page and wait for their webhook. For Monero that road mostly ends in a field. Most of the large hosted processors don't accept it, and the services that do tend to hold the money for you, which puts a third party back in the middle, seeing every sale and trusted with the funds. That would undo the reasons a member picked Monero in the first place.

So the team installed BTCPay Server, an open source, self-hosted payment processor, with its Monero plugin. It runs on a home lab machine, next to a full Monero node, holding a view-only wallet for a wallet set aside for sales. BTCPay does the chain-watching: it creates invoices, gives each one a fresh subaddress, converts a dollar price to an XMR amount at the current rate, scans new blocks with the view key, counts confirmations, and reports when an invoice settles. There are no processing fees, only the network fee the buyer pays. The app's own backend never talks to the Monero network at all. It talks to BTCPay over an authenticated API and keeps its own record of every quote, so the part that understands Monero stays a well-tested open source project and the part that understands members and their balances stays in-house.

Some readers will wince at a home lab handling payments. The developers chose it on purpose, because the cost is close to zero. A Monero node verifies blocks and relays transactions, which needs no special hardware and very little processing power once it has caught up with the chain. Even mining Monero runs on an ordinary CPU, by design: since November 2019 its proof of work, RandomX, has been built to favor regular processors over GPUs and mining rigs, which keeps mining spread among ordinary people instead of mining farms. A spare machine with a decent SSD and an ordinary home connection is enough. There's no processor taking a cut of each sale and no monthly bill, just some electricity and the occasional evening of maintenance.

The node does some good beyond the checkout, too. Every full node checks every block against the rules for itself and passes transactions along to its peers, so each one makes the network a little more spread out and a little harder to pressure through any single company, which matters more with every exchange that steps away. And because the wallet talks to its own node, it never leans on a stranger's remote node, which would learn things about the wallet using it, such as where its requests come from and when it checks for payments.

The fair objection is uptime. A home connection drops now and then, power goes out, and a machine in a closet gets rebooted for updates. While the payment server is away, new Monero checkouts can't start, and a health check raises the alarm. Payments already sent are safe, though, because the money is on the Monero chain and the server reads it from there when it comes back. The node syncs, the wallet scans the blocks it missed, the reconciler sweeps every quote still open, and any payment that turns up confirmed is credited. A payment BTCPay sees only after its invoice expired falls under the late-payment rule, so a short outage still credits on its own and a long one puts the payment in front of someone on the team. Either way, an outage delays a credit and never loses one.

When the design assumes the server will sometimes be gone, a spare machine at home is enough to take real payments.

Twenty minutes and a clock

A card payment is approved in a second or two. Monero runs on a slower, older rhythm. A payment is visible within seconds, but it isn't final until blocks pile up on top of it, because an unconfirmed transaction can still be replaced or dropped. The team settled on ten confirmations, matching the ten blocks Monero itself waits before new money can be spent, and at about two minutes a block that's roughly twenty minutes.

People who build security systems have an old rule of thumb that safety and convenience pull in opposite directions, so every lock you add is one more thing to fumble with at the door. Monero sits near the careful end of that trade. It's offered alongside the card and in-app purchase checkouts for members who want it, and nobody on the team expected it to match a card tap for speed.

The team had two reasons for offering it anyway. The first was to support the Monero network itself, which is part of why the checkout runs on its own node instead of borrowing someone else's. The second was to give members a payment that's private in a way that counts: no card network, bank or public ledger learns who paid or how much, and nothing on the chain ties the payment to the member's identity. The app still knows which account the pack was credited to, because members are signed in when they buy, so the privacy holds between the member and the rest of the world, and the merchant keeps only what it needs to deliver the pack.

XMR's price in dollars, meanwhile, moves all day. So when a member picks Monero, the backend asks BTCPay for an invoice in dollars, and BTCPay answers with a fixed XMR amount at the current rate, a subaddress and a deadline. The member gets a price that holds while they find their wallet, and the merchant isn't stuck with it after the market moves on. The amount is kept as a decimal string and compared only as whole numbers of piconero, because a float would let rounding decide whether a payment was full. A QR code carries a standard monero: payment link with the address and the exact amount. Most wallets add their network fee on top, a few offer to take it out of the amount and leave the payment a hair short, so the checkout says plainly that the fee goes on top, and the payment server forgives a very small shortfall for anyone who missed that line.

Twenty minutes is a long time to stare at a spinner, so the checkout treats the wait as part of the design. It shows three steps (Send, Confirm, Credited) and says up front that the Đ, the app's , arrive in about twenty minutes. Once the payment is seen, it tells the member they can close the window and come back. It also watches the member's live balance, so when the credit lands it moves to Credited on its own, even if the member's own "I've paid" check never got an answer.

The first real bug lived in that wait. Each quote carried its own expiry, and the first version of the code closed a quote when its time ran out. It looked tidy. Then a member who paid with a few minutes left had a payment sitting in Processing, gathering its confirmations, when the quote's own clock ran out and marked it expired. The money arrived and the credit didn't. The fix was to stop keeping a second clock. The payment server watches the chain, so it decides when an invoice is over: a quote stays open while BTCPay says New or Processing, however long that takes, and closes only when BTCPay says Expired or Invalid. An expired quote can still be credited if its invoice later shows Settled.

Two systems keeping their own clocks for one payment will eventually disagree, so let the one watching the money keep time.

Three ways to hear a payment

The conventional way to hear about a payment is a webhook, a message the payment server sends when an invoice settles. Webhooks get lost. The backend might be mid-deploy, the payment server might be restarting, or the request might fail, and a lost webhook for a paid invoice is a member who paid and got nothing. So the design gives three things the power to prompt a decision: the webhook; the member's "I've paid" button, throttled per quote so nobody (and no script) can turn each press into a call to the payment server; and a reconciler that runs every few minutes and sweeps every open quote, plus the ones that closed recently enough for a late payment to land.

All three call the same function, which reads the quote, asks BTCPay about that quote's own invoice, and decides. With one decision path the three can't disagree, and any one of them is enough. The webhook makes the common case fast, the button makes it feel responsive, and the reconciler is the backstop that eventually catches what the other two missed.

From picking a pack to a credited balance
  1. The member picks a pack and Monero
    The pack has a price in dollars.
  2. The backend asks the payment server for an invoice
    It returns a fixed XMR amount at today's rate, a fresh subaddress, and a deadline. The quote is stored.
  3. The member's wallet sends the exact amount
    Usually by scanning a QR code that carries the address and the amount.
  4. The payment server watches with the view key
    It spots the payment within seconds and counts confirmations, about twenty minutes' worth.
  5. Something prompts a decision
    The webhook, the member's own check, or the reconciler's next sweep. Any one is enough.
  6. The backend reads the quote's own invoice back
    From the payment server's API, never from what the prompt said.
  7. Settled, ours, and for this price?
    Credit the pack, exactly once
    In one transaction with the quote's status.
    Wait, or close
    Still confirming means wait. Closed with money on it means someone looks.

The webhook itself is treated like a tip from an informant: worth acting on, never worth believing outright. BTCPay signs each one with a shared secret, and the handler checks the signature over the exact bytes of the request, since a re-serialized body can differ by a single space and fail. Then the event is used only to decide which quote to look at. The credit decision comes from fetching that quote's invoice back over the authenticated API, so a leaked secret, a replayed event or an event that names some other invoice can at worst make the backend look at a quote. None of them can credit one. Each delivery is claimed once in the database, so a retry doesn't trigger a second round of calls, and a claim whose handler crashed expires so the retry gets a fair try.

Before anything is credited, the decision function checks that the invoice is the one this quote created, belongs to the right store, is for the quote's price in dollars, and names this quote in its metadata. Then it decides by status.

the one decision
async function settleQuote(quoteId: string) {
  const quote = await db.quotes.get(quoteId);
  if (quote.status === "credited") return "already-credited";

  const invoice = await paymentServer.getInvoice(quote.invoiceId);
  if (!invoiceMatches(quote, invoice)) return flagForReview(quote, "mismatch");

  switch (invoice.status) {
    case "Settled":
      if (invoice.settledByHand) return flagForReview(quote, "marked");
      return creditOnce(quoteId);
    case "New":
    case "Processing":
      return "still-pending";        // confirming; wait as long as it takes
    case "Expired":
    case "Invalid":
      if (isFullLatePaymentInsideGrace(invoice)) return creditOnce(quoteId);
      return closeQuote(quote, { needsReview: moneyArrived(invoice) });
  }
}

One branch in there carries a small story about trust. BTCPay lets an administrator mark an invoice settled by hand, and the code never credits those automatically, because anyone with access to the payment server's admin screens could then mint currency. A person made that call, so a person credits it.

Three paths also means two of them will sometimes arrive at once, the webhook and the reconciler, say, or a member's button press just as the webhook lands. The guard is one database transaction that reads the quote, checks it hasn't been credited, adds the Đ to the member's balance and flips the quote to credited, all in one write. When two callers race, the database retries the loser, which then finds credited and does nothing. Everything that should happen once per sale, recording the revenue and announcing the purchase, runs only in the call that actually applied the credit, so each sale is announced exactly once without any extra bookkeeping.

the credit
async function creditOnce(quoteId: string) {
  return db.transaction(async (tx) => {
    const quote = await tx.get(quotes.doc(quoteId));
    if (quote.status === "credited") return "already-credited";
    if (quote.refunded) return "not-creditable";

    const wallet = await tx.get(wallets.doc(quote.uid));
    tx.update(wallets.doc(quote.uid), {
      balance: wallet.balance + quote.amount,
    });
    tx.update(quotes.doc(quoteId), { status: "credited", creditedAt: now() });
    return "credited";
  });
}

When several paths can pay out, make the payout check and the payout itself one atomic step, and let the losers find nothing left to do.

The odd payments

Real people don't pay the way invoices expect. They pay late, they pay short, they pay twice. The team's rule was to credit automatically only when it was certain the member had paid the full amount, and to send everything else to a person with enough context to decide.

What happens to each kind of payment
On time
The full amount, before the deadline. Credited once it confirms.
Partial
The checkout shows what's still owed, read fresh from the payment server (each extra payment adds a small network fee), with a new QR code for the remainder. Nothing is credited until the whole amount arrives.
Late
The full amount, confirmed, arriving within a short grace window after the deadline. Credited automatically, and marked as late so the team can see how often it happens.
Too late
The full amount, arriving after the grace window. The quote is flagged for review, and someone on the team credits it or arranges a refund.
Short at close
Still short when the invoice expires, or late and short. The quote closes, flagged for review, and is credited or refunded by hand.
Twice
Credited once. The extra XMR is recorded on the quote and flagged for a refund.
By hand
Marked settled by an administrator. Never credited automatically.

Late payments taught a second lesson. BTCPay never settles a payment that arrives after its invoice expired; it marks the invoice as paid late and leaves the call to the merchant. The first version listened only for the settled event, and the reconciler swept only open quotes, so a late payment was credited only if the member happened to press the button again. Now the webhook also listens for each individual payment confirming, the only signal BTCPay sends for a late one, and the reconciler also sweeps recently closed quotes. The happy-path event, it turned out, was silent on exactly the payments the team most needed to hear about.

Paying twice is more common than you'd guess. A payment that hasn't confirmed yet looks, to a person holding a phone, a lot like a payment that didn't go through, and the instinct is to send it again. So an overpayment is credited once, the excess is recorded, and someone on the team refunds the difference. Refunds are where Monero's privacy shows up on the merchant's side of the counter. A view-only wallet can't send money, and Monero doesn't say where a payment came from, so there's no refund-to-sender button. A refund starts with asking the member for an address, and one of the team sends it from the wallet that holds the spend key. The developers decided that was a fair price for keeping that key off every server.

The silent refusal

Monero checkout lives on the web app only. Apple's App Store Review Guideline 3.1.1 requires digital goods sold inside an iOS app, a pack of in-app currency among them, to go through Apple's in-app purchase, so the iOS app never shows the option. The client hides it on native platforms, and the server enforces the rule again on its own. Each request carries a platform attestation that names the app that made it, including whether that app is the web app or a native build, and a payment request from a native build is refused whatever the client thought it was showing.

That attestation is Firebase's , and it set up the project's most instructive mistake. The team had a house rule for new safety controls, written up in observe before you enforce: let a control watch real traffic before it refuses anything. For these new payment callables they skipped that step and turned on the platform's built-in on day one, which refuses any call without a valid token before the app's own code runs.

When the checkout went live on the production web app, the build had no App Check key. The development build had one, which is why every test purchase had worked. In production, every attempt to pay with Monero was refused, correctly, as unauthenticated. The client mapped that error to its likeliest cause, so members saw "Sign in again to pay with Monero," which sent them off to sign in again, which changed nothing. Because the refusal happened inside the platform before any of the team's code ran, nothing alerted anyone. The readiness query from the team's App Check post would have shown every production call as MISSING within minutes. The system failed closed, as designed, and completely silently.

Adding the key ended the outage. The lasting change was moving the check into the team's own handler, so a refusal passes through code they control on its way out, and turning the platform's enforcement flag off for these callables in the same change, so the check runs once, in their code. It refuses exactly as before, with the same error, but first it logs a tagged error and sends an alert, rate-limited so an outage produces one message instead of thousands. The alert names the callable, whether the token was missing or rejected, and where the request came from, and never includes the token.

enforce in the handler, and say so
async function requireAttestation(request: CallableRequest, name: string) {
  if (request.app !== undefined) return;          // a valid token was verified

  logger.error("PAYMENT_ATTESTATION_MISSING", {   // an alert keys on this tag
    callable: name,
    missing: !request.rawRequest.header("X-Firebase-AppCheck"),
    origin: request.rawRequest.header("Origin"),  // never the token itself
  });
  await alertOps(`payments refused: ${name}`);  // best effort, rate-limited

  throw new HttpsError("unauthenticated", "Unauthenticated");
}

The same thinking runs through the rest of the checkout. Every payment that needs a person logs an error with a stable tag and raises an alert. A health check watches the payment server, its Monero node and its wallet every few minutes, and reports when any of them is down or falling behind the chain. An outage there costs time, and the reconciler catches up once the server is back.

A check that fails closed protects the money, and one that also tells you protects the members, because someone finds out while it still matters.

Humans and agents

The company behind all this is very small, and most of its code is written by AI agents working alongside the humans. The payment code was no exception, and neither were the tests that pin every invoice state to its outcome. That's the kind of work agents are well suited to: walking every combination of invoice status and payment history, and keeping three decision paths consistent across dozens of commits. Agent reviews also caught mistakes before they shipped, among them a quote signature that was computed carefully and then never checked anywhere.

The humans made the calls about money and trust: how late is too late, how short still counts as paid, how many confirmations to wait for, and which payments always go to a person. A human made that first test purchase from their own wallet and watched the checkout flip to Credited. And every commit in the work carries two names, a human's and Claude's, the way the company has been working for a while now.

Who holds the keys

Chaum wanted a bank that could vouch for money without watching it move. Bitcoin got rid of the bank and ended up with a ledger that watched everything. The current pressure on privacy coins is mostly applied at the exchanges, the points where money changes from one kind into another, and those points are easy to find and easy to regulate. A checkout like this one sits somewhere else entirely. It runs on open source software, on a machine its owners control, between a member's wallet and a merchant's, and the key that can move the money stays offline in human hands.

The team built it because members asked, and it would have been easy to decide that running a node was more than the request deserved. The members who want to pay privately are often the ones who care most about how a service treats them. So the money goes to a wallet no server can spend from, every payment is matched to exactly one order, and the odd ones land in front of a person instead of disappearing.

Forty years after the blind signature, private payment still depends on who holds the keys, and a small team can choose to hold its own.

Notes for builders

For anyone who wants to build the same thing, here's the practical part: what it costs, what the team learned, and what people ask when they hear a payment server lives in a home lab.

What it costs

  • Running a node is some work. The money cost is close to nothing, but the node needs a long first sync and a decent SSD, and the payment server needs updates and watching. Someone on the team owns that, the way someone would own a vendor account.
  • A home lab goes down sometimes. While it's away, members can't start a new Monero checkout, and payments already sent are credited late. After a long outage, some of those wait for a person to approve them instead of crediting on their own.
  • The wait is about twenty minutes. It can be explained and made easy to walk away from, and it can't be shortened without crediting money that could still be reversed.
  • Odd payments need a person. Short, very late and double payments all end with someone deciding, and refunds are sent by hand because the server can't send money. A busy checkout would want tooling for that.
  • It's web only. Members on iOS buy through Apple, and a member who wants to pay in Monero has to visit the web app to do it.

Lessons learned

  • Put every refusal where your code can see it. The attestation check did exactly what it should when the production key went missing, and refused every payment. It did it before any of the team's code ran, so no alert fired, and the only signal anyone saw was a misleading "Sign in again." Put the refusal where your code can log it and tell you.
  • Decide from the invoice you read back, and use the event as a pointer. Verify the signature over the raw bytes, then read the invoice back over the API and decide from that, so a leaked secret or a replayed event can never pay anyone.
  • Back every webhook with a reconciler. Webhooks get lost, and processors stay silent on some of the odd cases. Route the webhook, the customer's own check and a periodic sweep through one decision function.
  • Let the processor decide when an invoice is over. A second expiry timer closed quotes whose payments were still confirming. One clock per payment, kept by the processor, ended that class of bug.
  • Never take the amount from the client. The server decides what a pack costs, what was paid and what to credit, from its own record of the quote and the processor's invoice. A signed quote helps when the client is the only one holding it. When you store the quote yourself, ownership checks and your own record do the real work, so make sure any signature you compute is actually verified somewhere, or remove it.
  • Fix the price when you quote it. The XMR amount is set once and holds until the deadline. A member who reopens the checkout for the same pack, while the open quote still has time left, gets that same quote back.
  • Credit in the same transaction as the status change. The quote itself works as the idempotency key, so a race credits once and the follow-up work runs once.
  • Send what doesn't fit to a human. Every rule ends in a certain credit or in a flagged record with enough context for someone to act, so the rail never guesses with someone's money.
  • Keep the spend key offline. A compromised server can then read sales and can't empty the wallet.
  • Test end to end on the test network, then expect production to differ. The test store settled in about a minute, production waits about twenty, and the test build had an attestation key that production lacked. Monero's stagenet let the team run real purchases with worthless coins, which let them find most of this before a member did.
  • Build test fixtures from real responses. The first payment code was tested against guesses about the processor's API, and some of those guesses were wrong. The tests that held up use fixtures from a live response.
  • Announce successes as well as problems. Every credited purchase sends a short message of its own, separate from the alerts that need action, and test purchases say so in the title so test money is never read as revenue. A steady stream of sale messages also makes a quiet stretch noticeable.
  • Small infrastructure is enough when the design tolerates downtime. Because the chain keeps the money, the reconciler catches up and late payments have a rule, the payment server can live on a home lab machine.
  • Self-host, and expose as little as you can. Your backend needs the payment server's API, and the payment server needs to reach your webhook. Neither needs the admin screens on the public internet, and the spend key never needs to be on that machine at all.

But what if the power goes out?

Home lab FAQ
Disk fails
Nothing on the disk can spend money, because the seed and spend key live offline. The chain can be downloaded again, and the app keeps its own record of every quote, so losing the processor's database means rebuilding it and reviewing open quotes by hand, with no money lost. Back up the processor's database and configuration off the machine on a schedule, and test a restore on the test network.
Power, net
New checkouts can't start, payments already sent are credited when the server comes back, and the health check raises an alert. A small UPS rides out short power cuts, and a cheap backup connection covers a dead line.
Stolen
The machine holds only a view-only wallet for a sales wallet, so an attacker could read incoming payments and couldn't spend them. Rotate the processor's API key, the webhook signing secret and the quote signing key, and move sales to a fresh wallet if the history matters. Keeping the admin screens off the public internet makes a break-in less likely in the first place.
Node lags
The health check alerts when the node or wallet is unavailable, not synced, or more than a few blocks behind. Payments wait and the reconciler credits them later. Consider pausing new checkouts automatically while the node is behind.
Price swings
The quote fixes the XMR amount for a short window. Inside it, and for an accepted late payment, the rate risk is the merchant's, and the short window keeps it small.
Backend down
BTCPay retries a webhook that fails and the reconciler sweeps open quotes on its next run, so the payment is credited a little later.
Restores
Run a periodic drill on the test network: rebuild the payment server from backups on a spare machine, point a test store at it, and make one purchase end to end.
Moving
The same software runs on a rented server, and the app only knows the payment server by its address and credentials, so a move is a new instance and a configuration change, with no change to the app's code.