What is a Paymaster?
A paymaster is a service that pays transaction fees on behalf of users, so they can begin using your application before acquiring SOL. Benefits:- Users can transact before acquiring SOL
- Lower barrier to entry for new users
- Better user experience for dApps
Prerequisites
Before using the paymaster SDK:- Create a paymaster in the Developer Portal
- Fund your paymaster with SOL
- Get your API key from the Developer Portal
Paymasters require a paid subscription (PRO, ULTRA, or ENTERPRISE). See Subscriptions & Billing for details.
Installation
Choose the package that matches your Solana SDK version:- Classic (web3.js 1.x)
- Kit (web3.js 2.0)
@solana/web3.js version 1.x (the traditional Solana SDK).Configuration
Create a paymaster client with your credentials:- Classic (web3.js 1.x)
- Kit (web3.js 2.0)
Configuration Options
Retry Options
Configure automatic retries for transient failures:Quick Start
Here’s a minimal example to sponsor a transaction:- Classic (web3.js 1.x)
- Kit (web3.js 2.0)
Transaction Flow
The paymaster transaction flow works as follows:- Create Transaction: Build the transaction with the paymaster set as the fee payer
- User Signs: User signs to authorize the transaction
- Paymaster Signs: Paymaster validates and signs (covering the fee)
- Submit: Transaction is sent to the Solana network
Next Steps
- Sponsoring Transactions - Detailed examples and methods
- Advanced Usage - Error handling, retries, versioned transactions
- Create a Paymaster - Set up your paymaster in the Developer Portal

