Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
This article examines ERC5570, a proposal for associating purchase receipts with NFTs through metadata and linking them to on-chain transactions.
This article translates, summarizes, and expands on the proposal below.
Overview
This ERC proposes a standard schema for digital transaction receipts. Digital Receipt Non-Fungible Tokens are issued by vendors when customers make purchases and contain the transaction details needed for recordkeeping. The proposal extends ERC721, which enables the ownership and management of individually identifiable tokens.
A vendor is a business or seller that provides goods or services. In this proposal, the term refers to the business issuing a receipt for a customer's purchase. Vendors issue digital receipts containing the information needed to maintain customer and transaction records.
Motivation
Purchases from online retailers typically come with receipts delivered by email or in physical form. These receipts are important for many reasons, but they are often presented in a format that financial systems cannot easily parse. Already digitized point-of-sale systems should provide receipts in a machine-readable digital format, but this is not always the case. As a result, the redundant digital-to-analog-to-digital process persists, requiring unnecessary data entry or inconvenient receipt-scanning applications.
Consider what the redundant digital-to-analog-to-digital process involves. When a customer buys an item from an online retailer, the following steps may be required.
-
Digital step (digital to analog)
- The customer purchases an item from an online store. After the transaction is completed, the retailer usually provides a receipt through digital channels.
- Email is a common delivery method.
-
Analog step (analog to digital)
- However, the receipt may be presented in an analog format, including a paper copy.
- The customer must manually enter the information to convert it into a structured digital format.
- Alternatively, the customer must use a receipt-scanning application to digitize the paper receipt.
-
Digital step (digital to digital)
- By uploading manually entered or scanned information to a digital system, the customer can import the data into their own recordkeeping system.
This process wastes time and effort because a digital transaction is converted into an analog format before being digitized again. Much of the work is manual, creating opportunities for errors and omissions. The proposed Digital Receipt Non-Fungible Token model aims to streamline this process by allowing transaction details to be managed directly in digital form. This improves transaction transparency and traceability while reducing human error.
Digital receipts are relatively simple and can be defined using a schema that is parseable as JSON or another structured format. A vendor can also demonstrate the authenticity of a receipt by digitally signing it with its private key.
As Ethereum adoption grows, tools need to be developed to offer end users functionality already available in fiat transactions, such as receipts. NFTs offer an opportunity to link on-chain purchases directly to their transaction details through transaction state updates. If we consider a transaction in terms of the parties providing funds and goods, the corresponding real-world state includes both sides of the exchange. A purchase is an exchange in which one participant provides funds, usually money, and receives goods or services in return. When a buyer pays for an item, ownership of the funds passes from the buyer to the seller. At the same time, ownership of the goods passes from the seller to the buyer. NFT receipts (Digital Receipt Non-Fungible Tokens) are proposed as a way to represent this exchange transparently on the blockchain. An NFT receipt can represent the record of a change in ownership of goods as a uniquely identifiable blockchain token. Specifically, an NFT receipt is issued upon purchase and records the change in ownership as part of the transaction.
This allows the state of an on-chain transaction to reflect changes occurring in a real-world purchase. Representing movements of funds and recorded changes in ownership through transparent, immutable transactions can improve trust and transparency. NFT receipts can play an important role in recording such changes accurately and connecting the on-chain transaction state with the underlying purchase.
Linking transaction state to NFT receipts Direct links between on-chain transaction state and NFT receipts offer considerable convenience. Transaction details are made readily accessible. Other approaches, such as storing receipts off-chain or distributing them through separate smart contracts, may lose this direct link and require users to search for transaction details manually. With NFT receipts, end users could access the relevant receipt simply by selecting a transaction in their wallet.
Extending the digital receipt concept An NFT-based digital receipt can record not only changes in ownership of goods but also various other types of information. For example, product serial numbers and shipment tracking information can be added to the receipt. This can provide greater transaction detail and transparency, allowing customers to manage information about purchased products in one place.
Financial system automation and the role of blockchains Manually tracking paper receipts is inefficient and prone to human error. NFTs on a blockchain can enable reliable, accurate, automated tracking of recorded transaction details. This is a significant step toward financial system automation. Recording and tracking transaction histories and details digitally through NFTs can improve transparency and simplify management and auditing. Blockchain-based NFTs can therefore contribute to the efficiency and development of financial systems.
Specification
Transaction flow
- A customer purchases an item from an online retailer.
- The customer selects the item on a website or other interface and proceeds through checkout.
- During checkout, the customer is offered the option to create an NFT.
- As the purchase proceeds, the customer is given the option to create a digital receipt NFT.
- This NFT serves as a digital token that will subsequently contain the transaction details.
- A smart contract provides the customer with a digital receipt NFT.
- Once checkout is complete, the smart contract issues the NFT to the customer.
- This token is recorded on-chain and serves to hold information associated with the digital receipt.
- When fulfilling the order, the vendor uploads the digital receipt defined by the JSON schema below as metadata for the previously created NFT.
- As the vendor prepares the customer's order and ships the goods, it creates a digital receipt based on the specified JSON schema.
- The vendor then uploads the digital receipt as metadata associated with the NFT created on-chain.
- This associates the transaction details with the NFT and makes them accessible through the blockchain record.
This workflow enables transaction details for a customer's online purchase to be managed efficiently through an NFT, supporting transparency.
Digital receipt JSON schema The digital receipt JSON schema is divided into two parts.
1. Root schema:

