NIP-88 ====== NOTIFY Request -------------- `draft` `optional` 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 [ "NOTIFY", "" ] ``` 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 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. ## Examples of use ### Subscription Renewals Paid relays often run into friction when renewing subscriptions. 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. \n 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. \n """ ] ``` ### Upselling Plans Relays can now progressively upgrade their user's subscriptions based on their use. ```js [ "NOTIFY", """ You are out of space. \n 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. \n 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. \n """ ] ``` ### 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. \n 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. \n 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. \n This year, you used over 1GB of traffic and we store 10K of your events. \n Please consider a donation in the link below: http://relay.com/fundraising """ ] ```