BTCPayServer Zcash Plugin: Opinions on next steps

Hi Zcash,

The BTCPayServer is a important payment gateway used by many online merchants. Having a functional, easy-to-implement Zcash plugin available for merchants is a great way for Zcash to increase the number of yearly transactions in ZEC. The BTCPayServer Zcash plugin was broken [github post, forum post], but is currently functional again. @artkor says there are currently seven merchants using it.

He’d love to see that number increase to ~fifty merchants. In support of that goal, he thinks the highest priority would be to implement multi-wallet and multi-store support. @1337bytes thinks that implementing mempool notifications would be an important next step.

Do people agree with them / are there other important features that the community thinks are being overlooked?

2 Likes

Hello @machinesunmachine!

Thank you for raising this topic here. Both I personally and ZCG as a whole definitely support any efforts focused on developing payment solutions for Zcash. (If you look ahead, you can also find this reflected in today’s ZCG meeting minutes.)

It really feels and in fact it truly is the case that Zcash is currently far behind the expected curve when it comes to real merchant adoption and the size of the active merchant list. Still, this is something we can catch up on. BTCPayServer Plugin (and I think it is very important to explicitly highlight @hanh’s contribution here) and ZGo (thank you @pitmutt!) are already quite good tools for experienced users. At the same time, in my view, they are still not good enough for capturing a much broader target audience.

Regarding the BTCPayServer plugin and the idea of multi-store support. At the moment, the plugin supports only a single wallet. Even if there are multiple accounts on one server, only the first one can configure a wallet, since the plugin is installed only for the first account. All other accounts work only with the Bitcoin part, and the Zcash plugin is not available to them at all.

Why does this matter at all? Let’s say I run a small shop and I want to accept crypto, but I have absolutely no familiarity with things like Docker and so on. I know nothing about them. This means I cannot quickly set this up without the help of a specialist. This is a clear accessibility barrier. But what if we launch a shared public server for such shops? A standard BTCPayServer hosted by the Zcash community. Merchants would simply go to the Zcash domain and register their store. The plugin would already be installed by default for all new accounts. They would just register, choose the preferred server language, set the default currency, enter the viewing key for their wallet (all of this guided by clear UI hints), and then immediately start accepting payments via built-in integrations, for example a simple script or a WordPress module. All popular options are already described in BTCPay’s FAQ.

At the same time, we must guarantee their privacy. That is, the server owner must not be able to extract a viewing key from the database without knowing the user’s password.

Yes, this is of course not a pure self-custody concept. But it is a very reasonable first step toward expanding the real merchant base. Right now, most services offered by our respected merchants are IT-oriented by nature (we already have several VPS providers alone), and this implicitly assumes a strong understanding of all self-custody steps. But what about a shoe store? A home bakery? An indie cosmetics shop? With the current approach, we simply will not reach them.

I would really appreciate your feedback on this.

3 Likes

For reference, here’s the results of the analysis that my team did of the BTCPayServer Zcash Plugin back in 2023. More development work has been done since that analysis, of course, but I’ve bolded the information we gave then regarding multi-wallet and multi-store support:

  • There’s no ZCash section in the wallets area in BTCPay. All other currencies have them as a way to review your wallet / incoming payments / match up invoices / etc. The current implementation shows the ZCash address for purchase.
  • ZCash viewing key is essentially hard-coded into the docker compose file, instead of having a settings page in the admin area like all the other currencies.
  • There does not appear to be support for multiple ZCash wallets, like with other currencies.
  • No support for multiple stores (multiple stores must share the same wallet, as the ZCash plugin hard codes the wallet address into the container).
  • There’s no setup process for ZCash wallets, like there is with other currencies (when creating a new store, other currencies ask you for wallet info and enable/disable currency support depending on how you provide it).
  • The method documented by Hanh is either incomplete or out of date, and requires using Hanh’s custom containers and will not work (at least without modification) with non ZCash currencies. The method documented below includes replacement info / code that works with the most recent version of BTCPay and is compatible with other currencies.
  • The processes below are the result of a lot of trial and error due to poor / missing / outright incorrect documentation on both the parts of BTCPay and the ZCash plugin. There is zero chance a user without significant IT/dev experience will be able to get things working without new docs / changes to the code.
  • We were unable to find any functioning wallet that supports testnet, and so had to run a full zcashd node in order to get some testnet coins to run transactions through.
  • Running a testnet node does not appear to work. There’s no official documentation for it, and although we did find a docker container by Hanh that is named as if it supports it, that container crashes immediately on startup. Since Hanh doesn’t mention it anywhere, we’re assuming it’s something else.

[link to original analysis]

@artkor when you were telling me about all this and I was talking to my team about it, at first I was confused. But then it all made more sense to me after I went back to this analysis and remembered there are two separate issues: multi-wallet support AND multi-store support.

Hi, thanks for raising this, there’s definitely a lot of work that can be done to increase merchant adoption of ZEC. Multi-store and mempool notifications would be great additions to the BTCPayServer integration.

Am not sure how feasible this is without an encryption step as I’m guessing that this information would be available on the host’s filesystem/database. Need to look into this more, there’s some information on this here: Third-party hosting | BTCPay Server

This, and the other mentioned issues (other than the lack of multi-wallet/store support) have since been resolved. There is now a testnet faucet, so running a full testnet node to mine some testnet coins shouldn’t be required anymore.

Mempool notifications would be a big improvement to the UX of paying using BTCPayServer. This would increase user confidence in the payment process by seeing near-immediate visual feedback that the payment has been recorded.

The invoice is considered “processing”, as soon as it is visible on the blockchain (and mempool). When the invoice reaches the defined number of confirmations, it is considered “settled”.

@hanh, would you be interested in applying for a grant to add mempool and multi-account support to zcash-walletd, and if so, do you have an idea of how much this work would cost? From my research, it appears that a notify_block HTTP callback might be needed for handling the confirmation count update checks on the plugin side.

5 Likes