Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added x-cashu method to NUT-18 #204

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions 18.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ The `n` tag specifies the NIPs the receiver supports. At least one tag value MUS

The execute the payment, the sender makes a `POST` request to the specified endpoint URL with the `PaymentRequestPayload` as the body.

#### X-Cashu

- type: `x-cashu`
- target: `<endpoint-url>`
- tags: `[["c", "replay"]]`

The payment is expected in the X-Cashu header on a request to the specified endpoint.
The tags specify constraints that the request MUST have. `replay` can be found in Payment Requests on HTTP 402 responses and requires that the exact same request is send again, but with a X-Cashu header paying the PR.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The tags specify constraints that the request MUST have. `replay` can be found in Payment Requests on HTTP 402 responses and requires that the exact same request is send again, but with a X-Cashu header paying the PR.
Tags specify constraints that the request **MUST** satisfy. The presence of a `c` tag with `replay` value informs the payer that "replay" could be returned on HTTP 402 responses, prompting the payer to re-attempt the exact same request but with an X-Cashu header paying the Payment Request.


## Payment payload

If not specified otherwise, the payload sent to the receiver is a `PaymentRequestPayload` JSON serialized object as follows:
Expand Down
Loading