l402_challenge_create
Creates an L402 payment challenge with a Lightning invoice and signed macaroon to protect a resource behind a paywall, returning a WWW-Authenticate header for HTTP 402 responses.
Instructions
Create an L402 payment challenge (invoice + signed macaroon) to protect a resource behind a Lightning paywall. Returns a WWW-Authenticate header that can be sent to clients with HTTP 402.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| memo | No | Invoice memo / description | |
| resource | No | Resource identifier caveat (e.g. /api/v1/data). Token will only be valid for this path. | |
| wallet_id | No | Blink BTC wallet ID (auto-resolved if omitted) | |
| amount_sats | Yes | Invoice amount in satoshis | |
| expiry_seconds | No | Macaroon expiry in seconds from now (e.g. 3600 = 1 hour) |