The root schema contains high-level information about the digital receipt. This includes basic information such as the transaction date and vendor. For example, it records when the transaction took place and which vendor supplied the purchased goods. This information provides an overview of the digital receipt.
2. Schema for repeated receipt line items

A digital receipt may contain one or more items. For example, when multiple goods or services are included, detailed information is needed for each item. A separate schema is provided to describe the individual items on the receipt. This schema is intended to represent repeated line-item details efficiently.
The line-item schema describes information about each individual item on the receipt. Examples include the product name, quantity, and price. This schema makes it possible to organize multiple receipt items and describe each item clearly.
Together, the root schema and the line-item schema define the overall structure of the digital receipt, enabling systematic recording and management of transaction details.
When a customer purchases goods from an online retailer, an NFT can thus be created to hold the transaction details. The vendor uploads the digital receipt as metadata for that NFT, enabling the transaction details to be managed through the associated on-chain record. This improves transparency and gives both customers and vendors a convenient way to track transaction details.
Root schema
{
"id": "receipt.json#",
"description": "Receipt Schema for Digital Receipt Non-Fungible Tokens",
"type": "object",
"required": ["name", "description", "image", "receipt"],
"properties": {
"name": {
"title": "Name",
"description": "Identifies the token as a digital receipt",
"type": "string"
},
"description": {
"title": "Description",
"description": "Brief description of a digital receipt",
"type": "string"
},
"receipt": {
"title": "Receipt",
"description": "Details of the receipt",
"type": "object",
"required": ["id", "date", "vendor", "items"],
"properties": {
"id": {
"title": "ID",
"description": "Unique ID for the receipt generated by the vendor",
"type": "string"
},
"date": {
"title": "Date",
"description": "Date Receipt Issued",
"type": "string",
"format": "date"
},
"vendor": {
"title": "Vendor",
"description": "Details of the entity issuing the receipt",
"type": "object",
"required": ["name", "website"],
"properties": {
"name": {
"title": "Name",
"description": "Name of the vendor. E.g. Acme Corp",
"type": "string"
},
"logo": {
"title": "Logo",
"description": "URL of the issuer's logo",
"type": "string",
"format": "uri"
},
"address": {
"title": "Address",
"description": "List of strings comprising the address of the issuer",
"type": "array",
"items": { "type": "string" },
"minItems": 2,
"maxItems": 6
},
"website": {
"title": "Website",
"description": "URL of the issuer's website",
"type": "string",
"format": "uri"
},
"contact": {
"title": "Contact Details",
"description": "Details of the person to contact",
"type": "object",
"required": [],
"properties": {
"name": {
"title": "Name",
"description": "Name of the contact person",
"type": "string"
},
"position": {
"title": "Position",
"description": "Position / Role of the contact person",
"type": "string"
},
"tel": {
"title": "Telephone Number",
"description": "Telephone number of the contact person",
"type": "string"
},
"email": {
"title": "Email",
"description": "Email of the contact person",
"type": "string",
"format": "email"
},
"address": {
"title": "Address",
"description": "List of strings comprising the address of the contact person",
"type": "array",
"items": { "type": "string" },
"minItems": 2,
"maxItems": 6
}
}
}
}
},
"items": {
"title": "Items",
"description": "Items included into the receipt",
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"$ref": "item.json#"
}
},
"comments": {
"title": "Comments",
"description": "Any messages/comments the issuer wishes to convey to the customer",
"type": "string"
}
}
},
"image": {
"title": "Image",
"description": "Viewable/Printable Image of the Digital Receipt",
"type": "string"
},
"signature": {
"title": "Signature",
"description": "Digital signature by the vendor of receipts data",
"type": "string"
},
"extra": {
"title": "Extra",
"description": "Extra information about the business/receipt as needed",
"type": "string"
}
}
}This JSON schema defines the detailed information contained in a digital receipt. The following sections describe its individual components.
- id
- The identifier of the schema.
- description
- A description of the schema for digital receipt NFTs.
- type
- Specifies the object type.
Required root schema properties
- name
- A name identifying the digital receipt.
- description
- A brief description of the digital receipt.
- image
- A reference to a viewable or printable image of the digital receipt.
- receipt
- An object containing the detailed receipt information.
Properties defining receipt details
- id
- A unique receipt ID generated by the vendor.
- date
- The date the receipt was issued.
- vendor
- Details of the vendor that issued the receipt.
- items
- An array of receipt items. Each item conforms to the separate schema referenced as
item.json#.
- An array of receipt items. Each item conforms to the separate schema referenced as
- comments: Messages or comments the vendor wishes to convey to the customer.
Properties defining vendor details
- name
- The vendor's name.
- logo
- The URL of the vendor's logo.
- address
- An array of strings representing the vendor's address.
- website
- The URL of the vendor's website.
- contact
- Contact information for the vendor, including name, position, telephone number, email address, and address.
Other properties
- signature
- The vendor's digital signature over the receipt data.
- extra
- A property containing additional information about the business or receipt.
Line-item schema
{
"type": "object",
"id": "item.json#",
"required": ["id", "title", "date", "amount", "tax", "quantity"],
"properties": {
"id": {
"title": "ID",
"description": "Unique identifier of the goods or service",
"type": "string"
},
"title": {
"title": "Title",
"description": "Title of the goods or service",
"type": "string"
},
"description": {
"title": "Description",
"description": "Description of the goods or service",
"type": "string"
},
"link": {
"title": "Link",
"description": "URL link to the web page for the product or sevice",
"type": "string",
"format": "uri"
},
"contract": {
"title": "Contract",
"description": "URL link or hash to an external contract for this product or service",
"type": "string"
},
"serial_number": {
"title": "Serial Number",
"description": "Serial number of the item",
"type": "string"
},
"date": {
"title": "Supply Date",
"description": "The date the goods or service were provided",
"type": "string",
"format": "date"
},
"amount": {
"title": "Unit Price",
"description": "Unit Price per item (excluding tax)",
"type": "number"
},
"tax": {
"title": "Tax",
"description": "Amount of tax charged for unit",
"type": "array",
"items": {
"type": "object",
"required": ["name", "rate", "amount"],
"properties": {
"name": {
"title": "Name of Tax",
"description": "GST/PST etc",
"type": "string"
},
"rate": {
"title": "Tax Rate",
"description": "Tax rate as a percentage",
"type": "number"
},
"amount": {
"title": "Tax Amount",
"description": "Total amount of tax charged",
"type": "number"
}
}
}
},
"quantity": {
"title": "Quantity",
"description": "Number of units",
"type": "integer"
}
}
}This JSON schema defines detailed information about individual receipt items (goods or services). The following sections describe its components.
- type
- Specifies the object type.
- id
- The identifier of the schema.
Required properties
- id
- A unique identifier for the goods or services.
- title
- The title or name of the goods or services.
- date
- The date the goods or services were supplied.
- amount
- The unit price of the goods or services, excluding tax.
- tax
- An array containing details of taxes charged for the item or service.
- quantity
- The quantity (number of units) of the goods or services.
Other properties
- description
- A description of the goods or services.
- link
- A URL linking to a web page associated with the goods or services.
- contract
- A URL or hash referencing an external contract for the goods or services.
- serial_number
- The serial number of the product.
Properties defining tax details for goods or services
- name
- The name of the tax, such as GST or PST.
- rate
- The tax rate as a percentage.
- amount
- The total amount of tax charged.
This JSON schema structures information about each item or service in the digital receipt, assigning appropriate formats and constraints to individual fields. This provides a mechanism for managing transaction details accurately and efficiently.
Additional considerations
The proposed schema conforms to the ERC721 metadata extension, allowing existing NFT display tools to render the new receipt tokens.
The new receipt property contains the structured receipt data, while the optional signature property allows the vendor to digitally sign it.
Backwards compatibility
This standard is an extension of ERC721. It is compatible with the optional metadata and Enumerable extensions described in ERC721.
Security considerations
Digital receipts may contain personally identifiable information, such as vendor names, contact information, and details of purchased items. Personally identifiable information (PII), which can be used to identify, locate, or contact a person, is sensitive. Protecting customer privacy is essential, as unauthorized access to PII can lead to identity theft, fraud, and other malicious activities.
Encrypting PII in digital receipts is important for protecting customer privacy. Encryption ensures that only authorized parties with the appropriate decryption keys can access and read the protected information. This preserves customer privacy and reduces the risk of data misuse.
While encrypting PII is important, defining a specific encryption standard is outside the scope of this ERC.
Citation
Sean Darcy (@darcys22), "ERC-5570: Digital Receipt Non-Fungible Tokens," Ethereum Improvement Proposals, no. 5570, September 2022. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-5570.
Thoughts
I find the idea of recording receipts on a blockchain interesting. A tamper-evident record would be useful when checking a receipt later. I also like the possibility of proving that a transaction took place while keeping personal information encrypted. One drawback is the gas cost incurred each time a receipt is registered. Even if gas is inexpensive, I wonder how many people would go out of their way to pay for registering a receipt. Perhaps networks with very low gas fees or effectively gas-free user experiences could address this problem. 🤔 It would be convenient if an NFT marketplace could issue a receipt automatically in the background when a customer buys an NFT. Marketplaces presumably already maintain this information in an off-chain database, but maintaining a corresponding on-chain record could improve verifiability. I cannot immediately think of many situations where this would be used, but it may prove useful in the future.
Conclusion
This article covered ERC5570, a proposal for associating purchase receipts with NFT metadata and linking them to on-chain records. I hope you found it useful.
If you have any questions, feel free to contact me via Twitter DM.

