NumberProxy is a site we’ve been running since near the beginning of Monkey King Code. It provides temporary, disposable phone numbers to customers who would like to protect their privacy. Since the target demographic of the site is more privacy aware than the general public, Bitcoin is a good fit for payment processing. When we first acquired NumberProxy, it was already successfully accepting Bitcoin payments using Coinbase. For some unknown reason, partway through 2017 Coinbase shut down payment processing for NumberProxy with no warning, notice or explanation. They were unresponsive to emails, tweets or any other method of communication. This is exactly what you don’t want from a payment processor. We were in a bind and had to come up with a new payment solution quickly.
First we looked at the state of the marketplace for competitors to Coinbase. Many were large companies (or, other companies ultimately powered by Coinbase, which we definitely didn’t want given Coinbase’s behaviour above), several were unresponsive to emails/messages, some had broken websites with cross-domain JavaScript errors/functionality. Most had slow processes for merchant account setup that required jumping through regulatory-compliance hoops. Things didn’t look good; but, since it’s Bitcoin, the great thing is DIY merchant processing is possible (and as we were about to find, surprisingly easy).
The foundation of our DIY merchant processing system is Electrum. Electrum is a Bitcoin client written in Python that provides a convenient JSON API, documented at http://docs.electrum.org/en/latest/merchant.html . We did encounter a seemingly undocumented gotcha when setting this up, Electrum as of the time we set it up, especially for merchant functions, really works best with one IP address. We had it on a server with multiple IP addresses (one IPv4, one IPv6) and this caused issues with connecting to the server/generating payment pages, etc. We opted to reconfigure the server with only a single IPv4 address in order to avoid these issues.
The Electrum API is otherwise reasonably well documented if you know what you’re doing with Bitcoin payment processing. In case you don’t, here’s a list of several points to consider:
- to check if payments are received, use the API to watch a wallet address and track the balance
- you need to account for confirmed/unconfirmed payments and proceed in a way that makes sense for your application. We generally wait until payments are confirmed before giving credits/releasing a service/shipping a product, etc.
- Bitcoin customers can be prone to overpayments or underpayments and you should account for this. By far the most frequent reason customers of NumberProxy don’t get credits is that they underpaid significantly. For example, we’ve had people order the $1.99 USD credit package, pay $0.02 USD to us (and $1.97 to the Bitcoin miners) and complain/wonder why they didn’t get their credits. Sometimes the wallet they’re using converts to fiat currency at a different rate than your site expects, sometimes they’re inexperienced with Bitcoin and don’t account for transaction fees. Whatever the reason, you do need to be aware of this problem and handle it appropriately for your site.
- Consider and make clear what you’re going to do if users request refunds (e.g. no refunds, refunds in Bitcoin itself, refunds in fiat currency, etc.)
- Many of these points would be applicable to other crypto-currencies such as Bitcoin Cash or Ethereum.
Our merchant processing system has been handling payments for several months now without issues.