This endpoint is exclusively for standard Solana wallets (keypair-based
accounts). For Squads smart accounts with built-in gas abstraction, see Grid
v1 Cost Efficiency.
How It Works
The gas abstraction process follows these steps:- Transaction Submission: Send your unsigned, base64-encoded transaction to the endpoint
- Fee Calculation: The paymaster computes the required fees in your specified currency (defaults to USDC)
- Paymaster Signing: The paymaster adds its signature to sponsor the fees
- User Signing: Add the user’s signature to the paymaster-signed transaction
- Blockchain Submission: Submit the fully signed transaction to Solana
Implementation Guide
1
Prepare Your Unsigned Transaction
Create your versioned transaction without signing it:
2
Submit to Gas Abstraction API
Send your unsigned transaction to the endpoint:
3
Sign and Submit to Blockchain
Deserialize the paymaster-signed transaction, add the user’s signature, and submit:
Fee Structure
Fee Calculation
The total fee consists of:- Compute Units: Based on transaction complexity and computational requirements
- Rent Fees: For account creation or rent-exempt balance requirements
- Currency Conversion: Fees quoted in your specified currency (default: USDC)
Billing Details
- Sandbox Environment: Devnet transactions are processed but not billed
- Production Environment: Mainnet transactions are recorded and billed according to your Grid API agreement
- Fee Components: Transaction, priority, and rent fees are included in billing
Custom Identifiers
Use the optionalcustomIdentifier query parameter to group and track related transactions:
- Group transactions by user, session, or feature
- Query fee history by identifier
- Track usage patterns and costs per category
Transaction Validation
Transactions must:- Be valid Solana transactions that can be simulated successfully
- Use versioned transaction format
- Be properly serialized to base64
- Not be pre-signed
Error Handling
Common error scenarios:Invalid Transaction Format
Invalid Environment Header
X-Grid-Environment header is set to either sandbox or production.
Service Unavailable
Security Best Practices
- API Key Protection: Never expose your Grid API key in client-side code or public repositories
- Environment Separation: Use sandbox for testing, production only for live transactions
- Transaction Verification: Always validate the returned signed transaction matches your intent
- Fee Monitoring: Implement alerts for unexpected fee spikes
- Rate Limiting: Implement appropriate rate limiting to avoid overwhelming the API
Authorizations
API Key for authentication. Include your Grid API key in the Authorization header.
Headers
The environment you're using. Can be sandbox or production.
Available options: 
sandbox, production Query Parameters
Optional custom identifier for tracking purposes. Used to group and filter transactions.
Body
application/json
Base64-encoded unsigned Solana transaction to process for fee abstraction
Example:
"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQABBDZi..."
Response
Transaction successfully processed with abstracted fees