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.

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 an 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.
This array should have 1 or 2 calls, submit them in order using your app’s spender account.

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