STORY
The Lightning meta tag for the web
AUTHOR
Joined 2022.07.25
DATE
VOTES
sats
COMMENTS

The Lightning meta tag for the web

The Bitcoin Lightning meta tag describes a way how websites can receive payments from their visitors. The goals is to bring the #value4value ideas to the web and make Value 4 Value transactions possible on any website.

This is probably the most simple and unobtrusive way to integrate Lightning payments.

Any browser/client that supports the meta tag can then load this meta tag and give users the option send sats.

So how does the meta tag look like?

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.

Example: <meta name="lightning" content="method=lnurl; [email protected]" / >
**
Possible attributes:**

  • method: the payment method, can be either lnurl, keysend or bolt11

  • address: the recipient. e.g. the lightning address in combination with the lnurl method or the node public key in combination with the keysend method

  • customKey: the name of a custom record key to send along with the payment when the keysend method is used.

  • customValue: the custom value to pass along with the payment. This is considered the value that belongs to the customKey (when the keysend method is used)

Examples:

Use a Lightning address as recipient:

<meta name="lightning" content="method=lnurl; [email protected]" / >

Use keysend similar to the podcast:value tag in the Podcasting 2.0 space.

<meta name="lightning" content="method=keysend; address=030a58b8653d32b99200a2334cfe913e51dc7d155aa0116c176657a4f1722677a3; customKey=696969; customValue=3wQCCrfOAMYNzOh1sL05" />

The meta tag should always be used in combination with meta tags that describe the recipient. This can be the typical og meta tags or for Alby:

<meta property="alby:name" content="your name / publisher name" /> <meta property="alby:image" content="URL of the logo / image" />