Add NIP-63a: Minimal Payment Gateway Descriptor#2315
Add NIP-63a: Minimal Payment Gateway Descriptor#2315mostafa-khaldi wants to merge 8 commits intonostr-protocol:masterfrom
Conversation
This document introduces a new event kind (10164) for payment gateways, detailing structure, tags, and client behavior for handling paid content.
|
This is kinda weird with the @pablof7z unrelated commits in there. Anyway, I'm not sure it is worth standardizing methods for receiving payments on Nostr like that, but as far as a standard for payments goes I think this gets pretty close to optimal. I'm not experienced in this stuff though, so feel free to ignore my opinion. |
|
I think the branch I created was somehow behind the mainstream repo, resolving the conflicts that have occurred caused the merging of old commits, weird tho. |
|
Thanks for pushing on this, the payment layer is exactly the gap NIP-63 leaves open and it's worth filling. A few pieces of feedback from building a paid-content platform on Nostr: 1. Link to the tier event. Right now Without this, discovery only works if there's exactly one gateway per creator, which breaks as soon as someone offers different payment options per tier. 2. Native rails should be first-class, not behind
3. Amounts need precision and asset discipline. Mixing Where 4. The method 5. Replaceable vs addressable is ambiguous. Kind 10164 is in the replaceable range, so a creator can only publish one. But the PR says "one event = one gateway" and shows creators with both BTCPay and Stripe, which implies multiple. I'd move this to the addressable range (30000-39999) with a 6. Missing fields real subscription billing needs:
7. Discounts feel under-specified. No coupon codes, no expiry, no per-subscriber targeting, no stacking rules. I'd either flesh this out or drop it from v1 and add it in a follow-up, otherwise every client will interpret it differently. Happy to collaborate on a revised draft if useful. We're shipping a creator platform against NIP-63 right now and running into exactly these questions. |
|
hey @Joaofcm this is a great feedback, I agree with most of your mentioned points, however there are these two
The native payment in Nostr is not behind but rather within the system, if we prioritize lightning, cashu..etc, we might discourage other users to use the gateway, tho you have mentioned a fallback, but this makes the providers having a special treatment for them (or let's say making them a mandatory payment methods at first) instead of making them optional. In anyway, I don’t see separating native Nostr payments from the others have any real benefits where they can exist anyway. For the second one
Where this is partially true, I think having a set of types that we define would eliminate spelling redundancy and adding Feel free to add up or share your thoughts. |
|
Thanks Mostafa, happy to dig in on both. On point 2: I don't think this framing is about priority or mandating anything, it's about what a client can actually execute. As written, A creator who only wants Stripe still publishes one method with If everything lives behind On point 4: Adding A recommended (not exhaustive) list gets you the spelling discipline without the ossification cost: "clients SHOULD use these canonical strings: The informative-only framing is fair, but even a display-only closed enum has a cost: every new rail has to wait on spec updates to render correctly in clients that match against the enum. |
|
Hey @TheIcarusWings, thanks for the elaboration, On point 2: If we remove these two from the list of methods for a specific gateway I’d like to suggest the following, we can either do one of the two:
On point 4: |
|
@TheIcarusWings Another issue on point 2, is how and which payment gateway verifies and updates the subscribers list if the payment is done in another app (in this case the nostr client)? Adding the lightning method for a specific gateway By the way, this NIP was mainly proposed for auto-management haha |
|
Thanks Mostafa, useful refinement. On point 4: Agreed. Canonical list plus allow custom types is the right shape, solves ossification without losing spelling discipline. On point 2: Option (a) is the cleaner path. Keep On the verification question (your follow-up): I don't think inline methods break auto-management, they just move the verification surface. The gateway doesn't need to observe a browser redirect to learn about a settled payment. If the gateway controls the endpoint (its own LN node, its own LNURL-pay, its own nutzap pubkey), it already sees settlement:
Mental model: The one flow this genuinely doesn't cover is a creator publishing their personal lud16 with no gateway in the loop. That's out of scope by design though, a creator doing that isn't using auto-management, they're just accepting zaps. |
|
Hey @TheIcarusWings I get your point, but I think the scope is too tight here, see, the creators will be allowed to use any lightning address they wish, so it's not necessary for the gateway to control that part, but if we're gonna go with this logic, I think we need to assure these two:
Also, we should keep in mind that this NIP introduces gateways that can auto-manage and communicate with Nostr, others for merely payment should use the announcement event |
Updated the event kind from `10164` to `30164` which makes it a replaceable event, and added support for custom payment method type if out of the proposed list.
|
Good refinements, both land. On the receipt invariant ( On the gateway pubkey tag in 10164: agreed, make it required. Either a dedicated Worth noting this composes cleanly with my earlier point 5 (addressable kind): if the gateway pubkey is required anyway, it's the natural On 10163 vs 10164: worth calling out in the NIP rationale. One-liner along the lines of: "10163 announces payment availability when the creator manages subscribers themselves. 10164 declares a gateway that auto-manages subscribers and requires receipts to carry its pubkey as One small thing to nail down: whether the gateway-identifier on the receipt side is a plain |
|
Catching up on commit Moving to One refinement on the
Happy to see this land without that change too, but using the pubkey ties the addressable kind and the receipt-attribution flow into one coherent piece. The other open items from my previous comment (receipt invariant with |
|
Hey @TheIcarusWings I think having the gateway pubkey now solves many issues, and I agree also to use it as a |
Updated the identifier section to replace the payment URL with the gateway public key. Added details about the gateway's Nostr pubkey and its usage in payment-related events.
This NIP introduces a new event kind
10164that allows content creators to declare payment gateways, pricing models, and subscription rules for accessing paid content.