Copyright © 2019 the Contributors to the Webcredits Specification, published by the W3C Payments Community Group under the W3C Community Contributor License Agreement (CLA). A human-readable summary is available.
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 specification was published by the W3C Payments Community Group. It is not a W3C Standard nor is it on the W3C Standards Track. Please note that under the W3C Community Contributor License Agreement (CLA) there is a limited opt-out and other conditions apply. Learn more about W3C Community and Business Groups.
This document in an informal draft discussed in the w3c web payments community group.
If you wish to make comments regarding this document, please send them to public-webpayments@w3.org (subscribe, archives).
<#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.