---
title: FeeProxy refund preparation
description: SDK declarations for feeproxy refund preparation. Inputs, return types, defaults, effects, and immutable source links.
url: https://docs.intuition.systems/docs/reference/sdk/fee-proxy-claim-refund-if-any
markdown_url: https://docs.intuition.systems/docs/reference/sdk/fee-proxy-claim-refund-if-any.md
version: V2
llms_index: https://docs.intuition.systems/llms.txt
kind: reference
reader:
  - app
  - agent
packages:
  - '@0xintuition/sdk@4.1.0'
---

API for `@0xintuition/sdk@4.1.0`. [Compatibility](https://docs.intuition.systems/docs/reference/compatibility) · [Source](https://github.com/0xIntuition/packages/blob/ccae0f0d0277cddd8490b72c49d3771866e7ffea/packages/sdk/src/actions/fee-proxy-claim-refund-if-any.ts).

Import from `@0xintuition/sdk/actions`.

Signatures show the exact accepted inputs and return types. Named input/output structures and dependency-injection types are listed below; viem and protocol types come from their respective packages. Preparation and quote functions can perform RPC reads. Envelope builders on the action-envelope pages use caller-supplied read context and perform no RPC reads or signing. **`feeProxyExecutePlan` sends transactions**; the other SDK actions on these pages prepare transactions or read data.

## feeProxyClaimRefundIfAny

Checks the pull-fallback refund ledger and builds a `claimRefundTo` transaction only when the
user is owed something. FeeProxy pushes excess `msg.value` back first and only credits the
ledger when that push fails, so for most callers this returns `null`; it never builds a claim
that would revert `FeeProxy_NoRefundOwed`.

[Source](https://github.com/0xIntuition/packages/blob/ccae0f0d0277cddd8490b72c49d3771866e7ffea/packages/sdk/src/actions/fee-proxy-claim-refund-if-any.ts#L30)

```ts
function feeProxyClaimRefundIfAny(
  config: ReadConfig,
  inputs: {
    user: Address;
    recipient?: Address;
  },
): Promise<FeeProxyRefundClaim | null>;
```

- **`config`**: FeeProxy address and public client.
- **`inputs`**: The ledger owner, and where to send the refund (defaults to the owner). Pass a
  different recipient when the owner is a contract whose `receive` reverts.
- **returns**: The claim transaction and amount, or `null` when nothing is owed.

## Imported type provenance

Public import locations and the definitions used by these signatures and helper types. Value imports appear where a dependency hook uses `typeof`.

| Name in this module | Public import                                              | Definition                                                                                                                                    |
| ------------------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `ReadConfig`        | `import type { ReadConfig } from '@0xintuition/periphery'` | [Source definition](https://github.com/0xIntuition/packages/blob/ccae0f0d0277cddd8490b72c49d3771866e7ffea/packages/periphery/src/types.ts#L3) |
| `Address`           | `import type { Address } from 'viem'`                      | Owned by the external package.                                                                                                                |
| `Hex`               | `import type { Hex } from 'viem'`                          | Owned by the external package.                                                                                                                |

## Supporting input and result structures

These declarations retain their owning source links. Internal supporting types describe accepted shapes but are not standalone public imports.

### ReadConfig

[Source definition](https://github.com/0xIntuition/packages/blob/ccae0f0d0277cddd8490b72c49d3771866e7ffea/packages/periphery/src/types.ts#L3)

```ts
export type ReadConfig = {
  address: Address;
  publicClient: PublicClient;
};
```

## Input and result types

Exported declarations are public imports from the SDK subpath above. Module-local helper aliases describe accepted shapes but are not public exports.

### FeeProxyRefundClaim

Public export.

```ts
export type FeeProxyRefundClaim = {
  amount: bigint;
  tx: {
    /** The ledger owner. Only this account can claim its refund. */
    from: Address;
    to: Address;
    data: Hex;
    value: bigint;
  };
};
```

Applies to V2 · `@0xintuition/sdk` 4.1.0
