Skip to main content

Overview

Spend Permissions let you designate a trusted spender that can move assets out of a user’s Base Account on their behalf. After the user signs the permission, the spender can initiate transfers within the limits you define — no additional prompts, pop-ups, or signatures needed from the user. This powers seamless experiences such as subscription renewals, algorithmic trading, and automated payouts. Read more about the Spend Permission Manager contract and supported chains on GitHub.
Spend Permissions for Base App Apps are coming soon and will be supported in a future update.
If you’re using Sub Accounts, learn how Base Account can automatically fund Sub Accounts and optionally skip approval prompts using Auto Spend Permissions.

Usage

Request a Spend Permission

You create an EIP-712 payload that describes the permission and ask the user to sign it. Store the resulting signature along with the permission data so you can register the permission on-chain later. The SDK helper below handles construction and signing for you.

Use the Spend Permission

Using a permission is 2 steps:
  1. Prepare the calls — Call prepareSpendCallData with the permission and the requested amount.
  2. Submit the calls — Submit the calls using your app’s spender account.
prepareSpendCallData returns an array of calls needed to spend the tokens:
  • approveWithSignature — When the permission is not yet registered onchain, this call would be prepended to the spend call.
  • spend — The call to spend the tokens from the user’s Base Account.
About the spendCalls arrayThis array has 2 calls when submitting the permission onchain for the first time. When the permission is already registered onchain, this array has only 1 call (the spend call).For most use cases, you don’t need to worry about this.

Revoke a Spend Permission

You can revoke a permission in two ways:
  • Request user approval via request to user’s Base Account using requestRevoke.
  • Revoke silently from your app’s spender by submitting the call returned from prepareRevokeCallData.

API Reference

Complete Integration Example