There are several scenarios in which it would be useful to prove that you have paid for something. For example:
- A pre-paid hotel room where your PoP functions as a key to the door.
- An online video rental service where you pay for a video and watch it on any device.
- An ad-sign where you pay in advance for e.g. 2-weeks exclusivity. During this period you can upload new content to the sign whenever you like using PoP.
- A lottery where all participants pay to the same address, and the winner of the T-shirt is selected among the transactions to that address. You exchange the T-shirt for a PoP for the winning transaction.
These use cases can be achieved without any personal information (no accounts, no e-mails, etc) being involved.
Desirable properties:
- A PoP should be generated on demand.
- It should only be usable once to avoid issues due to theft.
- It should be able to create a PoP for any payment, regardless of script type (P2SH, P2PKH, etc.).
Current methods of proving a payment, as I know of:
- BIP0070, The PaymentRequest together with the transactions fulfilling the payment makes some sort of proof. However, it does not meet 1 or 2 and it obviously only meets 3 if the payment is made through BIP0070. Also, there's no standard way to request/provide the proof.
- Signing messages, chosen by the entity that the proof is provided to, with the private keys used to sign the transaction. This could meet 1 and 2 but probably not 3. This is not standardized either.
Proof of Payment, the data structureA proof of payment for a transaction T, PoP(T), is used to prove that one has ownership of the credentials needed to unlock all the inputs of T. It has the exact same structure as a bitcoin transaction with the same inputs as T and with a single OP_RETURN output:
OP_RETURN PoP <txid> <nonce>
| Field | Size [B] | Description |
|-----------|----------|------------------------------------|
| PoP | 3 | Literal identifying this as a PoP |
| <txid> | 32 | The transaction to Prove |
| <nonce> | 5 | Unsigned integer |The PoP is signed using the same signing process that is used for bitcoin transactions. The purpose of the nonce is to make it harder to use a stolen PoP. Once the PoP has reached the destination, that PoP is useless since the destination will generate a new nonce for every PoP.
Proof of Payment, the processThe server needs to validate the PoP and reply with “valid” or “invalid”. That process is outlined below:
The first two issues are the same as for traditional bitcoin payments. They could be mitigated by using secure connections and possibly also extending BIP0070 to support PoPs.