Since we introduced our Payment Protocol requirement for BitPay invoices, we have seen a dramatic reduction in payment errors to BitPay merchants.
For thousands of bitcoin users, these improvements have saved time and money lost to payment failures, the miner fee costs of sending mistaken payments, and the miner fee costs of claiming refunds for mistaken payments.
We have been paying close attention to the feedback from the bitcoin wallet ecosystem about Payment Protocol. While we have seen remarkable improvements in the rate of successful bitcoin payments since we launched this requirement on our invoices, we also know that Payment Protocol can be difficult for wallets and exchanges to implement.
To make it easier for wallet and exchange developers to implement the security and user experience improvements that come with Payment Protocol, we've created our own Payment Protocol interface using JSON. JSON is a more familiar serialization format for API developers. It will make understanding and implementing (as well as debugging) Payment Protocol significantly simpler for wallets and exchanges.
This JSON Payment Protocol interface for wallets and exchanges is also currency-agnostic, so it will work seamlessly with other currencies accepted on BitPay invoices in the future.
Our interface and implementation spec deviates slightly from the BIP-70 implementation of Payment Protocol. The JSON interface provides for direct communication between a wallet and BitPay's servers. If a wallet submits an incorrect payment to BitPay, BitPay's servers will reject the transaction. This prevents any transactions which will result in a failed payment from reaching the Bitcoin blockchain and costing users unnecessary miner fees. We expect that this change will allow us to reduce payment errors to zero.
Ready to start building? The open source code is available in full on GitHub, or you can npm install
it:
npm install json-payment-protocol
Get the module: https://github.com/bitpay/jsonPaymentProtocol
View the documentation: https://github.com/bitpay/jsonPaymentProtocol/blob/master/specification.md
We encourage wallet developers to share feedback on this release. If you are a wallet implementing the interface, please let us know how we can help. If you have questions or bug reports, our engineers will be keeping an eye out.
UPDATE, 9/26/18: View our full list of frequently asked questions about BitPay and Payment Protocol.