Direct Payment Request (Kind 5522)
As an extension to the open protocol ecosystem, Kind 5522 (Direct Payment Request) is a specialized variant designed to support "knowledge-less" direct payments across the network. It allows a sender to directly pay a Lightning invoice while maintaining recipient-anonymity.
Because there is no preceding 5520 Zap Request, the sender is blindly paying a constructed BOLT11 invoice. The Zap Settlement Provider (ZSP) uses the 5522 event purely as a cryptographically signed instruction to execute the payment on behalf of the user's balances or via a direct connection.
Structure
The most critical distinction of a 5522 event is that the p (Recipient) tag MUST NOT BE PRESENT. Including a p tag violates the knowledge-less privacy guarantee of a direct payment.
{
"kind": 5522,
"content": "Direct payment for service",
"tags": [
["bolt11", "lnfc10u1..."],
["amount", "100000"],
["chain", "flokicoin"]
],
"pubkey": "<sender_pubkey>",
"created_at": 1709424000,
"sig": "..."
}
Required Tags
| Tag | Format | Description |
|---|---|---|
bolt11 | ["bolt11", "<string>"] | The exact Lightning/Flokicoin invoice the sender wants to pay. |
amount | ["amount", "<milli-units>"] | The requested payment amount in milli-units (e.g., mloki, msats). |
chain | ["chain", "<string>"] | The network context, e.g., flokicoin or bitcoin. |
Cryptographic Validation (The Hash-Lock)
Because the event omits the recipient (p tag), a malicious ZSP could theoretically take the funds if validation was weak.
To securely process a 5522 payment, the ZSP must enforce a Cryptographic Hash-Lock:
- The
description_hash(thehtag) embedded within the providedbolt11invoice MUST exactly equal theSHA256hash of the stringified JSON of the5522event.
If the hashes misalign, the ZSP must reject the request. If the event's overall cryptographic signature (sig) is invalid, the ZSP must reject the request.
Receipt Generation
Once successfully routed and settled, the ZSP publishes a Kind 5521 Zap Receipt.
Unlike standard zaps, the generated 5521 for a Direct Payment will completely omit the description tag, signaling to clients that this was a spontaneous peer-to-peer route without a preceding request phase. The ZSP may append the recipient's p tag to the receipt after settlement if it successfully matched the invoice destination to an internal lidp identity.