This guide uses CDP Embedded Wallets. For other integration patterns, see the Guides section.
Prerequisites
- A CDP account with an active project
- Node.js 22+ and npm/pnpm/yarn
- Basic familiarity with React and TypeScript
- Your app domain allowlisted in CDP Portal
Step 1: Configure Paymaster in CDP Portal
- Sign in to your CDP account
- Navigate to Paymaster under Onchain Tools in the left-nav
- Select Base Sepolia in the network dropdown (top right of the configuration panel)
- Under Configuration, add any contracts you want to sponsor to the allowlist
Step 2: Set Up CDP Embedded Wallet with Smart Accounts
Install the CDP SDK packages:App.tsx
Step 3: Send a Sponsored Transaction
UseuseSendUserOperation with useCdpPaymaster: true. This is the recommended approach — it handles Paymaster integration securely without exposing your endpoint URL:
SponsoredTransaction.tsx
Step 4: Verify It Works
- Start your development server
- Sign in to create a smart account
- Click the button to send a sponsored transaction
- Check the Paymaster Logs in CDP Portal to see your sponsored transaction
Batch Multiple Calls
Smart accounts can execute multiple calls atomically in a single user operation:Next Steps
- Security — Learn about protecting your Paymaster endpoint
- FAQs — Common questions about billing, Account Abstraction, and EIP-7702
- Paymaster Proxy Guide — Detailed guide on implementing a production proxy
- Examples Repository — More integration examples with various SDKs