mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-23 00:45:53 -05:00
Broadening the scope of this NIP
This commit is contained in:
parent
97acbe0722
commit
70a8cae74a
58
88.md
58
88.md
|
@ -1,26 +1,66 @@
|
||||||
NIP-88
|
NIP-88
|
||||||
======
|
======
|
||||||
|
|
||||||
PAY Request
|
NOTIFY Request
|
||||||
-----------
|
--------------
|
||||||
|
|
||||||
`draft` `optional`
|
`draft` `optional`
|
||||||
|
|
||||||
At any point, the relay can send a `PAY` request to a client with a BOLT 11 invoice, a description of what the user is purchasing by paying the invoice, and a URL for other options or more information. The Lightning invoice is the ID of the request.
|
At any point, the relay can send a `NOTIFY` request to a client with a user-readable description to be displayed as is. The description SHOULD be rendered as if it was a Kind 1 post in a visible part of the application to allow the user to quickly reply if needed.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
[
|
[
|
||||||
"PAY",
|
"NOTIFY",
|
||||||
"<BOLT 11 Invoice>",
|
|
||||||
"<Description>"
|
"<Description>"
|
||||||
"<Url for other plan options>"
|
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
Supporting clients MAY display a popup or notification to describe the action needed and collect immediate response from the user: `pay` and keep using the relay, `dismiss` and stop using the relay, or `more information` by navigating the user to the URL. Clients SHOULD expect that the same request might be sent multiple times, if the user dismisses or pays the amount, the client SHOULD ignore following requests with the same invoice.
|
Clients SHOULD expect that the same request might be sent multiple times, if the user dismisses the popup, the client SHOULD ignore following requests with the same description.
|
||||||
|
|
||||||
Supporting relays SHOULD make sure the lightning invoice is the same for similar payment requests and minimize the number of times this request is sent to avoid annoying users with multiple popups.
|
Supporting relays SHOULD make sure the description is the same for similar requests across subscriptions and minimize the number of times this request is sent to avoid annoying users with multiple interruptions.
|
||||||
|
|
||||||
### Motivation
|
## Example of use
|
||||||
|
|
||||||
|
### Subscription Renewals
|
||||||
|
|
||||||
Paid relays often run into friction when renewing subscriptions or when upselling users to the next plan they have available. The API described here allows clients to ease the subscription payment process on an as-needed basis.
|
Paid relays often run into friction when renewing subscriptions or when upselling users to the next plan they have available. The API described here allows clients to ease the subscription payment process on an as-needed basis.
|
||||||
|
|
||||||
|
```js
|
||||||
|
[
|
||||||
|
"NOTIFY",
|
||||||
|
"Your subscription has expired. You can renew your access for the next 30 days by simply paying the invoice below. \n lnbc... \n By paying this invoice, you are accepting our terms and conditions. You can read the terms and see additional subscription options on http://relay.com/plans \n If you do not intend to use this relay anymore, please remove it from your relay list."
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Upselling Plans
|
||||||
|
|
||||||
|
Relays can now progressively upgrade their user's subscriptions based on their use.
|
||||||
|
|
||||||
|
```js
|
||||||
|
[
|
||||||
|
"NOTIFY",
|
||||||
|
"You are out of space. You add another GB of data storage to your account by simply paying the invoice below. \n lnbc... \n By paying this invoice, you are accepting our terms and conditions. You can read the terms and see additional subscription options on http://relay.com/plans \n Until you choose a new plan, we cannot accept new data from this client."
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Unlock Closed Access
|
||||||
|
|
||||||
|
Relays can offer paid access to specific event kinds or add protections to the current use right when the user is trying to make use of them.
|
||||||
|
|
||||||
|
```js
|
||||||
|
[
|
||||||
|
"NOTIFY",
|
||||||
|
"Our public plan does not accept private messages and large files, but Gold members can store up to 10000 messages and 1GB of files. You can join our Gold plan by simply paying the invoice below. \n lnbc... \n By paying this invoice, you are accepting our terms and conditions. You can read the terms and see additional subscription options on http://relay.com/plans \n Until you choose a new plan, we cannot accept new data from this client."
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Request for Donations
|
||||||
|
|
||||||
|
If relays are fundraising, they can send a one-time message to their connected users.
|
||||||
|
|
||||||
|
```js
|
||||||
|
[
|
||||||
|
"NOTIFY",
|
||||||
|
"We hope you are enjoying your experience with relay.com. This year, you used over 1GB of traffic and we store 10K of your events. Please consider a donation in the link below: http://relay.com/fundraising"
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue
Block a user