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

# prepareRevokeCallData

> Construct calldata so your app's spender can revoke a Spend Permission without user interaction

Defined in the [Coinbase Wallet SDK](https://github.com/base/account-sdk)

> [!NOTE]
>
> Builds a single revoke call that your app's spender account can submit to
> revoke a permission silently. This requires your app to control a spender
> account with rights to revoke.

## Parameters

**permission** `SpendPermission` *required*

The spend permission to revoke. This should be a SpendPermission object returned from [`requestSpendPermission`](https://docs.cdp.coinbase.com/coinbase-wallet/reference/spend-permission-utilities/requestSpendPermission) or fetched via [`fetchPermissions`](https://docs.cdp.coinbase.com/coinbase-wallet/reference/spend-permission-utilities/fetchPermissions).

**SpendPermission Properties**

**permissionHash** `string`

Deterministic EIP-712 hash of the permission.

**signature** `string`

Signature for the EIP-712 payload.

**chainId** `number`

Target chain ID.

**permission** `object`

Underlying permission fields.

**Permission Fields**

**account** `address`

**spender** `address`

**token** `address`

**allowance** `bigint`

**period** `number`

Duration in seconds.

**start** `number`

Unix timestamp (seconds).

**end** `number`

Unix timestamp (seconds).

**salt** `string`

**extraData** `string`

## Returns

**revokeCall** `Call`

Call data for the revoke transaction.

**Call Type**

**to** `string`

**data** `0x$\{string\}`

**value** `0x0`

```typescript Silent revoke via spender account lines wrap expandable theme={null}
import { prepareRevokeCallData } from "@base-org/account/spend-permission";

const revokeCall = await prepareRevokeCallData(permission);

await provider.request({
  method: "wallet_sendCalls",
  params: [
    {
      version: "2.0",
      atomicRequired: true,
      from: spender,
      calls: [revokeCall],
    },
  ],
});
```

## Error Handling

Always wrap the call in a try-catch block to handle these errors gracefully.
