The Anypay Protocol

Skip the marketing copy. Show me the documentation.

Your Wallet, Made Magic

Have you ever bought something with bitcoin? It’s bleeping awful, isn’t it? I should know. I have been running a bitcoin payments company for years. And it’s never gotten much better in 10 years of bitcoin.

We always sell it as “simple” and “easy” and “tap, swipe, send!”

But you know, and I know, that it’s never that easy.

It’s awkward. It’s slow. It’s complicated and confusing. Even a seasoned pro, even a freaking wallet developer, will walk up to a bitcoin payment screen, and pause. Hmmmm. Okay. Now what?

Meanwhile, people are in line behind you, or someone is watching curiously, or worse — recording you. The pressure mounts. You do things without looking. You open your phone and play trombone with the camera until the damn QR scans. You look and feel like a damn fool while trying to look cool.

Now add to that — the possibility of paying with dozens or hundreds of of other coins.

No. Just no.

Now the cashier has to ask you, “Which one do you want?”

They have to *know* about Bitcoin Cash, or Bitcoin Core, or BSV, or Cardano, or whatever the heck. And all of it is just freaking stupid.

It should be, “Open. Scan. Send.”

That’s what everyone *wants* it to be.

Why we’re not there yet is … well, probably there are lots of reasons but here we are.

The Anypay Protocol

Okay so Anypay is a multi-coin point of sale. Merchants can choose which coins they want to accept from a small handful of popular options. The cashier types in the amount to pay (in local fiat), and the Anypay app converts it on the spot to a payment request for BSV (or BCH, BTC, or DASH).

Okay, so then say the customer wants to pay with a different coin. Now they have to ask the cashier to change it. Or if they know, they have to reach over and tap the screen themselves. YUCK. Who wants that?

Okay, so they select the coin they want, they pay, and it’s over with. But was that the best experience?

No.

The Anypay Protocol is a simple 1-line change in the code of most wallets that will make every payment magic.

Imagine this:

You walk into a smoothie shop and order a Rocket Fuel (Cold-brew coffee, oat milk, house made PB, banana, cacao powder, maple — delicious).

The friendly cashier, Miranda, says, “That’ll be $8.47. Cash or card?”

“Bitcoin.”

“Ah, okay! We can do that. Hold on.” Miranda taps on the iPad a few times, then turns the iPad around to face you. “Here you go.”

You scan it with your DASH WALLET.

“$8.47. Send?”

WHAT?

It’s a bitcoin invoice, right? Yeah, but thanks to the magic of the Anypay Protocol, your Dash wallet knows exactly what to do.

You open your Badger Wallet to double check that QR code. You scan it.

“$8.47. Send?”

WHAT IS THIS DEVIL WORSHIP?

It’s nothing. Don’t worry about it. Most people will never have to know. Your mom, your dad, your sister. They will all just scan and it will work perfectly with whatever coin or wallet they use. Because it *has to* be like that. If we’re ever going to get anywhere with this bitcoin thing being used as money, we have GOT to get to the point where it’s slick. Where it’s faster than a credit card. Where it’s as easy as handing over a credit card.

Like, what if MasterCard and Visa and AMEX were all different sizes? That required different processes for swiping? Or different hardware? Or different ANYTHING?

Would you put up with that? NO!

Are you a nerd? You wanna know how it works? Okay lemme break it down for you real quick.

A QR code like this is what you are used to seeing.

bitcoin:1JsTp8URdpac1ySKgh4WjBAYQECsU23Nd6?sv&amount=0.051251&label=Derrick is Awesome Inc

This QR code contains a standard data structure that bitcoin wallets can read.

coin_name:149103jcq09j139130e1j2039dj3?=0.013313

This data has 3 parts:

  1. A coin name to tell the wallet what type of coin it is for. (Multi coin wallets like Coinomi and Exodus use this)
  2. It has an address (where the coin is to be sent)
  3. An amount (how much of the coin to send)

This is the standard way for years and years that people communicated payment information with bitcoin. It’s okay, I guess. But check this out:

This QR code looks the same, but under the hood, it is rocking the following information:

pay:?r=https://api.anypayinc.com/r/e644438a-aa6d-41f3-9566-887fdb8de10a

Okay. My Dash wallet can read that?

Yes. Here’s how:

The Dash Wallet developers made one tiny change to their code. (Okay, it was more involved than that in their case, but for some wallets it is literally just a one line change.)

All they did was make it so that instead of reading, “dash:”, the wallet will also accept, “pay:”

After it reads that, it knows this is a payment URL. The wallet goes to the URL, and grabs the relevant information being served up there. Anypay does its part by providing information relevant to the Dash wallet.

“Here you go, buddy,” Anypay says to the Dash wallet.

“Thanks, bud. You’re a real pal,” the Dash wallet responds.

And off they go, magically making your payment happen in a split second. Taking care of all the complex behind-the-scenes work behind a black curtain so you don’t have to bother with thinking or tapping or waiting or asking.

Just let the girl at the counter present you a QR code, and scan it with whatever wallet you love most.

What’s that, you say? You’re not sure if your wallet supports the Anypay protocol? Well let’s fix that!

Here’s the documentation. Like I said, for most wallets, it’s a single line code change (if you already support payment URLs, which you probably do). But if not, these handy guides can help you do it. Your users want your wallet to be magic. They want to pay a Dash invoice with BSV. Let Anypay give your wallet superpowers you can show your friends.

The Anypay Protocol was developed by Steven Zeiler under the BipCot NoGov Software License v1.2 Use by anyone except governments and their agents is ok. It is not copyright-based, it is entirely shame-based. Learn more at BipCot.org

Documentation

Here is how to implement the Anypay Protocol in your wallet:

pay:

Your wallet already knows how to parse QR codes that say:

bitcoincash:

Or:

dash:

Or:

bitcoin:

Presumably, your wallet also knows how to parse URIs like this:

bitcoincash:?r=https://api.anypayinc.com/r/e644438a-aa6d-41f3-9566-887fdb8de10a

Now the only difference is to make your wallet recognize URIs that start with the word pay:

pay:?r=https://api.anypayinc.com/r/e644438a-aa6d-41f3-9566-887fdb8de10a

That is the Anypay protocol. When your wallet sees the word pay: and then a URI (like above), then it will go to that endpoint, grab the relevant headers, and populate your wallet with the necessary information to pay the invoice.

All of this happens in a split second.