Manages Interledger STREAM receipts
STREAM receipts allow recipients or third parties to verify received payments at the recipient's Interledger wallet.
The Receipt Verifier:
For Web Monetization, website visitors submit receipts to the website in monetizationprogress
events. The website backend can send receipts to the Receipt Verifier to confirm the payment.
npm install
npm run-script build
sudo docker run -p 6379:6379 -d redis
npm start
SPSP_ENDPOINTS_URL
with the query's url path value (without the preceding slash) as the URI encoded id
query parameter.
The response body is expected to be a string of the SPSP endpoint to proxy the SPSP query to.GET / Accept: application/spsp4+json
Adds receipt headers to SPSP request and proxies it to the receiver's SPSP endpoint.
If SPSP_ENDPOINTS_URL
is configured, the request is proxied to the SPSP endpoint returned by the SPSP_ENDPOINTS_URL
.
SPSP_ENDPOINTS_URL=https://my-revshare.com
, GET /users/alice
triggers a GET request to https://my-revshare.com/?id=users%2Falice
. The SPSP request is then proxied to the SPSP endpoint in the response.Otherwise, the SPSP query is proxied to the URL encoded payment pointer or SPSP endpoint in the path of the SPSP request URL.
GET /%24wallet.com
(or GET /https%3A%2F%2Fwallet.com%2F.well-known%2Fpay
) is proxied to $wallet.com
(https://wallet.com/.well-known/pay
).POST /verify
Verifies receipt and returns value
Field Name | Type | Description |
---|---|---|
amount | string | Amount by which this receipt exceeds the previously verified receipt's totalReceived |
id | string | OPTIONAL The URI decoded id that was used in the request to the SPSP_ENDPOINTS_URL |
spspEndpoint | string | SPSP endpoint to which the payment was sent |