> ## 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.

# refundStaticDeposit

> Create a refund transaction for a static deposit (returns tx hex).

Refunds a deposit made to a static deposit address back to a specified Bitcoin address for the `SparkWallet`.

## Method Signature

```typescript theme={null}
async refundStaticDeposit({
  depositTransactionId,
  outputIndex,
  destinationAddress,
  fee,
  satsPerVbyteFee,
}: {
  depositTransactionId: string;
  outputIndex?: number;
  destinationAddress: string;
  fee?: number; // Deprecated: use satsPerVbyteFee
  satsPerVbyteFee?: number;
}): Promise<string>
```

## Parameters

<ResponseField name="depositTransactionId" type="string" required>
  The transaction ID of the original deposit
</ResponseField>

<ResponseField name="outputIndex" type="number">
  The index of the output (auto-detected if not provided)
</ResponseField>

<ResponseField name="destinationAddress" type="string" required>
  The Bitcoin address to send the refund to
</ResponseField>

<ResponseField name="fee" type="number">
  Deprecated. Total fee in sats for the refund transaction. Use `satsPerVbyteFee` instead.
</ResponseField>

<ResponseField name="satsPerVbyteFee" type="number">
  The fee rate in sats per vbyte (must be less than 150)
</ResponseField>

## Returns

<ResponseField name="txHex" type="string" required>
  The refund transaction as a hex string that needs to be broadcast
</ResponseField>

## Example

```typescript theme={null}
const txHex = await wallet.refundStaticDeposit({
  depositTransactionId: "abc123...",
  destinationAddress: "bcrt1p...",
  satsPerVbyteFee: 10
});
console.log("Refund transaction:", txHex);
```
