l402-pay
Pay L402 challenges from l402-fetch or l402-discover via payment hash, store the credential for next l402-fetch, and poll human wallet settlement up to 120s.
Instructions
Pay a challenge that l402-fetch or l402-discover returned, by its paymentHash, and store the credential so the next l402-fetch succeeds. For human wallets, polls the payment page for settlement for up to 120s; call it straight after showing the payment URL to the user. An invoice that did not come from such a challenge is paid only if the human approves it in the client.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | No | Payment method override. Defaults to wallet priority: NWC > Cashu > LNURLcash > human. | |
| invoice | No | BOLT-11 invoice. Leave out when paying a challenge by paymentHash; any other invoice needs the human to approve it. | |
| macaroon | No | Macaroon from the L402 challenge. Optional if paymentHash matches a cached challenge. | |
| paymentHash | No | Payment hash of a challenge from l402-fetch or l402-discover. |