Skip to content

Kind 9735: Zap

Overview

Zap events (kind 9735) represent lightning network payments between Nostr users. They are created by lightning nodes or services when a zap invoice generated from a zap request has been paid. Zaps allow users to send Bitcoin tips to each other and have them recorded in the Nostr ecosystem, creating a visible history of payments that can be displayed by clients.

Specification

PropertyValue
Kind Number9735
Event RangeRegular
Defined inNIP-57

Content Format

The content field of a zap receipt is typically empty.

Schema

""

Tags

Tag NameDescriptionFormatRequired
pRecipient's public key["p", "<pubkey-hex>"]Yes
PSender's public key (from zap request)["P", "<pubkey-hex>"]No
eEvent being zapped (if any)["e", "<event-id>"]No
aAddressable event coordinate (if any)["a", "<kind>:<pubkey>:<d-tag>"]No
bolt11Lightning invoice["bolt11", "<invoice>"]Yes
descriptionJSON-encoded zap request["description", "<encoded-json>"]Yes
preimagePayment preimage["preimage", "<preimage-hex>"]No
amountAmount in millisatoshis["amount", "21000"]Recommended

Client Behavior

Clients should:

  1. Validate zap receipts as described in NIP-57, including checking that the pubkey matches the expected nostrPubkey from the recipient's LNURL provider.
  2. Display zaps on profiles and posts where they occurred, typically showing the amount paid and by whom.
  3. Parse the zap request from the description tag if additional metadata is needed.
  4. When receiving a valid zap receipt, consider it proof that a payment has been made.
  5. Support both direct zaps to users and zaps to specific events.
  6. Handle multi-recipient zaps according to the weight values when zapping events with zap tags.

Relay Behavior

Relays should:

  1. Handle zap receipts like any other event.
  2. Store them according to normal event policies.
  3. Make them available to clients requesting them with appropriate filters.

Use Cases

  • Tipping content creators for valuable posts
  • Paying for access to resources or content
  • Rewarding users for helpful information
  • Supporting favorite profiles with recurring payments
  • Revenue stream for creators
  • Spam prevention by requiring zaps for certain actions

Example

json
{
  "id": "67b48a14fb66c60c8f9070bdeb37afdfcc3d08ad01989460448e4081eddda446",
  "pubkey": "9630f464cca6a5147aa8a35f0bcdd3ce485324e732fd39e09233b1d848238f31",
  "created_at": 1674164545,
  "kind": 9735,
  "tags": [
    ["p", "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"],
    ["P", "97c70a44366a6535c145b333f973ea86dfdc2d7a99da618c40c64705ad98e322"],
    ["e", "3624762a1274dd9636e0c552b53086d70bc88c165bc4dc0f9e836a1eaf86c3b8"],
    ["bolt11", "lnbc10u1p3unwfusp5t9r3yymhpfqculx78u027lxspgx..."],
    ["description", "{\"pubkey\":\"97c70a44366a6535c145b333f973ea86dfdc2d7a99da618c40c64705ad98e322\",\"content\":\"\",\"id\":\"d9cc14d50fcb8c27539aacf776882942c1a11ea4472f8cdec1dea82fab66279d\",\"created_at\":1674164539,\"sig\":\"77127f636577e9029276be060332ea565deaf89ff215a494ccff16ae3f757065e2bc59b2e8c113dd407917a010b3abd36c8d7ad84c0e3ab7dab3a0b0caa9835d\",\"kind\":9734,\"tags\":[[\"e\",\"3624762a1274dd9636e0c552b53086d70bc88c165bc4dc0f9e836a1eaf86c3b8\"],[\"p\",\"32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245\"],[\"relays\",\"wss://relay.damus.io\",\"wss://nostr-relay.wlvs.space\",\"wss://nostr.fmt.wiz.biz\",\"wss://relay.nostr.bg\",\"wss://nostr.oxtr.dev\",\"wss://nostr.v0l.io\",\"wss://brb.io\",\"wss://nostr.bitcoiner.social\",\"ws://monad.jb55.com:8080\",\"wss://relay.snort.social\"]]}"],
    ["preimage", "5d006d2cf1e73c7148e7519a4c68adc81642ce0e25a432b2434c99f97344c15f"],
    ["amount", "1000000"]
  ],
  "content": "",
  "sig": "908a15e46fb4d8675bab026fc230a0e3542bfade63da02d542fb78b2a8513fcd0092619a2c8c1221e581946e0191f2af505dfdf8657a414dbca329186f009262"
}

References

Notes

  • Zap receipts are not considered absolute proof of payment as they could be forged, but they are trusted within the context of the ecosystem.
  • The pubkey of a zap receipt is the public key of the recipient's LNURL provider, not the recipient or sender.
  • The created_at timestamp should match the time when the invoice was paid.
  • The zap flow involves multiple entities: the sender (requester), the recipient's LNURL server, and the lightning network.
  • Future improvements may include encrypted zap requests for more privacy.