Proposal: Adding contentMetadata
and contentMetadataUri
Fields in PayerData for Lud-18
#209
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Abstract
The current
PayerData
record of LUD-18 only includes fields such asPayerId
,PayerName
,PayerEmail
, andPayerAddress
. However, there is no provision for including metadata about the content for which the payment is made. This lack of provision for content metadata can lead to a lack of clarity regarding the content being paid for.To address this issue, we propose to add two fields to the
PayerData
record, namelycontentMetadata
andcontentMetadataUri
.By including the
contentMetadata
andcontentMetadataUri
fields in thePayerData
record of LUD-18, LNURL-supported wallets can display information about the content being paid for to their users. This information can include details such as the content type, title, author, and any other relevant information. This can help users make informed decisions about the content they are paying for, and can also help content creators to promote their content more effectively. Additionally, this metadata can be used to facilitate content discovery, analytics of payment-sources and thus allowing users to search and filter content based on their preferences. Overall, the inclusion ofcontentMetadata
andcontentMetadataUri
fields in LUD-18 can greatly enhance the user experience and improve the efficiency of payment processing.Introduction:
LNURL is a widely adopted protocol for facilitating payments over the Lightning Network. It has enabled seamless and efficient payments for a variety of use cases. The
payerData
field is an essential component of the Lud-18 standard. However, the current Lud-18 standard does not include any fields to store information about the content for which the payment is being made. This information, known as content metadata, is important for tracking and analysing the different payment sources, give better user experience and a meaning to transaction history.Objectives:
The primary objective of adding these new fields is to facilitate widespread adoption of LUD-18 and provide a more comprehensive and standardized way of tracking and analysing different payment sources, provider better user experience for transaction history. The proposed fields will enable LNURL supported wallets to store relevant metadata associated with the digital content for which the payment is made.
Proposal Details:
The proposed fields are as follows:
contentMetadata
: This field will contain the metadata associated with the digital content for which the payment is made. The metadata could include information such as thetitle
,author
,publisher
,date of publication
, and other relevant details. Metadata is directly attached in thePayerData
in form of JSON objectcontentMetadataUri
: This field will contain a URI that points to the location of the metadata associated with the digital content. This URI could be a link to an API endpoint, or any other location where the metadata is stored and can be retrieved from the Uri using a simgle GET request.The reason for introducing two fields is to provide flexibility in how content metadata is managed and stored. Any of them or both the fields can be included.
The
contentMetadata
field will allow for direct association of metadata with the payment transaction, which can be useful in cases where the metadata is relatively small or the metadata changes frequently. On the other hand, thecontentMetadataUri
field will allow for referencing metadata stored externally, which can be useful in cases where the metadata is large or more complex, and requires a separate storage and management systemImplementation:
The content metadata can be included in the
payerData
field as a JSON object. The JSON object can contain different key-value pairs to represent various aspects of the content, such as title, description, author, genre, duration, format, and so on. The proposed fields,contentMetadata
orcontentMetadataUri
, can be added to the JSON object to store the content metadata and the URI where the metadata can be accessed, respectively. The format of the JSON object remains same while using any of the field.For example, the payerData field could contain the following JSON object:
Use Cases:
Adding content metadata to the payerData field can have several use cases. Some of them are:
Better Payment Management: By including content metadata, payment processors(wallets) can have better visibility into the nature of the content for which payments are being made. This can help in better payment management and creation of clean transaction history using filters
Improved User Experience: Users can benefit from having access to content metadata, as it provides additional information about the content they are paying for. This can help them make more informed decisions and enhance their overall experience.
Recommendation/Marketing: The content metadata can also be used for marketing purposes, such as promoting new releases, providing personalized recommendations, or creating targeted advertising campaigns.
Analytics: analysing different payment sources using content metadata to give better insights to the users about the payment a user is receiving
Conclusion:
The proposed addition of the
contentMetadata
andcontentMetadataUri
fields in the payerData field of the Lud-18 standard will provide a standardized and comprehensive way of tracking and analysing different payment sources giving more meaning to transaction history and many more. The inclusion of these fields will benefit content providers, payment processors, and end-users by providing improved tracking and a better user experience,