l402-fetch-preview
Check a URL's payment requirements before paying. Returns cost, protocol, and payment method, enabling a confirmation dialog so users can approve or cancel before any satoshis are spent.
Instructions
Preview payment requirements for a URL without spending any sats. Returns cost, protocol, and payment method so a confirmation dialog can be shown. Use this before l402-fetch to give the user a chance to approve or cancel payment. For widget hosts, the result drives a payment confirmation dialog.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL to preview payment requirements for | |
| urls | No | Batch: multiple URLs to preview | |
| method | No | HTTP method | GET |
| pubkey | No | Nostr pubkey for xcashu auth | |
| headers | No | Additional request headers |