Webcredits is an extremely simple way to model decentralized payments, balances and wallets on the world wide web, using Linked Data. This specification deals with credits between counterparites, a ledger that stores balances, and a wallet to allow discovery.
This document in an informal draft discussed in the w3c web payments community group.
<#this> a cc:Credit; cc:source <#alice> ; cc:destination <#bob> ; cc:amount 11.11 .
The Source indicates the source of the credit.
The Destination indicates the destination of the credit.
The Amount indicates the amount of the credit.
A cc:timestamp is an optional field of type xsd date
A cc:description is an optional field of type xsd string
A cc:currency is an optional field of type anyURI
<#alice> cc:amount 1.23 . <#bob> cc:amount 3.77 .
The Amount indicates the balance of the agent.
A wallet is a container of a ledger, it is the authority by which the ledger is defined. It also will show how to find balances, and change the state of the ledger.
An API will typically be a self describing resource which will allow you to get the balance for a given user or recent transactions. Functions of the API SHOULD include getting a balance for a user, and list transactions for a user. Pagination is encouraged, but out of scope of this spec.
An inbox is where you POST a new credit which SHOULD return an HTTP 200 or 201 if accepted.
<#this> a Wallet ; cc:inbox <#inbox> ; cc:currency <#mark> ; cc:api <#api> .
The api shows where to get balances and add new credits.
The inbox shows where to send new web credits.
The currency is the default currency of that wallet.