Add bip-70, fix variable name

This commit is contained in:
Rob Riddle 2018-03-01 15:49:37 -05:00
parent 2472cd9833
commit 97289845d2
2 changed files with 12 additions and 1 deletions

11
bip70.md Normal file
View File

@ -0,0 +1,11 @@
# BIP-70 Modifications
In addition to JSON payment protocol, BitPay Bitcoin and Bitcoin Cash invoices use a mildly modified version of [BIP-70](https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki). We include
one additional field which specifies the fee rate the transaction must have in order to be accepted. Bitcoin invoices are temporarily exempt from this rule to allow wallets time to adjust.
* `required_fee_rate` - The minimum fee per byte required on your transaction. Bitcoin Cash payments will be rejected if fee rate included for the transaction is not at least this value. _May be fractional value_ ie 0.123 sat/byte
## Application Logic
Please note that you should **NOT** broadcast a payment to the P2P network if we respond with an http status code other than `200`. Broadcasting a payment before getting a success notification back from the server will
lead to a failed payment for the sender. The sender will bear the cost of paying transaction fees yet again to get their money back.

View File

@ -35,7 +35,7 @@ On a successful request, the response will contain one header of note.
#### Body
* `network` - Which network is this request for (main / test / regtest)
* `currency` - Three digit currency code representing which coin the request is based on
* `requiredFeePerByte` - The exact fee per byte required on this transaction. Payment will be rejected if fee rate included for the transaction is not equal to this value. _May be fractional value_ ie 0.123 sat/byte
* `requiredFeeRate` - The minimum fee per byte required on this transaction. Payment will be rejected if fee rate included for the transaction is not at least this value. _May be fractional value_ ie 0.123 sat/byte
* `outputs` - What output(s) your transaction must include in order to be accepted
* `time` - ISO Date format of when the invoice was generated
* `expires` - ISO Date format of when the invoice will expire