-
Notifications
You must be signed in to change notification settings - Fork 193
Lightning Monetization meta tag
The Lightning meta tag gives websites a way to receive direct payments from their visitors. It allows websites to describe how and where they would like to receive payments. Utilizing the open Lightning Network protocol payments can be sent in real-time from the visitor to the creator without the need for a third-party.
The goals is to bring the #value4value ideas to the web and make value4value transactions possible on any website.
The value for value system is a way for content creators to receive direct payments from consumers. Consumers can reward creators by sending payments based on their perceived value of the content. The concept originated from the podcasting world but can be applied to any digital content.
Thanks to the open nature of the Lightning Network protocol value can be transferred directly from the consumer to the creator without the need to rely on a third-party.
Websites can specify one or more Lightning meta tags.
The metadata name
attribute must be set to lightning
.
The metadata content
attribute contains data as key-value pairs separated by a semi-colon and, optionally, a space for legibility. The value may or may not be wrapped in double- or single-inverted commas, which should be removed from the value if found at the beginning and end of the value.
-
lnurlp
: LNURL-pay URL or internet identifier. -
keysend
: The destination's node pubkey -
bolt11
: A bolt11 invoice -
bolt12
: A bolt12 offer -
suggested
: The suggested amount in Satoshi
As the standard evolves more attributes might be added in the future.
Receive payments through an LNURL-pay specified lightning address with a suggested amount of 100 Satoshi.
<meta name="lightning" content="lnurlp=your@lightning.address; suggested=100;">
Receive payments through keysend payments with a suggested amount of 100 Satoshi.
<meta name="lightning" content="keysend=0235s1df8b244dc91adclo8d1b1a3cp7fue31cee4r7e819e15bef9174d31d07154; suggested=100;">
Receive payments through a bolt11 invoice
<meta name="lightning" content="bolt11=lnbc100n13qjf26pp5k2zpzvnahqesv9xnk5sgfuxc7v9r0y4hvh86vx8lnqmupz74e6sqhp">
JavaScript events can be triggered for successful payment notifications.
Events are triggered as CustomEvent
and can contain lightning payment details in the detail
event property:
{
preimage: string
}
document.addEventListener('lightning:transaction', function (event) {
console.log(event.type);
console.log(event.detail);
console.log(event.detail.preimage);
});
- Home
- Bounties
- Calls
- Connector API
- Internationalization i18n (Developer Guide)
- Lightning Monetization meta tag
- Lightning Node Connect
- Making Payment Transactions Smart With Structured Metadata
- Open Design
- Test Setup
- Image Compression Tutorial