In the current version, the Receipt Definitions are communicated only in the Receipts-Accepts Header .
Receipt Definition
A Receipt Definition is an XML object which tells a Client what receipts would be accepted in order to access the relevant resource.
Note that the root of a Receipt Definition is a definitions
element, which is a list of definition
s.
<definitions xmlns="https://402.TBD">
<definition>
<domain>https://www.example.com/</domain>
<item>/page.html</item>
<signers>
<signer>https://receipts.dmn.network/path</signer>
</signers>
<ttl>2720000</ttl>
<costs>
<cost>
<units>USD</units>
<amount>0.05</amount>
</cost>
</costs>
</definition>
<definition>
<domain>https://www.example.com/</domain>
<item></item>
<signers>
<signer>https://receipts.dmn.network/path</signer>
</signers>
<ttl>2720000</ttl>
<costs>
<cost>
<units>USD</units>
<amount>3.00</amount>
</cost>
</costs>
</definition>
</definitions>
See the documentation for Accepts Headers for another example.
Schema
Tag | Description | Children/Type |
---|---|---|
Root elements: | ||
definitions |
The root element of a Receipt Definition xml fragment. |
see below |
Element types: | ||
definitions |
A list of |
List of definition
|
definition |
To access the resource, a receipt matching one of these descriptions is needed. A |
|
none |
A |
string
|
domain |
For an HTTPS resource, this must be the full domain name of the resource’s address. |
string
|
item |
This will typically be the path of the HTTP resource, but it could be anything. An empty |
string
|
signers |
A list of |
List of signer
|
signer |
The absolute canonical HTTPS url identifying a Notary. Any one of the listed Notaries is sufficient. |
anyURI
|
ttl |
An integer representing the maximum age in seconds of a Signed Receipt that will be accepted. Two independent conventions are recommended as “normal”: The |
unsignedInt
|
costs |
A list of |
List of cost
|
cost |
Usually an expression of monetary value. Notaries may use the |
|
units |
A currency code. ISO4217 codes are recommended. |
string
|
amount |
A decimal number amount of that currency’s major units. For example, six US cents would be |
decimal
|
plan |
An identifier which is assumed to mean something to the various parties involved. |
string
|