nips/88.md

67 lines
2.9 KiB
Markdown
Raw Normal View History

2023-11-27 10:01:43 -05:00
NIP-88
2023-11-27 10:01:22 -05:00
======
2023-11-28 10:39:30 -05:00
NOTIFY Request
--------------
2023-11-27 10:01:22 -05:00
`draft` `optional`
2023-11-28 10:39:30 -05:00
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.
2023-11-27 10:01:22 -05:00
```js
[
2023-11-28 10:39:30 -05:00
"NOTIFY",
2023-11-27 10:09:57 -05:00
"<Description>"
2023-11-27 10:01:22 -05:00
]
```
2023-11-28 10:39:30 -05:00
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.
2023-11-27 10:01:22 -05:00
2023-11-28 10:39:30 -05:00
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.
2023-11-27 10:01:22 -05:00
2023-11-28 10:39:30 -05:00
## Example of use
### Subscription Renewals
2023-11-27 10:01:22 -05:00
2023-11-27 10:13:59 -05:00
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.
2023-11-28 10:39:30 -05:00
```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"
]
```