Web Vouchers introduce a simple, standardized way to use vouchers, codes, or tokens for one-time payments and services on the web. By using Uniform Resource Names (URNs), Web Vouchers easily integrate into existing web systems, offering a secure and interoperable solution that improves upon current methods.
Designed as urn:voucher:namespace:123456789abcdefghi, these vouchers can be used for everything from e-commerce discounts to secure access for web services. This spec explains how to format and use Web Vouchers, provides examples, and addresses important aspects like security, making sure transactions are safe, and extensible, ensuring everyone can use them easily.
We've included guidelines for developers on how to implement Web Vouchers, along with tools to check if they're set up correctly. Plus, there's information on how to give feedback and help improve future versions of the spec.
In short, Web Vouchers aim to make web payments and services simpler and safer for everyone, everywhere.
This document in an informal draft originally discussed in the w3c web payments community group.
One time codes are a popular way of solving one off problems on the web. And example might be sending someone a code to log in to a system, or one to reset a password or one to creating a private address for a calendar. However there exists no generic URN on the web to encode such a one time code such that it can be used for redeeming a payment, good or service.
This document specifies a format, and operations that Web Vouchers may support.
Web Vouchers are a component of larger systems, such as the Linked Data ecosystem [[LINKED-DATA]], which have driven the design goals for this specification. This section summarizes the primary design goals for this specification.
Goal | Description |
---|---|
Decentralization | The voucher should not be server specific, though it may be. |
Control | Only the entities that know the voucher URN can use it. |
Privacy | The Voucher URN is kept private between those that honor it. |
Security | Transmission of a URN will be over encrypted formats. |
Discoverability | It may be possible to discover more information about a URN in a proof based network, or using an authoritative server. |
Interoperability | URIs and URNs are used to provide wide interoperability with existing systems on the web. |
Portability | Be system and network-independent and enable entities to use their digital identifiers with any system that supports Web Vouchers. |
Simplicity | Favor a reduced set of simple features in order to make the technology easier to understand, implement, and deploy. |
Extensibility | When possible, enable extensibility provided it does not greatly hinder interoperability, portability, or simplicity. |
In the context of Web Vouchers, namespaces play a crucial role in organizing and identifying vouchers across various domains and applications. A namespace is a part of the voucher's URN that specifies its category or issuer, enabling a structured and hierarchical approach to voucher management. This system facilitates the differentiation between vouchers, even when they originate from different entities or serve distinct purposes.
For example, the URN urn:voucher:cashu:123456789abcdefghi
uses "cashu" as its namespace, indicating a voucher associated with the Cashu project.
Similarly, a voucher intended for general web use might employ a namespace like "web", as in urn:voucher:web:123456789abcdefghi
.
The Web namespace is generic web based voucher issuance, JSON will safely encode small JSON objects, txo will be used by selectronic coins, and so on.
By utilizing namespaces, the Web Vouchers system ensures interoperability and clarity, allowing vouchers to be easily categorized, discovered, and validated.
The design of Web Vouchers supports a wide range of namespaces, accommodating everything from corporate issuers to cryptocurrencies, and from loyalty points to fiat currencies. This flexibility ensures that Web Vouchers can adapt to various use cases and evolve alongside the web's ever-changing landscape.
urn:voucher:cashu:cashuAeyJ0b2tlbiI6W3sibWludCI6Imh0dHBzOi8vODMzMy5zcGFjZTozMzM4IiwicHJvb2ZzIjpbeyJhbW91bnQiOjIsImlkIjoiMDA5YTFmMjkzMjUzZTQxZSIsInNlY3JldCI6IjQwNzkxNWJjMjEyYmU2MWE3N2UzZTZkMmFlYjRjNzI3OTgwYmRhNTFjZDA2YTZhZmMyOWUyODYxNzY4YTc4MzciLCJDIjoiMDJiYzkwOTc5OTdkODFhZmIyY2M3MzQ2YjVlNDM0NWE5MzQ2YmQyYTUwNmViNzk1ODU5OGE3MmYwY2Y4NTE2M2VhIn0seyJhbW91bnQiOjgsImlkIjoiMDA5YTFmMjkzMjUzZTQxZSIsInNlY3JldCI6ImZlMTUxMDkzMTRlNjFkNzc1NmIwZjhlZTBmMjNhNjI0YWNhYTNmNGUwNDJmNjE0MzNjNzI4YzcwNTdiOTMxYmUiLCJDIjoiMDI5ZThlNTA1MGI4OTBhN2Q2YzA5NjhkYjE2YmMxZDVkNWZhMDQwZWExZGUyODRmNmVjNjlkNjEyOTlmNjcxMDU5In1dfV0sInVuaXQiOiJzYXQiLCJtZW1vIjoiVGhhbmsgeW91LiJ9
urn:voucher:txo:chain:123456789abcdef:vout?key=K&amount=1000000
urn:voucher:json:123456789abcdefghi
https://webvouchers.org/.well-known/voucher/cashu/123456789abcdefghiThe other convenient thing that can be discovered is a server or servers that accept the voucher. This could be done over a gossip network with an initial bootstrap. A discovery node accepts the URN and points to a document with relevant servers.