Skip to main content
Learn how to create and manage Spend Permissions that allow trusted spenders to move assets from Base Accounts without requiring additional user signatures.

Overview

Spend Permissions enable users to grant timely allowances to trusted spenders, allowing them to move assets on behalf of the user within defined limits. This creates seamless user experiences for recurring payments, subscriptions, and automated transactions.

What you’ll achieve

By the end of this guide, you will:
  • Create Spend Permissions with specific allowances and time periods
  • Fetch and manage existing Spend Permissions
  • Use Spend Permissions to execute transactions
  • Implement Spend Permission functionality in your React application
The code snippets in this guide are based on the following example project:

Setup

Follow the Setup guide to set up Privy with Base Account.

Implementation

Component Setup

Key Methods

Creating Spend Permissions

Use requestSpendPermission to create new Spend Permissions:

Fetching Permissions

Use fetchPermissions to retrieve existing permissions:

Using Permissions

Check permission status and prepare spend calls:

Configuration Options

Allowance and Period

Configure spending limits and time periods:

Token Addresses

Common token addresses on Base:
  • USDC: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
  • ETH: Native token 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
  • DAI: 0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb

Use Cases

Spend permissions are ideal for:
  • Subscriptions: Recurring payments without user interaction
  • DeFi protocols: Automated trading and yield farming
  • Gaming: In-game purchases and rewards
  • Commerce: Streamlined checkout experiences