nips/88.md

26 lines
1.2 KiB
Markdown
Raw Normal View History

2023-11-27 10:01:43 -05:00
NIP-88
2023-11-27 10:01:22 -05:00
======
PAY Request
-----------
`draft` `optional`
2023-11-27 10:09:57 -05:00
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.
2023-11-27 10:01:22 -05:00
```js
[
"PAY",
"<BOLT 11 Invoice>",
2023-11-27 10:09:57 -05:00
"<Description>"
2023-11-27 10:01:22 -05:00
"<Url for other plan options>"
]
```
2023-11-27 10:09:57 -05:00
Supporting clients SHOULD 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.
2023-11-27 10:01:22 -05:00
2023-11-27 10:09:57 -05:00
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.
2023-11-27 10:01:22 -05:00
### Motivation
2023-11-27 10:09:57 -05:00
Paid relays often run into friction when renewing subscriptions or when upselling users to the next plan they have