http-micropayments
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
http-micropayments [2015/10/24 17:26] – donpdonp | http-micropayments [2024/01/31 04:08] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
## Cryptocoin HTTP Micropayments | ## Cryptocoin HTTP Micropayments | ||
- | HTTP Header | + | |
+ | #### Retrieving payment data for a resource/ | ||
+ | * GET < | ||
+ | * 200 or 402: receives json txout/addr in header. | ||
+ | * OR second request with content-type: | ||
+ | * Uses browser extension to handle bitcoin private keys and sign the txout. | ||
+ | * POST < | ||
+ | * content-type: | ||
+ | |||
+ | #### HTTP Header | ||
+ | encoded in no-spaces json. | ||
+ | |||
+ | Paying to a txout is more featureful. | ||
``` | ``` | ||
- | X-micropayment: | + | X-micropayment: |
+ | ``` | ||
+ | or simply list receiving address | ||
+ | ``` | ||
+ | X-micropayment: | ||
``` | ``` | ||
Line 10: | Line 26: | ||
* " | * " | ||
- | * GET / | ||
- | * 200 or 402: receives txout in headers. computes signed tx. | ||
- | * POST / | ||
- | * content-type: | ||
- | * content-type: | ||
+ | #### processing payment | ||
Fastest: client signs TX, hands to server (no bitcoin network involved). Server can selectively run various checks, including submitting to the bitcoin network and waiting, or trusting valid signature and recent balance. | Fastest: client signs TX, hands to server (no bitcoin network involved). Server can selectively run various checks, including submitting to the bitcoin network and waiting, or trusting valid signature and recent balance. | ||
- | Cons: | + | Post of signed TX is optional. If donation/ |
+ | |||
+ | #### Cons | ||
* payment info in http headers is likely to be lost when content is re-uploaded (eg, uploaded to IPFS). | * payment info in http headers is likely to be lost when content is re-uploaded (eg, uploaded to IPFS). | ||
* Better to embed in HTML doc | * Better to embed in HTML doc | ||
* other mime types? png/ | * other mime types? png/ | ||
+ | |||
+ | #### Implementations | ||
+ | * Client | ||
+ | * browser addon | ||
+ | * Server | ||
+ | * PHP snippet | ||
+ | * Wordpress plugin | ||
+ | |||
http-micropayments.txt · Last modified: 2024/01/31 04:08 by 127.0.0.1