Decoding Bitcoin study cohort · free, Mondays on Discord · join anytime Sign up →

/Articles/what-is-payjoin_

What Is PayJoin? A Plain-English Guide.

The Bitcoin privacy trick that hides your payment amount, and what happened when we tested it live.

Code Orange Privacy Track session around a table in Bali

Every Bitcoin payment is public. Anyone can open a block explorer, look at your transaction and make a good guess at how much you paid and which coins are yours. So what is PayJoin? It is a simple trick that breaks those guesses: the person you pay adds one of their own coins to your payment, and suddenly the amount is no longer visible on the blockchain.

In October our Privacy Track spent two sessions on PayJoin. We looked at real PayJoins on mempool.space, sent some live on the call, and watched a few of them fail. This guide is what we learned, in plain English.

Why your normal Bitcoin payments leak

Chain analysis companies read the blockchain with two simple guesses:

  • All inputs belong to one person. If a transaction spends three coins, they assume one wallet owns all three.
  • The leftover is your change. Of the outputs, one is the payment and one is the change that goes back to you, and the amounts usually make it obvious which is which.

Those two guesses are right most of the time. That is how a single payment can link your whole wallet together and reveal how much you hold.

What is PayJoin, exactly?

PayJoin is a payment where the receiver adds one of their own coins to the transaction before it is sent.

That small step breaks both guesses at once. The inputs no longer all belong to one person, and the outputs no longer show the real amount.

Here is the PayJoin we looked up during our first session. The sender paid 12,000 sats. On the blockchain, the transaction looked like this:

  • Inputs: about 58,000 sats (the sender’s coin) and about 10,000 sats (the receiver’s coin)
  • Outputs: about 22,000 sats and about 45,400 sats

No output says 12,000. The receiver put in 10,000 and got 22,000 back. An outside observer could just as easily believe the sender paid 36,000 sats. Chain analysis can’t tell which story is true unless someone tells them.

And because a PayJoin looks like any normal payment, it hides in the crowd. That is a big difference from a CoinJoin, which is easy to spot and often gets flagged.

How PayJoin works, step by step

The tricky part is not the transaction. It is the conversation between two wallets before the transaction is sent.

  1. The receiver shares a Bitcoin payment link with a pj= part in it.
  2. The sender builds and signs a normal payment (a "PSBT", a partly signed Bitcoin transaction) and sends it to the receiver.
  3. The receiver adds one of their own coins, signs, and sends it back.
  4. The sender checks it, signs again and broadcasts the PayJoin.

Why does the sender sign first? Because otherwise a sender could keep asking "what coin would you add?" without ever paying, and learn every coin the receiver owns. If the sender plays games, the receiver can simply broadcast the original payment from step 2 and still get paid.

PayJoin is not a sidechain or a fork. It is just a way for two wallets to talk, the way email is a protocol, and the result is an ordinary Bitcoin transaction.

PayJoin v1 vs PayJoin v2

In PayJoin v1, the receiver had to run a web server that was always online. Fine for a shop running BTCPay Server, hard for a phone wallet.

PayJoin v2 (also called async PayJoin) fixes that with two shared helpers that anyone can run:

  • An OHTTP relay that hides your IP address, a bit like Tor.
  • A directory, which works like a mailbox. The sender drops an encrypted message there, and the receiver picks it up later.

So the receiver can be offline when you pay. Their wallet checks the mailbox later and the payment finishes then. The servers never touch bitcoin and can’t read the payment. The one rule: the relay and the directory should be run by different people, so neither sees the whole picture.

Everything needed is packed into the PayJoin link itself: which mailbox to use, a mailbox ID and the receiver’s public key. You can read the full details in the PayJoin v2 specification (BIP 77) and at payjoin.org.

Bitcoin nodes and hardware wallets laid out for a Code Orange privacy workshop

Which wallets support PayJoin?

These are the wallets we used or discussed in our sessions:

  • Bull Bitcoin: send and receive.
  • Cake Wallet: send and receive (turn PayJoin on in the settings).
  • Sparrow: send only (v1), so you can pay from a hardware wallet.
  • BTCPay Server: receive on your own server, with a new plugin in the works.

What happened when we tested it live

Short version: the protocol works. The wallets are not quite there yet.

One PayJoin from an earlier session showed up on mempool.space exactly as it should. But when we tried to send more during the call, almost every attempt hit a different wall:

  • Silent fallback. Cake Wallet to Cake Wallet sent a normal payment instead, without saying so.
  • Paste vs scan. Pasting the link gave an address error. Scanning the QR code worked.
  • Version mismatch. Sender and receiver need to speak the same PayJoin version.
  • No confirmed coins. The receiver needs confirmed coins of their own to add. An empty wallet can’t PayJoin.
  • Minimum amounts. One wallet asked for about 10,000 sats, which is not part of the PayJoin rules.

One participant who had tried PayJoin more than ten times summed up what wallets need: "Show me the error. Show me what I can do. Tell me if it worked."

You can read both full session recaps in our session notes.

Is PayJoin worth using?

Yes, as long as you know what it does and doesn’t do.

  • It’s not instant privacy. One PayJoin won’t clean up coins that are already linked to you.
  • It works best when lots of people use it. If even 5 to 10% of payments were PayJoins, chain analysis could no longer trust its "all inputs belong to one person" guess for anyone.
  • There’s a small trade-off. The person you pay learns a little about your coins, and you about theirs.

The best way to start: put PayJoin on in Cake Wallet or Bull Bitcoin, send a small amount between two wallets, and look the transaction up on mempool.space.

Want to help build it?

PayJoin is open source and needs builders. A good path: build and run rust-payjoin, make a PayJoin, break a test, then review one open pull request. Bindings for other languages and the BTCPay Server plugin both need help, and so do bug reports from real wallet tests like ours.

That is exactly what we practise in the Privacy Track and the Code Review Club. If you want to go deeper, our developer fellowship funds builders working on Bitcoin open source.

Try it with us

The Privacy Track meets every 1st and 3rd Tuesday at 07:00 UTC (15:00 in Bali) on Discord. It’s free, pseudonyms are welcome and cameras are optional.

Join the Code Orange Discord and bring a wallet to the next session.

Frequently asked questions

What is PayJoin in Bitcoin?

PayJoin is a Bitcoin payment where the receiver adds one of their own coins to the transaction. This hides the real payment amount and breaks the common assumption that all inputs belong to the sender.

Is PayJoin the same as CoinJoin?

No. A CoinJoin mixes coins from many people and is easy to recognise. A PayJoin is a normal payment between two people that looks like any other transaction.

What is the difference between PayJoin v1 and v2?

In v1 the receiver must run a server that is always online. In v2 the wallets talk through an encrypted mailbox and a relay that hides your IP address, so the receiver can be offline when you pay.

Which wallets support PayJoin?

Bull Bitcoin and Cake Wallet can send and receive. Sparrow can send (v1), and BTCPay Server can receive.

Does PayJoin make my bitcoin completely private?

No. It hides payment amounts and breaks two common chain-analysis guesses, but it works best used often and together with other privacy tools.

Bitcoin Only

Ready to become a Bitcoin builder?

Join the next cohort, drop into a workshop, or come say hello in Discord. The community is free and open.