PayJoin: stealth privacy for Bitcoin payments
PayJoin (BIP78, also called pay-to-endpoint) is a way of paying in bitcoin in which the receiver adds one of their own inputs to the sender's transaction. The result looks like an ordinary payment, but it breaks the assumption chain analysis relies on most, that all of a transaction's inputs belong to the sender, and it hides the real amount paid. It costs no more than a normal payment; it needs a receiver that supports it, such as a merchant using BTCPay Server, and a sending wallet that does, such as Sparrow.
- Time
- 30 minutes
- Cost
- Free (just transaction fees)
- Level
- Intermediate
- Updated
- 26 Oct 2026
UTXOs are useful background.
In a normal payment the sender provides every input, the receiver gets one output and the sender gets change. In a PayJoin the receiver contributes an input too, so the transaction on chain looks normal while the analyst's reading of it is wrong.
Why does PayJoin matter?
Chain analysis assumes that all inputs in a transaction belong to one owner. The assumption is right most of the time, which is what makes it useful for surveillance. PayJoin breaks it, and because a PayJoin looks like any other payment, analysts can no longer be sure of the assumption even for transactions that are not PayJoins. Every PayJoin adds that doubt across the whole transaction graph, so wider use helps everyone's privacy, including people who never use it.
How does a PayJoin work?
- Alice wants to pay Bob 0.7 BTC.
- Her wallet builds a normal transaction: a 1 BTC input, 0.7 BTC to Bob, 0.3 BTC change to Alice.
- Instead of broadcasting it, the wallet sends it as a PSBT to Bob's PayJoin endpoint.
- Bob adds an input of his own, 0.5 BTC, and raises his output to 1.2 BTC.
- Bob sends the modified transaction back.
- Alice's wallet checks that it still pays what she intended, and she signs her input.
- The final transaction is broadcast: inputs of 1 BTC (Alice) and 0.5 BTC (Bob); outputs of 1.2 BTC (Bob) and 0.3 BTC (Alice).
| What an analyst assumes | What actually happened |
|---|---|
| The sender owned 1.5 BTC of inputs | The sender owned 1 BTC and the receiver 0.5 BTC |
| The payment was about 1.2 BTC | The payment was 0.7 BTC |
| The change was 0.3 BTC | Correct, by coincidence |
How does PayJoin compare with CoinJoin?
| PayJoin | CoinJoin | |
|---|---|---|
| Participants | Two: sender and receiver | Many: from 4 to over 100 |
| Coordination | Directly between the two, during the payment | A coordinator, or a peer-to-peer market |
| How it looks | Like a normal transaction | Recognisable as a CoinJoin |
| Purpose | Privacy for a payment | Cutting a coin's history |
| Fees | A normal transaction fee | Mixing fees and a larger transaction |
PayJoin is stealth privacy: it does not look like a privacy transaction. CoinJoin is explicit privacy: anyone can see it is a CoinJoin, though they cannot trace through it. The two complement each other.
Which wallets support PayJoin?
Sending
| Wallet | Platform | Can send PayJoins |
|---|---|---|
| Sparrow | Desktop | Yes |
| BTCPay Server | Web | Yes |
| Wasabi | Desktop | Yes |
| BlueWallet | Mobile | Yes |
| JoinMarket | Desktop | Yes |
Receiving
Receiving under BIP78 needs a wallet that supports it and an endpoint, a web address the sender's wallet can reach. BTCPay Server is the easiest way, and handles it automatically for customers whose wallets support it. A newer version, BIP77 ("Payjoin v2"), lets a receiver accept PayJoins without running a server, and some wallets have begun to adopt it; check your wallet's documentation.
Step 1: Get the recipient's PayJoin request
Step 1 starts from the recipient. A PayJoin-capable recipient gives you a BIP21 payment request (a bitcoin: link or QR code) that includes a PayJoin endpoint, an address such as https://btcpay.example.com/BTC/pj.
Step 2: Paste the request into Sparrow
Step 2 builds the payment. In Sparrow, open the Send tab and paste the BIP21 request. Sparrow recognises the PayJoin endpoint itself.
Step 3: Review and send
Step 3 completes it. Sparrow negotiates with the recipient's endpoint, shows that the transaction is a PayJoin, and checks that the payment still goes where you intended. Confirm and broadcast.
How do you accept PayJoins with BTCPay Server?
- Open the store's checkout settings.
- Enable PayJoin (BIP78).
- Set up a hot wallet for the store, since PayJoin needs the server to contribute and sign an input.
When a customer pays an invoice, a wallet that supports PayJoin negotiates it automatically; one that does not simply pays normally, with no error. The customer does nothing different.
How do you use PayJoin well?
Use it whenever a recipient offers it, since every PayJoin helps network privacy, and run BTCPay Server if you accept payments, to offer it to your customers. Combine it with coin control and your own node.
Do not expect anonymity from PayJoin alone: it defeats one heuristic, not all of them. Using it with KYC coins does not hide them from the exchange that knows them. And you cannot control the receiver's side; a receiver with poor practices can leak information about the payment.
What are PayJoin's limits?
- Amounts are still visible on chain.
- It defeats the common-input-ownership heuristic, not the others.
- It protects new transactions, not past ones.
- Both sides need compatible software.
Use CoinJoin instead when you need to cut links to a coin's past, want a larger anonymity set, or cannot count on the receiver's cooperation. Use PayJoin when paying a recipient that supports it, when you want privacy that does not look like privacy, or simply to add doubt to the network's transaction graph.
Where does PayJoin fit among privacy tools?
| Tool | What it does |
|---|---|
| Your own node | Keeps your addresses from third parties |
| Coin control | Stops your coins being linked together |
| PayJoin | Defeats the common-input-ownership heuristic |
| CoinJoin | Cuts the traceability of a coin's history |
| Tor | Hides your IP address when transacting |
The strongest privacy uses several layers together.
Where can you read more?
- BIP78, the PayJoin specification
- BTCPay Server's PayJoin documentation, for merchants
- Sparrow Wallet, which sends PayJoins
Where next
- AlsoCoinJoin GuideBreak transaction history with mixing
- AlsoUTXO ManagementCoin control and consolidation
- AlsoWhy Privacy MattersUnderstand what you are defending against