From 467b93ea55a8f1c01dc56daa55bcbd6413e0f681 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Mon, 27 Nov 2023 10:01:22 -0500 Subject: [PATCH] Adds PAY requests --- 88.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 88.md diff --git a/88.md b/88.md new file mode 100644 index 00000000..f4af5189 --- /dev/null +++ b/88.md @@ -0,0 +1,26 @@ +NIP-XX +====== + +PAY Request +----------- + +`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. + +```js +[ + "PAY", + "", + "" + "" +] +``` + +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. + +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 poorly-implemented clients. + +### Motivation + +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 clie \ No newline at end of file