> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spark.money/llms.txt
> Use this file to discover all available pages before exploring further.

# getLightningSendFeeEstimate

> Estimate the fee for paying a Lightning invoice.

Estimates the fee for sending a Lightning payment via the `SparkWallet`.

## Method Signature

```typescript theme={null}
interface LightningSendFeeEstimateInput {
  encodedInvoice: string;
  amountSats?: number;
}

async getLightningSendFeeEstimate(params: LightningSendFeeEstimateInput): Promise<number>
```

## Parameters

<ResponseField name="encodedInvoice" type="string" required>
  The BOLT11-encoded Lightning invoice
</ResponseField>

<ResponseField name="amountSats" type="number">
  Amount in satoshis to send (required for zero-amount invoices)
</ResponseField>

## Returns

<ResponseField name="fee" type="number" required>
  The estimated fee in satoshis
</ResponseField>

## Example

```typescript theme={null}
const feeEstimate = await wallet.getLightningSendFeeEstimate({
  encodedInvoice: "lnbc..."
});
console.log("Estimated fee:", feeEstimate, "sats");
```
