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

# How-to: Estimate spend fees

> Estimate fees before spending from a Unified Balance

The App Kit SDK can provide an estimate of the fees you'll incur before spending
from a Unified Balance.

## Prerequisites

Before you begin, ensure that you've:

* [Installed the App Kit SDK](/app-kit/tutorials/installation)
* [Configured an adapter](/app-kit/tutorials/adapter-setups)

These are required so any example below runs with a valid `kit` and `adapter`.

## Estimate fees before spending

This sample estimates then spends 1.00 USDC from Base Sepolia to Arc Testnet
when you specify explicit amounts from a source blockchain:

<Info>
  For automatic routing (no explicit `allocations`), see
  [Select source blockchains](/app-kit/tutorials/unified-balance/select-source-blockchains).
</Info>

```typescript TypeScript theme={null}
const params = {
  amount: "1.00",
  from: {
    adapter,
    allocations: [{ amount: "1.00", chain: "Base_Sepolia" }],
  },
  to: {
    adapter,
    chain: "Arc_Testnet",
    recipientAddress: "0xRecipientAddress",
  },
};

const estimate = await kit.unifiedBalance.estimateSpend(params);
console.log("Estimated fees:", estimate.fees);

const result = await kit.unifiedBalance.spend(params);
```

<Note>
  Estimated fees may differ from actual fees due to network conditions at
  execution time. Review the estimate before proceeding.
</Note>

### Example fee response

The JSON below shows the shape of the fees array.

```json JSON theme={null}
{
  "fees": [
    {
      "type": "provider",
      "token": "USDC",
      "amount": "0.00005",
      "allocations": [{ "chain": "Base Sepolia", "amount": "0.00005" }]
    },
    {
      "type": "gasFee",
      "token": "USDC",
      "amount": "3.311005",
      "allocations": [
        { "chain": "Ethereum Sepolia", "amount": "3.30" },
        { "chain": "Base Sepolia", "amount": "0.011005" }
      ]
    },
    {
      "type": "kit",
      "token": "USDC",
      "amount": ".1",
      "allocations": [{ "chain": "Ethereum Sepolia", "amount": ".1" }],
      "recipientAddress": "0x2222222222222222222222222222222222222222"
    }
  ]
}
```

Fee `type` values can include:

* **`provider`** — Protocol transfer fee when the spend is crosschain. Not
  charged for same-chain spends.
* **`gasFee`** — Onchain gas paid on source blockchains as part of the spend.
* **`kit`** — Developer custom fee from your
  [custom fee policy](/app-kit/tutorials/unified-balance/collect-custom-spend-fees).
* **`forwarder`** — Forwarding Service fee when the spend
  [uses the forwarder](/app-kit/tutorials/unified-balance/use-forwarding-service)
  (not shown in the sample above).

See [How Unified Balance fees work](/app-kit/concepts/unified-balance-fees) for
a conceptual fee breakdown.
